Last active
September 13, 2017 00:37
-
-
Save syedhassaanahmed/af5bd67bbadf86d753e31a50430d287c to your computer and use it in GitHub Desktop.
Shell Launcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get Custom Shell | |
Get-WmiObject -namespace root\standardcimv2\embedded -computer localhost -class WESL_UserSetting | Select * | |
# Remove Custom Shell for SID | |
([wmiclass]"\\localhost\root\standardcimv2\embedded:WESL_UserSetting").RemoveCustomShell("<User SID>") | |
# Is Custom Shell Enabled | |
([wmiclass]"\\localhost\root\standardcimv2\embedded:WESL_UserSetting").IsEnabled() | |
# Disable Custom Shell | |
([wmiclass]"\\localhost\root\standardcimv2\embedded:WESL_UserSetting").SetEnabled($FALSE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment