Skip to content

Instantly share code, notes, and snippets.

@scanbix
Last active April 16, 2021 10:11
Show Gist options
  • Save scanbix/9c9517d7c3ddb5c8d8ec6329ed4a6fc7 to your computer and use it in GitHub Desktop.
Save scanbix/9c9517d7c3ddb5c8d8ec6329ed4a6fc7 to your computer and use it in GitHub Desktop.
-- Old powershell version call from command task in infa
powershell -executionpolicy bypass -File "$PMRootDir\check_directory_access_infa.ps1" > "$PMRootDir\check_directory_access_infa.log" 2>&1
-- PowerShell exit sample code
# some logic to set $hasError variable.
if ($hasError) {
Write-Host has errors
exit 1
} else {
Write-Host no errors
exit 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment