Macros 编辑

Endpoint Management provides macros as a way to populate user or device property data within the text field of the following items:

  • Policies
  • Notifications
  • Enrollment templates
  • Device configuration XML file
  • Automated actions
  • Credential provider Certificate Signing Requests

Endpoint Management replaces a macro with the corresponding user or system values. For example, you can prepopulate the mailbox value for a user in a single Exchange profile across thousands of users.

Macro syntax

A macro can take the following form:

  • ${type.PROPERTYNAME}
  • ${type.PROPERTYNAME ['DEFAULT VALUE'] [ | FUNCTION [(ARGUMENT1, ARGUMENT2)]}

Enclose all syntax following the dollar sign ($) in curly brackets ({ }).

  • Qualified property names reference either a user property, a device property, or a custom property.
  • Qualified property names consist of a prefix, followed by the actual property name.
  • User properties take the form ${user.[PROPERTYNAME] (prefix="user.")}.
  • Device properties take the form ${device.[PROPERTYNAME] (prefix="device.")}.
  • Property names are case-sensitive.
  • A function can be a limited list or a link to a third-party reference that defines functions. This macro for a notification message includes the function firstnotnull:

Device ${firstnotnull(device.TEL_NUMBER,device.serialNumber)} has been blocked…

  • For custom macros (properties that you define), the prefix is ${custom}. You can omit the prefix.

Here’s an example of a commonly used macro, ${user.username}, that populates the user name value in the text field of a policy. This macro is useful for configuring Exchange ActiveSync profiles and other profiles used by multiple users. The following example shows how to use macros in an Exchange policy. The macro for User is ${user.username}. The macro for Email address is ${user.mail}.

Macro in Device Policy configuration screen

The following example shows how to use macros for a certificate signing request. The macro for Subject name is CN=$user.username. The macro for the Value of a Subject alternative name is $user.userprincipalname.

Macro in Credential Providers configuration screen

The following example shows how to use macros in a notification template. The example template defines the message sent to a user when HDX applications are blocked because of a non-compliant device. The macro for the Message is:

Device ${firstnotnull(device.TEL_NUMBER,device.serialNumber)} no longer complies with the device policy and HDX applications will be blocked.

Macro in Notification Templates configuration screen

For more examples of macros used in notifications, go to Settings > Notification Templates, select a pre-defined template, and click Edit.

The following example shows a macro in the Device Name device policy. You can type a macro, a combination of macros, or a combination of macros and text to name each device uniquely. For example, use ${device.serialnumber} to set the device names to the serial number of each device. Use ${device.serialnumber} ${ user.username } to include the user name in the device name. The Device Name device policy works on supervised iOS and macOS devices.

Macro in Device Policy configuration screen

Macros for default notification templates

You can use the following macros in the default notification templates:

  • ${account.SUPPORT_EMAIL}
  • ${applicationName}
  • ${enrollment.andriod.agent.download.url}
  • ${enrollment.ios.agent.download.url}
  • ${enrollment.pin}
  • ${enrollment.url}
  • ${enrollment.urls}
  • ${enrollment.ios.url}
  • ${enrollment.macos.url}
  • ${enrollment.android.url}
  • ${enrollment.ios.platform}
  • ${enrollment.macos.platform}
  • ${enrollment.android.platform}
  • ${firstnotnull(device.TEL_NUMBER,device.serialNumber)}
  • ${firstnotnull(device.TEL_NUMBER,user.mobile)}
  • ${outofcompliance.reason(smg_block)}
  • ${outofcompliance.reason(whitelist_blacklist_apps_name)}
  • ${vpp.account}
  • ${vpp.appname}
  • ${vpp.url}
  • ${zdmserver.hostPath}/enroll

Note:

The Endpoint Management console includes the terms “blacklist” and “whitelist”. We are changing those terms in an upcoming release to “block list” and “allow list”.

This example shows how to create a notification that includes enrollment URLs for multiple device platforms. The macro for the Message is:

${enrollment.urls}

Notification Template settings screen

These examples show how to create messages for notifications that prompt the users to click the enrollment URL for their device platforms:

Example 1:

To enroll, click the link below that applies to your device platform:

${enrollment.ios.platform} - ${enrollment.ios.url}

${enrollment.macos.platform} - ${enrollment.macos.url}

${enrollment.android.platform} - ${enrollment.android.url}

<!--NeedCopy-->

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:55 次

字数:8391

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文