Write-PSULog
SYNOPSIS
Writes a log to the PowerShell Universal logging system.
SYNTAX
Write-PSULog [-Message] <String> [-Feature <String>] [-Resource <String>] [-Level <AgentLogLevel>]
[-Properties <Hashtable>] [-Console] [<CommonParameters>]DESCRIPTION
Writes a log to the PowerShell Universal logging system.
EXAMPLES
Example 1
PS C:\> Write-PSULog -Message "Hello" -Level 'Error'Writes an error log to the PowerShell Universal logging system.
PARAMETERS
-Feature
The feature that is writing the log. This is typically the name of the feature group. For example, 'App' or 'API'.
-Level
The level of the log. This can be Error, Warning, Information or Debug.
-Message
The message to write to the log.
-Properties
Additional properties to write to the log. This should be a hashtable of key/value pairs.
-Resource
The resource to associate this log message to. This may be an app, API or script.
-Console
Also writes the log entry to the console output.
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction. For more information, see about_CommonParameters.
INPUTS
None
OUTPUTS
System.Object
NOTES
RELATED LINKS
Last updated
Was this helpful?