Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # PowerShell script to enable Kiosk mode with the Multi-App Launcher in Windows 11
- # More details here https://woshub.com/configure-kiosk-mode-windows/
- $MultiKioskModeConfig= @"
- <?xml version="1.0" encoding="utf-8" ?>
- <AssignedAccessConfiguration
- xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config" xmlns:win11="http://schemas.microsoft.com/AssignedAccess/2022/config">
- <Profiles>
- <Profile Id="{579c1e63-dccc-4403-a565-86b1f5db5fdd}">
- <AllAppsList>
- <AllowedApps>
- <App AppUserModelId="MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe!App" />
- <App AppUserModelId="Microsoft.AutoGenerated.{F391E5DB-C1EE-FAE0-7D6A-37A5D5DC94FA}" />
- <App AppUserModelId="windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" />
- <App ClassicAppPath="%ProgramFiles(x86)%\HOBLink\Configs\sessiona.hlk" />
- <App ClassicAppPath="%ProgramFiles(x86)%\HOBLink\Configs\sessionb.hlk" />
- <App ClassicAppPath="%ProgramFiles(x86)%\HOBLink\Configs\sessionc.hlk" />
- </AllowedApps>
- </AllAppsList>
- <win11:StartPins>
- <![CDATA[
- { "pinnedList":[
- {"packagedAppId":"MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe!App"},
- {"packagedAppId":"windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel"},
- {"packagedAppId":"%ProgramFiles(x86)%\HOBLink\HL3270\Hoblink.exe"},
- {"packagedAppId":"%ProgramFiles(x86)%\HOBLink\Configs\sessiona.hlk"},
- {"packagedAppId":"%ProgramFiles(x86)%\HOBLink\Configs\sessionb.hlk"},
- {"packagedAppId":"%ProgramFiles(x86)%\HOBLink\Configs\sessionc.hlk"}
- ] }
- ]]>
- </win11:StartPins>
- <Taskbar ShowTaskbar="true"/>
- </Profile>
- </Profiles>
- <Configs>
- <Config>
- <AutoLogonAccount/>
- <DefaultProfile Id="{579c1e63-dccc-4403-a565-86b1f5db5fdd}"/>
- </Config>
- </Configs>
- </AssignedAccessConfiguration>
- "@
- $namespaceName="root\cimv2\mdm\dmmap"
- $className="MDM_AssignedAccess"
- $obj = Get-CimInstance -Namespace $namespaceName -ClassName $className
- $obj.Configuration = [System.Net.WebUtility]::HtmlEncode($MultiKioskModeConfig)
- Set-CimInstance -CimInstance $obj
- # Turn off and clean up the Multi-App Kiosk mode settings in Windows 11
- # $obj = Get-CimInstance -Namespace "root\cimv2\mdm\dmmap" -ClassName "MDM_AssignedAccess"
- # $obj.Configuration = $NULL
- # Set-CimInstance -CimInstance $obj
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement