Today's cmdlet ‣ Get-WinEvent
Gets events from event logs and event tracing log files on local and remote computers.
Example's Remarks:
• The `Get-WinEvent` cmdlet uses the LogName parameter to specify the Windows PowerShell event log.
• The event objects are stored in the `$Event` variable.
• The Count property of `$Event`shows the total number of logged events.
#tutorial
Gets events from event logs and event tracing log files on local and remote computers.
Example's Remarks:
• The `Get-WinEvent` cmdlet uses the LogName parameter to specify the Windows PowerShell event log.
• The event objects are stored in the `$Event` variable.
• The Count property of `$Event`shows the total number of logged events.
#tutorial
Today's cmdlet ‣ Format-Custom
Uses a customized view to format the output.
Example's Remarks:
• This command formats information about the `Start-Transcript` cmdlet in the format defined by the MyView view, a custom view created by the user.
• To run this command successfully, you must first create a new PS1XML file, define the MyView view, and then use the `Update-FormatData` command to add the PS1XML file to PowerShell.
#tutorial
Uses a customized view to format the output.
Example's Remarks:
• This command formats information about the `Start-Transcript` cmdlet in the format defined by the MyView view, a custom view created by the user.
• To run this command successfully, you must first create a new PS1XML file, define the MyView view, and then use the `Update-FormatData` command to add the PS1XML file to PowerShell.
#tutorial