NAME
Add-DcsLogMessage
SYNOPSIS
Adds a custom message to the Event Log.
SYNTAX
Add-DcsLogMessage -Message <String> [ -Level <String> ] [ -PostAlert] [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Adds a custom message to the Event Log.
PARAMETERS
- -Message<String>
- Message to add to the Event Log.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Level<String>
- The importance of the message. Possible values are "Trace", "Info", "Warning", "Error", and "Diagnostic". If the Level parameter is not included, by default the level will be Info.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PostAlert<SwitchParameter>
- Include this parameter to post an alert in addition to the message.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Connection<String>
- Alias of the connection to the server group. If not specified, the default connection will be used.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PipelineVariable<String>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
INPUTS
OUTPUTS
NOTES
Also see Get-DcsLogMessage, Clear-DcsAlert, Get-DcsAlert, Get-DcsLogMessage
EXAMPLES
-------------- Example 1 Posts a warning message and fires an alert --------------
Add-DcsLogMessage -Message "Power state is LOW BATTERY and write caching will be disabled." -Level Warning -PostAlert
The message "Power state is LOW BATTERY and write caching will be disabled." is output to the Event Log as a Warning message and a warning alert is posted to the Alerts.