Entfernen der Powerhsell aus File-Explorer / DENY USER ACCESS TO POWERSHELL

[Deutsch] Szenario:

Gewünscht ist die Powershell Option aus Explorer (s.Screenshot 1) zu entfernen  - so dass die User Powershell nicht benützen können um durch den Prozessbaum zuzugreifen.

Powershell Log in Scripts müssen aber weiterhin verwendbar sein!!! (Also Applocker wird die Erwartugnen nicht erreichen)

Um Powershell aus Explorer zu entfernen, haben wir folgende Möglichkeit:

  • Unter GP "User Configuration\Administrative Templates\System\Don't run specified Windows applications"

  • Dadurch wird wird der Endbenutzer Powershell aus File Explorer nicht mehr starten können, sowohl aus dem Context Menu als auch die Exe aus File Explorer
  • Logon Scripts, die unter GP "User Configuration\Windows Settings\Scripts (Logon/Logoff)" konfiguriert sind werden weiterhin laufen weil diese von dem System userinit.exe Prozess gestartet werden
  • Powershell.exe wird durch die obere Methode weiterhin aus cmd.exe gestartet werden können.
  • Fileexplorer
  • :

Zugriff aus Context Menu:

[ENGLISH]Scenario:

If you wish to grey out Powershell from the File Explorer – in order for your users not tob e able to navigate through the process tree or use PS you have the below option.

Powershell Login Scripts have to keep working!!! (So…Applocker will not work in this case)

In order to disable Powershell from the File Explorer, we have following option:

  • Adding "powershell.exe" to GP "User Configuration\Administrative Templates\System\Don't run specified Windows applications"
  • Doing this prevents the user from launching powershell from the file explorer start menu, the right-click context menu for powershell scripts, the executable file in file explorer
  • Logon scripts configured in the GP "User Configuration\Windows Settings\Scripts (Logon/Logoff)" will still run because these are launched by the system userinit.exe process
  • powershell.exe can still be launched in cmd.exe
  • File Explorer:

  • Access from Context Menu:

Hope this comes in handy. 

Happy Troubleshooting.