Add powershell API exception support
Signed-off-by: Mike Cao <vipmike007@gmail.com>