The Get PowerShell Scripts operation will retrieve a list of all the available PowerShell Script templates.
Request
Request URI
Method | Request URI |
---|---|
GET | https://{company-name}.helloid.com/api/v1/selfservice/powershellscripts |
Request parameters
Parameter | Description |
---|---|
{company-name} | The company name of the target company |
Request headers
None.
Response
Response status
Code | Description |
---|---|
200(OK) | Indicates that the operation was successful. |
400(BAD REQUEST) | Indicates that the operation was not successful. There were validation errors or the request body was malformed. |
401(UNAUTHORIZED) | Indicates that no authentication header was given or the api key and secret were invalid. If the api key and secret were valid check the configuration in your portal, it is possibilty these were IP restricted or are disabled. |
Please also see common HTTP status codes.
Sample response body
[
{
"powerShellGUID": "6f1d6106-6c8b-4faa-b0ad-4303b45c1ab2",
"name": "userscript",
"options": 1,
"enabled": true,
"t4eScript": false,
"script": "Write-host \"Please enter your name:\"\n$userName = read-host\n\"Hello $userName!\""
}
]
Example request with cURL
Replace placeholder values surrounded by {
}
with the actual values.
curl -u {api-key}:{api-secret} -X GET https://{company-name}.helloid.com/api/v1/selfservice/powershellscripts/