Last Updated on December 13, 2021 by rudyooms
This blog will be about how to block access to the CMD, PowerShell, and registry tools within a few seconds!
I will divide this blog into multiple parts
1. Why you want to block PowerShell
There are many reasons for IT pros to allow those administrative tools like PowerShell, but I am not one of them. Please take a look at my blog to learn about the “why” and the “how”
2. Searching in Intune for Education Portal
Unfortunately there is no simple GUI option to block the Command Prompt/Windows Powershell and Regedit in Intune Guess what? That’s wrong.
You can make sure these apps can be denied. To do so, open the Education Education Intune portal instead of the normal Intune portal.
And click on: Groups –> All Devices (or create a custom group) –> Settings –>Windows Device Settings –> Apps –> Block Access to Administrative Apps
Guess what it does? It just creates a pre-build custom Applocker policy in your normal Intune Portal, nothing more!
Looking at the Applocker policy and the OMA-URI you will notice it uses the Applocker CSP
Let’s open the XML config, you will notice it blocks the apps with a FilePublisherCondition and allows the all the other executables. The link to the XML config (converted it to txt)
Testing it from a client. You will get an Applocker Notification, the App has been blocked.
This is a nice Appocker policy to start with! but if you want to expand it you could take a look at this blog
It’s nice to see there is a nice GUI to implement a simple Applocker policy to block these Administrative Apps. Of course, it’s much better to create a complete Applocker policy to prevent ransomware infections and blocking other Exe files. It is a perfect solution to start with, and with a deep impact!