deviceManagementScript resource type

Note: Using the Microsoft Graph APIs to configure Intune controls and policies still requires that the Intune service is correctly licensed by the customer.

Intune will provide customer the ability to run their Powershell scripts on the enrolled windows 10 Azure Active Directory joined devices. The script can be run once or periodically.

Methods

Method Return Type Description
List deviceManagementScripts deviceManagementScript collection List properties and relationships of the deviceManagementScript objects.
Get deviceManagementScript deviceManagementScript Read properties and relationships of the deviceManagementScript object.
Create deviceManagementScript deviceManagementScript Create a new deviceManagementScript object.
Delete deviceManagementScript None Deletes a deviceManagementScript.
Update deviceManagementScript deviceManagementScript Update the properties of a deviceManagementScript object.
assign action None Not yet documented
List deviceManagementScriptGroupAssignments deviceManagementScriptGroupAssignment collection Get the deviceManagementScriptGroupAssignments from the groupAssignments navigation property.
List deviceManagementScriptStates deviceManagementScriptState collection Get the deviceManagementScriptStates from the runStates navigation property.

Properties

Property Type Description
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.
runSchedule runSchedule The the interval for script to run. If not defined the script will run once
scriptContent String The base64 encoded script text.
createdDateTime DateTimeOffset The date and time the device management script was created.
lastModifiedDateTime DateTimeOffset The date and time the device management script was last modified.
runAsAccount String Indicates the type of execution context the device management script runs in. Possible values are: system, user.

Relationships

Relationship Type Description
groupAssignments deviceManagementScriptGroupAssignment collection The list of group assignments for the device management script.
runStates deviceManagementScriptState collection List of execution statuses for this script across all devices.

JSON Representation

Here is a JSON representation of the resource.

{
  "@odata.type": "#microsoft.graph.deviceManagementScript",
  "id": "String (identifier)",
  "displayName": "String",
  "description": "String",
  "runSchedule": {
    "@odata.type": "microsoft.graph.runSchedule"
  },
  "scriptContent": "String",
  "createdDateTime": "String (timestamp)",
  "lastModifiedDateTime": "String (timestamp)",
  "runAsAccount": "String"
}