Steps to reproduce
PS C:\WINDOWS\system32> write-output 'test' -WarningAction Suspend
Write-Output : Cannot bind parameter 'WarningAction' to the target. Exception setting "WarningAction": "The action
preference of "Suspend" is supported only for ErrorAction."
At line:1 char:36
+ write-output 'test' -WarningAction Suspend
+ ~~~~~~~
+ CategoryInfo : WriteError: (:) [Write-Output], ParameterBindingException
+ FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.WriteOutputCommand
Expected behavior
Right error message. The reality is Suspend is not supported by ErrorAction either.
Actual behavior
"The action preference of "Suspend" is supported only for ErrorAction."
Environment data
PS C:\WINDOWS\system32> $PSversiontable
Name Value
---- -----
PSVersion 5.1.14393.82
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.82
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Steps to reproduce
Expected behavior
Right error message. The reality is Suspend is not supported by ErrorAction either.
Actual behavior
"The action preference of "Suspend" is supported only for ErrorAction."
Environment data