Pushing PowerShell scripts – scripted actions to endpoints
If there is no policy for the configuration change that you need to make on your corporate devices, you can leverage PowerShell scripts in Microsoft Intune. This is also a good way of publishing one-time installations or custom-scripted actions to both your physical and cloud endpoints. In this scenario, we will configure Set time zone automatically to On. It also requires location services to be turned on. Take a look at Chapter 16 to see how to enable location services on your devices.
Figure 10.57: Set time zone automatically is set to Off
We can leverage a PowerShell script option to configure the registry value that changes it to On as there is currently no Windows policy to configure it:
- In the Microsoft Intune admin center, browse to Home | Devices | Windows | Scripts | Platform scripts and click Add:
Figure 10.58: PowerShell scripts
- Click Select a file to upload...