Book Image

Microsoft Intune Cookbook

By : Andrew Taylor
Book Image

Microsoft Intune Cookbook

By: Andrew Taylor

Overview of this book

Microsoft Intune is a cloud-managed mobile device management (MDM) tool that empowers you to manage your end-user device estate across various platforms. While it is an excellent platform, the initial setup and configuration can be a daunting process, and mistakes made early on can be more challenging to resolve later. This book addresses these issues by guiding you through the end-to-end configuration of an Intune environment, incorporating best practices and utilizing the latest functionalities. In addition to setting up your environment, you’ll delve into the Microsoft Graph platform to understand the underlying mechanisms behind the web GUI. This knowledge will enable you to automate a significant portion of your daily tasks using PowerShell. By the end of this book, you’ll have established an Intune environment that supports Windows, Apple iOS, Apple macOS, and Android devices. You’ll possess the expertise to add new configurations, policies, and applications, tailoring an environment to your specific requirements. Additionally, you’ll have the ability to troubleshoot any issues that may arise and package and deploy your company applications. Overall, this book is an excellent resource for anyone who wants to learn how to use Microsoft Intune to manage their organization's end-user devices.
Table of Contents (17 chapters)

Deploying Platform scripts

We will start with the original option, which has been available in Intune for longer than the rest. Platform scripts run once on the device and can run in the system or user context. By default, they run in 32-bit mode, but this can be changed on deployment. This is important to note as environmental variables will differ accordingly for both system/user and 32/64-bit.

To find out more about User/System targeting, go to https://andrewstaylor.com/2022/11/22/intune-comparing-system-vs-user-for-everything/.

When running during Autopilot, there is no labeled step where scripts run – they run when it says Preparing apps in User or Device setup. If you hit a time-out issue here, it is more than likely a failed PowerShell script that has not reported a success code in time.

To troubleshoot and view the output of a script, retrieve the script ID from the address bar in the Intune portal. The output will be in the following location under a subkey...