maciejrebisz.com

IT

Microsoft Intune Management Extension – Cloud First

maximios June 2, 2023

One of the thing that have been missing in Intune is PowerShell support to do custom scripting and with Microsoft Intune Management Extension is preview this will be possible. It was just announced by Microsoft at Ignite in Orlando and will be enabled in tenants later this year. It is in preview so this may be chancing over time.

There is so many possibilities when we can do PowerShell then it is only your fantasy that sets the limits.

So how does this work – when a Powershell script is assigned to a user or a device the Intune MDM channel will install a MSI with the Microsoft Intune Management Extension agent and the it will be self-updating by Intune.

Lets take a look at how it is working.

This is an example for a use case of Microsoft Intune Management Extension where we need to disable SMBv1 on our Windows 10 devices.

So it is a simple PowerShell Script that only runs a command

When we have our PowerShell script we can go into the Intune management portal and click on Device configuration the select PowerShell Scripts

Click Add Script

We have to give it a name and then we can upload our Powershell Script

Find the Powershell script and get it uploaded to Intune – Note: When the Powershell script is uploaded you cannot change it or see the content.

Then click on Settings

In the settings there is only two settings:

Run this scripts using the logged on credentials:

The default value is no, that means that the PowerShell is running in the context as system, so you have to be careful of what you are doing. If you change it to yes – then it will run in the users context an example on this can be to change regkeys in the users profil.

Enforce scripts signatur check:

The default is no, but if your script are signed and your company policies said that all PowerShell have to be signed then you have to change this to yes.

Then you just have to assign to users or devices group.

When the devices is sync with Intune the next time the Microsoft Intune Management Extension agent will be installed on the device. Intune will the keep this MSI installed update at all time.

When Microsoft Intune Management Extension is installed you can see all the files in: C:\Program Files (x86)\Microsoft Intune Management Extension

And logfiles will be at : C:\ProgramData\Microsoft\IntuneManagementExtension\Logs

When we take a look at the IntuneManagementExtension.log you can see who you PowerShell script is running on the device and example is that the agentxecutor.exe is running the PowerShell script you have uploaded – note that it is not the name of the PowerShell script but a GUID.

C:\Program Files (x86)\Microsoft Intune Management Extension\agentexecutor.exe -powershell “C:\Program Files (x86)\Microsoft Intune Management Extension\Policies\Scripts\44cd8da3-8f37-49e0-aa01-93c7179969d1_2943490d-ba3d-43b6-971e-d3f7324513df.ps1”

We can also see the content of the PowerShell when as been running on the device and if it has been running with Success or if it has failed.

In the AgentExecutor.log we can see all what the Agent are doing on the device

You can also see in the local event viewer to see what the PowerShell scripts are doing

In the Intune portal we can monitor the PowerShell scripts on a device or user level.

The Microsoft Intune Management Extension is a great way of overcome the missing functionality of MDM management.

Now we can install all software on a MDM managed Windows 10 with Intune. Think on Chocolatey that is a PowerShell packages manager.

Related Posts

IT /

Intune – Windows device enrollment restrictions – Cloud First

IT /

How to add “hidden” Windows UWP to Windows Store for Business – Cloud First

IT /

Office 2016 Active Directory-Based activation – Cloud First

‹ Windows 10 resources – Cloud First › How to setup Azure AD Privileged Identity Management (PIM) – Cloud First

Recent Posts

  • Intune – Windows device enrollment restrictions – Cloud First
  • How to add “hidden” Windows UWP to Windows Store for Business – Cloud First
  • Office 2016 Active Directory-Based activation – Cloud First
  • How to deploy Windows Local Experience Packs with Intune – Cloud First
  • Conditional Access for Outlook Web Access (OWA) – Cloud First

Recent Comments

No comments to show.

Archives

  • November 2025
  • October 2025
  • August 2025
  • July 2025
  • June 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • November 2024
  • September 2024
  • July 2024
  • June 2024
  • March 2024
  • December 2023
  • August 2023
  • June 2023
  • March 2023
  • February 2023
  • December 2022
  • September 2022
  • August 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • January 2022
  • December 2021
  • October 2021
  • September 2021
  • August 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • February 2020
  • January 2020
  • December 2019
  • October 2019
  • September 2019
  • June 2019
  • April 2019
  • March 2019
  • February 2019
  • March 2018
  • February 2018
  • December 2017
  • October 2017
  • August 2017

Categories

  • IT

Back to Top

© maciejrebisz.com 2026
Powered by WordPress • Themify WordPress Themes