deviceManagementScript 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 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.
Device management
assign action None Not yet documented
Policy Set
hasPayloadLinks action hasPayloadLinkResultItem collection Not yet documented

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.
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.
enforceSignatureCheck Boolean Indicate whether the script signature needs be checked.
fileName String Script file name.
roleScopeTagIds String collection List of Scope Tag IDs for this PowerShellScript instance.
runAs32Bit Boolean A value indicating whether the PowerShell script should run as 32-bit

Relationships

Relationship Type Description
Device management
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.deviceManagementScript",
  "id": "String (identifier)",
  "displayName": "String",
  "description": "String",
  "scriptContent": "binary",
  "createdDateTime": "String (timestamp)",
  "lastModifiedDateTime": "String (timestamp)",
  "runAsAccount": "String",
  "enforceSignatureCheck": true,
  "fileName": "String",
  "roleScopeTagIds": [
    "String"
  ],
  "runAs32Bit": true
}