Skip to content

Instantly share code, notes, and snippets.

@syedhassaanahmed
Last active September 13, 2017 00:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syedhassaanahmed/af5bd67bbadf86d753e31a50430d287c to your computer and use it in GitHub Desktop.
Save syedhassaanahmed/af5bd67bbadf86d753e31a50430d287c to your computer and use it in GitHub Desktop.
Shell Launcher
# 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