Write-WarningMessage
Writes a warning message to the console.
Syntax
Default (Default)
Write-WarningMessage
[[-warning] <String>]
[<CommonParameters>]
Description
The Write-WarningMessage cmdlet writes a warning message to the console.
Examples
1: Write a warning message
PS C:\>Write-WarningMessage -Warning "This is a warning"
Writes a short message (warning) to the System Center Operations Manager Command Shell.
Parameters
-warning
The Write-WarningMessage cmdlet writes a warning message to the console.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | 0 |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.