blob: 6f27191ff50fae967a43757f008f27036c42c4ef [file] [edit]
id: win-policy
mode: VALIDATION
resourceGroups:
- resources:
exec:
validate:
interpreter: POWERSHELL
# An exit code 100 to indicates that exec resource is already in desired state.
# An exit code of 101 to indicate that exec resource is not in desired state.
script: |
$service = Get-Service -Name 'WinRM'
if ($service.Status -eq 'Running') {exit 100} else {exit 101}
id: test-powershell