Add-LXCAPSLogHeader
This cmdlet writes a user message as a header in the PS log file, which can be used to mark the start and end of a block in a script.
Note
You cannot pipe objects to this cmdlet.
Syntax
Add-LXCAPSLogHeader [-UserMessage String]
[-MachineId]
[-Identity]
[CommonParameter]
Parameters
- -UserMessage String
- Specifies the message in the header that the user wants to add in PS log file.
- -MachineId
- If specified, adds the machine identity (machine name) in the header that is to be written in PS log file.
- -Identity
- If specified, adds the user identity (user name and domain if is the case) in the header that is to be written in PS log file.
- CommonParameters
- This cmdlet supports the following common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable, -OutBuffer, -PipelineVariable, -OutVariable. For detailed information about each common parameter, see the Microsoft PowerShell Common Parameters webpage.
Results
This cmdlet does not return any data.
Examples
The following example writes a full message header in PS log file.-UserMessage contains the full name of the current script
d-LXCAPSLogHeader –UserMessage "Starting '$PSCommandPath'" -Identity -MachineId
Give documentation feedback