RJKSolutions

Get-PIServer cmdlet ignores -ErrorAction

Discussion created by RJKSolutions on Jul 2, 2013
Latest reply on Jul 2, 2013 by RJKSolutions

If I issue the command

 

(Get-AFServer -Name "AFNameDoesNotExist" -ErrorAcction SilentlyContinue) -eq $null

 

then it yields true (or $true to be correct). Just what I expected.

 

If I do the same for the PI Server cmdlet I always get thrown an error, I can't seem to handle it silently...

 

Get-PIServer -Name "PINameDoesNotExist" -ErrorAction SilentlyContinue

 

always throws "Get-PIServer : The requested server was not found..." to the console.

 

Any idea?

Outcomes