external help file: PoshToolbox-help.xml Module Name: PoshToolbox online version: https://gitlab.com/PoshAJ/PoshToolbox/-/blob/main/docs/Write-PoshLog.md schema: 2.0.0
Writes a log message.
Write-PoshLog [-Type <String>] [-Message] <String> [<CommonParameters>]
The Write-PoshLog
cmdlet writes a log message to the PowerShell log.
Specifies the log message.
Type: String
Parameter Sets: Type
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the type of event.
Type: String
Parameter Sets: Type
Aliases:
Accepted values: Log, Information, Warning, Error
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
You cannot pipe input to this cmdlet.
This cmdlet does not generate any output.
The InformationVariable, WarningVariable, and ErrorVariable parameters of the corresponding Write-Information
, Write-Warning
, and Write-Error
cmdlets are used to determine messages written to the PowerShell log. A specific message(s) can be excluded by using the correct parameter with a variable or null as show below.
Write-Information -InformationVariable null Write-Warning -WarningVariable null Write-Error -ErrorVariable null