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:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config" xmlns:default="http://schemas.microsoft.com/AssignedAccess/2017/config" xmlns:rs5="http://schemas.microsoft.com/AssignedAccess/201810/config" xmlns:v3="http://schemas.microsoft.com/AssignedAccess/2020/config" xmlns:v5="http://schemas.microsoft.com/AssignedAccess/2022/config">
- <Profiles>
- <Profile Id="{9A2A490F-10F6-4764-974A-43B19E722C23}">
- <AllAppsList>
- <AllowedApps>
- <App AppUserModelId="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
- <App AppUserModelId="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
- <App DesktopAppPath="%windir%\explorer.exe" />
- <App AppUserModelId="windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" />
- <App AppUserModelId="%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe" />
- </AllowedApps>
- </AllAppsList>
- <rs5:FileExplorerNamespaceRestrictions>
- <rs5:AllowedNamespace Name="Downloads" />
- <v3:AllowRemovableDrives />
- </rs5:FileExplorerNamespaceRestrictions>
- <v5:StartPins><![CDATA[{
- "pinnedList":[
- {"packagedAppId":"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App"},
- {"packagedAppId":"Microsoft.Windows.Photos_8wekyb3d8bbwe!App"},
- {"desktopAppLink":"%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\File Explorer.lnk"},
- {"packagedAppId": "windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel"},
- {"desktopAppLink": "%ALLUSERSPROFILE%\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Edge.lnk"},
- ]
- }]]></v5:StartPins>
- <Taskbar ShowTaskbar="true" />
- </Profile>
- </Profiles>
- <Configs>
- <Config>
- <AutoLogonAccount/>
- <DefaultProfile Id="{c79c6e82-283e-47f7-8460-5cad6d5016c3}"/>
- </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