Custom Assessment and Remediation
Enhanced Control on Executing PowerShell Scripts
3
Enhanced Control on Executing PowerShell Scripts
Qualys CAR 1.5 adds a new optional parameter to bypass the PowerShell execution policy
set on the host; thereby, enabling you to have complete control on executing PowerShell
scripts on the hosts via Qualys CAR.
Input Parameter
Note: The “Bypass PowerShell Execution Policy” input parameter does not change the
PowerShell execution policy on a host; it only bypasses the policy for script execution.
Sample: Bypass the PowerShell Execution Policy Set on the Host
API Request:
curl --location --request POST
https://gateway.xxx.eng.xxx.qualys.com/sm/v1/scripts/72648/execute\
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"testMode": false,
"assetIds": [
"<ASSET ID>"
],
"assetTagIds": [],
"excludedAssetIds": [],
"executionPolicyBypassEnabled": true
}'
APIs affected /sm/v1/scripts/{scriptId}/execute
/sm/v1/scripts/scheduler
New or Updated API Updated
DTD or XSD changes Not Applicable
executionPolicyBypassEnabled
(Boolean)
(Optional) Bypass the PowerShell execution policy set on the
Windows host. When you set the input value to ’true’, scripts
are executed irrespective of the PowerShell execution policy
set on the host. However, if you do not provide this input
parameter, or if you set the input value to ‘false’, CAR honors
the PowerShell execution policy set on the host for script
execution.
This input parameter is applicable only for Windows
PowerShell script execution.