From 537ac829d845f9c8a7a99c0fcd695a328570ce2b Mon Sep 17 00:00:00 2001 From: Brian Lich Date: Thu, 21 Apr 2016 15:33:00 -0700 Subject: [PATCH] fixed Powershell script conversion issue --- ...osk-for-windows-10-for-desktop-editions.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/windows/manage/set-up-a-kiosk-for-windows-10-for-desktop-editions.md b/windows/manage/set-up-a-kiosk-for-windows-10-for-desktop-editions.md index e4d8f2ceb8..33d52851d1 100644 --- a/windows/manage/set-up-a-kiosk-for-windows-10-for-desktop-editions.md +++ b/windows/manage/set-up-a-kiosk-for-windows-10-for-desktop-editions.md @@ -291,16 +291,16 @@ Alternatively, you can turn on Shell Launcher using the Deployment Image Servici Modify the following PowerShell script as appropriate and run the script on the kiosk device. ``` - $COMPUTER = "localhost" - $NAMESPACE = "root\standardcimv2\embedded" + $COMPUTER = “localhost” + $NAMESPACE = “root\standardcimv2\embedded” # Create a handle to the class instance so we can call the static methods. - $ShellLauncherClass = [wmiclass]"\\$COMPUTER\${NAMESPACE}:WESL_UserSetting" + $ShellLauncherClass = [wmiclass]”\\$COMPUTER\${NAMESPACE}:WESL_UserSetting” # This well-known security identifier (SID) corresponds to the BUILTIN\Administrators group. - $Admins_SID = "S-1-5-32-544" + $Admins_SID = “S-1-5-32-544” # Create a function to retrieve the SID for a user account on a machine. @@ -310,12 +310,12 @@ Modify the following PowerShell script as appropriate and run the script on the $NTUserSID = $NTUserObject.Translate([System.Security.Principal.SecurityIdentifier]) return $NTUserSID.Value - + } - # Get the SID for a user account named "Cashier". Rename "Cashier" to an existing account on your system to test this script. + # Get the SID for a user account named “Cashier”. Rename “Cashier” to an existing account on your system to test this script. - $Cashier_SID = Get-UsernameSID("Cashier") + $Cashier_SID = Get-UsernameSID(“Cashier”) # Define actions to take when the shell program exits. @@ -327,32 +327,32 @@ Modify the following PowerShell script as appropriate and run the script on the # Set the command prompt as the default shell, and restart the device if it's closed. - $ShellLauncherClass.SetDefaultShell("cmd.exe", $restart_device) + $ShellLauncherClass.SetDefaultShell(“cmd.exe”, $restart_device) # Display the default shell to verify that it was added correctly. $DefaultShellObject = $ShellLauncherClass.GetDefaultShell() - "`nDefault Shell is set to " + $DefaultShellObject.Shell + " and the default action is set to " + $DefaultShellObject.defaultaction + “`nDefault Shell is set to “ + $DefaultShellObject.Shell + “ and the default action is set to “ + $DefaultShellObject.defaultaction - # Set Internet Explorer as the shell for "Cashier", and restart the machine if it's closed. + # Set Internet Explorer as the shell for “Cashier”, and restart the machine if it's closed. - $ShellLauncherClass.SetCustomShell($Cashier_SID, "c:\program files\internet explorer\iexplore.exe www.microsoft.com", ($null), ($null), $restart_shell) + $ShellLauncherClass.SetCustomShell($Cashier_SID, “c:\program files\internet explorer\iexplore.exe www.microsoft.com”, ($null), ($null), $restart_shell) # Set Explorer as the shell for administrators. - $ShellLauncherClass.SetCustomShell($Admins_SID, "explorer.exe") + $ShellLauncherClass.SetCustomShell($Admins_SID, “explorer.exe”) # View all the custom shells defined. - "`nCurrent settings for custom shells:" + “`nCurrent settings for custom shells:” Get-WmiObject -namespace $NAMESPACE -computer $COMPUTER -class WESL_UserSetting | Select Sid, Shell, DefaultAction # Enable Shell Launcher $ShellLauncherClass.SetEnabled($TRUE) - "`nEnabled is set to " + $DefaultShellObject.IsEnabled() + “`nEnabled is set to “ + $DefaultShellObject.IsEnabled() # Remove the new custom shells.