# Define actions to take when the shell program exits. $Cashier_SID = Get-UsernameSID('bbwallonepeop') Rename 'Cashier' to an existing account on your system to test this script. # Get the SID for a user account named 'Cashier'. $NTUserObject = New-Object ($AccountName) # Create a function to retrieve the SID for a user account on a machine. # This well-known security identifier (SID) corresponds to the BUILTIN\Administrators group. $ShellLauncherClass = '\\$COMPUTER\$:WESL_UserSetting'
# Create a handle to the class instance so we can call the static methods. $NAMESPACE = 'root\standardcimv2\embedded' So there is something happening, the explorer.exe isn't starting anymore (not even for admins, even though it should start for admins) but Skype isn't starting :/Īny ideas? Here the full script: $COMPUTER = 'localhost' When I run the script, the only thing I see when I log on is a black screen, then I can use ctrl+alt+del to start the Taskmanager, then open the explorer and find the powershell exe to run a disabling script. $ShellLauncherClass.SetCustomShell($Cashier_SID, 'C:\Program Files (x86)\Microsoft Office\Office16\lync.exe', ($null), ($null), $restart_shell)īut it doesn't start Skype, it doesn't work with any other app either. I replaced the following lines: $Cashier_SID = Get-UsernameSID('bbwallonepeop') I would like to run Skype for Business in Kiosk mode, therefore I use the same script as he does, but mine doesn't work.