Skip to content

Instantly share code, notes, and snippets.

@toddboyd
Created June 15, 2021 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toddboyd/c0e79f7540209538e44dc3a53f914650 to your computer and use it in GitHub Desktop.
Save toddboyd/c0e79f7540209538e44dc3a53f914650 to your computer and use it in GitHub Desktop.
Run Apex PowerShell Script
# Run apex script
Write-Host -ForegroundColor green "Running apex script..."
& sfdx force:apex:execute -u $orgName -f [apex script]
if ($LASTEXITCODE -ne 0) {
exit 1
}
Write-Host ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment