POST
/
v1
/
computer
/
{machine_id}
/
shell
/
powershell
/
exec
Execute PowerShell command
curl --request POST \
  --url https://api.cyberdesk.io/v1/computer/{machine_id}/shell/powershell/exec \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "command": "<string>",
  "same_session": true,
  "working_directory": "<string>",
  "session_id": "<string>"
}'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

machine_id
string
required

Body

application/json
command
string
required

PowerShell command to execute

same_session
boolean
default:true

Use persistent session

working_directory
string | null

Working directory for new session

session_id
string | null

Session ID to use

Response

Successful Response

The response is of type object.