Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: microsoft.graph
Important: Microsoft supports Intune /beta APIs, but they are subject to more frequent change. Microsoft recommends using version v1.0 when possible. Check an API's availability in version v1.0 using the Version selector.
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.
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 |
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. |
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. |
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"
]
}
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in