deviceShellScript resource type

Namespace: microsoft.graph

Important: Microsoft Graph APIs under the /beta version are subject to change; production use is not supported.

Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.

Intune will provide customer the ability to run their Shell scripts on the enrolled Mac OS devices. The script can be run once or periodically.

Methods

Method Return Type Description
List deviceShellScripts deviceShellScript collection List properties and relationships of the deviceShellScript objects.
Get deviceShellScript deviceShellScript Read properties and relationships of the deviceShellScript object.
Create deviceShellScript deviceShellScript Create a new deviceShellScript object.
Delete deviceShellScript None Deletes a deviceShellScript.
Update deviceShellScript deviceShellScript Update the properties of a deviceShellScript object.
assign action None

Properties

Property Type Description
executionFrequency Duration The interval for script to run. If not defined the script will run once
retryCount Int32 Number of times for the script to be retried if it fails
blockExecutionNotifications Boolean Does not notify the user a script is being executed
id String Unique Identifier for the device management script.
displayName String Name of the device management script.
description String Optional description for the device management script.
scriptContent Binary The script content.
createdDateTime DateTimeOffset The date and time the device management script was created. This property is read-only.
lastModifiedDateTime DateTimeOffset The date and time the device management script was last modified. This property is read-only.
runAsAccount runAsAccountType Indicates the type of execution context. Possible values are: system, user.
fileName String Script file name.
roleScopeTagIds String collection List of Scope Tag IDs for this PowerShellScript instance.

Relationships

Relationship Type Description
groupAssignments deviceManagementScriptGroupAssignment collection The list of group assignments for the device management script.
assignments deviceManagementScriptAssignment collection The list of group assignments for the device management script.
runSummary deviceManagementScriptRunSummary Run summary for device management script.
deviceRunStates deviceManagementScriptDeviceState collection List of run states for this script across all devices.
userRunStates deviceManagementScriptUserState collection List of run states for this script across all users.

JSON Representation

Here is a JSON representation of the resource.

{
  "@odata.type": "#microsoft.graph.deviceShellScript",
  "executionFrequency": "String (duration)",
  "retryCount": 1024,
  "blockExecutionNotifications": true,
  "id": "String (identifier)",
  "displayName": "String",
  "description": "String",
  "scriptContent": "binary",
  "createdDateTime": "String (timestamp)",
  "lastModifiedDateTime": "String (timestamp)",
  "runAsAccount": "String",
  "fileName": "String",
  "roleScopeTagIds": [
    "String"
  ]
}