deviceShellScript 资源类型

命名空间:microsoft.graph

重要提示:Microsoft 支持 Intune/beta API,但它们可能会进行更频繁的更改。 Microsoft 建议尽可能使用 v1.0 版本。 使用版本选择器检查 API 在版本 v1.0 中的可用性。

注意:适用于 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 设备管理脚本的名称。
description String 设备管理脚本的可选说明。
scriptContent Binary 脚本内容。
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"
  ]
}