deviceShellScript 资源类型

命名空间:microsoft.graph

重要: /beta 版本下的 Microsoft Graph API 可能会更改;不支持生产使用。

注意:适用于 Intune 的 Microsoft Graph API 需要适用于租户的活动 Intune 许可证

Intune将为客户提供在已注册的 Mac OS 设备上运行其 Shell 脚本的能力。 脚本可以运行一次,也可以定期运行。

方法

方法 返回类型 说明
列出 deviceShellScripts deviceShellScript 集合 列出 deviceShellScript 对象的属性和关系。
获取 deviceShellScript deviceShellScript 读取 deviceShellScript 对象的属性和关系。
创建 deviceShellScript deviceShellScript 创建新的 deviceShellScript 对象。
删除 deviceShellScript 删除 deviceShellScript
更新 deviceShellScript deviceShellScript 更新 deviceShellScript 对象的属性。
分配操作

属性

属性 类型 说明
executionFrequency 持续时间 脚本的运行间隔。 如果未定义,脚本将运行一次
retryCount Int32 脚本在失败时重试的次数
blockExecutionNotifications 布尔值 不通知用户正在执行脚本
id String 设备管理脚本的唯一标识符。
displayName String 设备管理脚本的名称。
说明 String 设备管理脚本的可选说明。
scriptContent 二进制 脚本内容。
createdDateTime DateTimeOffset 创建设备管理脚本的日期和时间。 此属性是只读的。
lastModifiedDateTime DateTimeOffset 上次修改设备管理脚本的日期和时间。 此属性是只读的。
runAsAccount runAsAccountType 指示执行上下文的类型。 可取值为:systemuser
fileName String 脚本文件名。
roleScopeTagIds 字符串集合 此 PowerShellScript 实例的范围标记 ID 列表。

关系

关系 类型 说明
groupAssignments deviceManagementScriptGroupAssignment 集合 设备管理脚本的组分配列表。
assignments deviceManagementScriptAssignment 集合 设备管理脚本的组分配列表。
runSummary deviceManagementScriptRunSummary 运行设备管理脚本的摘要。
deviceRunStates deviceManagementScriptDeviceState 集合 此脚本在所有设备上运行状态的列表。
userRunStates deviceManagementScriptUserState 集合 此脚本在所有用户中的运行状态列表。

JSON 表示形式

下面是资源的 JSON 表示形式。

{
  "@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"
  ]
}