Skip to main content

powershell

Description

Results of running a PowerShell script on the system

Init

powershell(script string)

Fields

IDTYPEDESCRIPTION
scriptstringRaw contents of the script
stdoutstringStandard output from running the script
stderrstringStandard error output from running the script
exitcodeintExit code the script returned

Examples

Run custom powershell command

powershell('Get-WmiObject -Class Win32_volume -Filter "DriveType=3"| Select Label') {
stdout == /PAGEFILE/
stderr == ''
}

Check the timezone

powershell('tzutil /g') {
stdout.trim == 'GMT Standard Time'
stderr == ''
}