< Back
Write-OutputMessage
Post
NAME Write-OutputMessage
SYNOPSIS
This function writes a message to an output stream and returns it with a number of newlines appended.
SYNTAX
Write-OutputMessage [-message] <String> [[-appendNewLines] <Int32>] -toInformation [-returnMessage]
[<CommonParameters>]
Write-OutputMessage [-message] <String> [[-appendNewLines] <Int32>] -outputStream <String> [-returnMessage]
[<CommonParameters>]
Write-OutputMessage [-message] <String> [[-appendNewLines] <Int32>] -toError [-returnMessage] [<CommonParameters>]
Write-OutputMessage [-message] <String> [[-appendNewLines] <Int32>] -toWarning [-returnMessage]
[<CommonParameters>]
DESCRIPTION
PARAMETERS
-message <String>
The message to write to output.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-appendNewLines <Int32>
The number of newlines to add to the end of the message when it is returned.
Required? false
Position? 2
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-toInformation [<SwitchParameter>]
Indicate that the message should be written to the information stream.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-toWarning [<SwitchParameter>]
Indicate that the message should be written to the warning stream.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-toError [<SwitchParameter>]
Indicate that the message should be written to the error stream.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-outputStream <String>
Select the stream where the messages will be directed.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-returnMessage [<SwitchParameter>]
Select whether the message should be returned from the function.
Required? false
Position? named
Default value [Switch]::Present
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String
RELATED LINKS
SYNOPSIS
This function writes a message to an output stream and returns it with a number of newlines appended.
SYNTAX
Write-OutputMessage [-message] <String> [[-appendNewLines] <Int32>] -toInformation [-returnMessage]
[<CommonParameters>]
Write-OutputMessage [-message] <String> [[-appendNewLines] <Int32>] -outputStream <String> [-returnMessage]
[<CommonParameters>]
Write-OutputMessage [-message] <String> [[-appendNewLines] <Int32>] -toError [-returnMessage] [<CommonParameters>]
Write-OutputMessage [-message] <String> [[-appendNewLines] <Int32>] -toWarning [-returnMessage]
[<CommonParameters>]
DESCRIPTION
PARAMETERS
-message <String>
The message to write to output.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-appendNewLines <Int32>
The number of newlines to add to the end of the message when it is returned.
Required? false
Position? 2
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-toInformation [<SwitchParameter>]
Indicate that the message should be written to the information stream.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-toWarning [<SwitchParameter>]
Indicate that the message should be written to the warning stream.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-toError [<SwitchParameter>]
Indicate that the message should be written to the error stream.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-outputStream <String>
Select the stream where the messages will be directed.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-returnMessage [<SwitchParameter>]
Select whether the message should be returned from the function.
Required? false
Position? named
Default value [Switch]::Present
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String
RELATED LINKS