New-PSULoggingTarget
Creates a new logging target in PowerShell Universal.
SYNOPSIS
SYNTAX
New-PSULoggingTarget -Type <String> [-Properties <Hashtable>] [-Level <String>] [-Feature <String>]
[-Resource <String>] [-Scope <String>] [-ScriptBlock <ScriptBlock>] [-ComputerName <String>]
[-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate]
[-Cookies] [<CommonParameters>]DESCRIPTION
EXAMPLES
Example 1
New-PSULoggingTarget -Type 'PowerShell' -Level 'Information' -Scope User -Feature API -ScriptBlock {
param($LogEvent, $Message)
$Message | Out-File C:\logs\log.txt
}PARAMETERS
-AppToken
-ComputerName
-Feature
-Integrated
-Level
-Properties
-Resource
-Scope
-ScriptBlock
-Type
-UseDefaultCredentials
-Credential
-TrustCertificate
-Cookies
CommonParameters
INPUTS
None
OUTPUTS
PowerShellUniversal.LoggingTarget
NOTES
RELATED LINKS
Last updated
Was this helpful?