Advertisement
dutch2005

MultiUserKiosk-ClassicAppPath

Jan 16th, 2025
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PowerShell 2.26 KB | Source Code | 0 0
  1. # PowerShell script to enable Kiosk mode with the Multi-App Launcher in Windows 11
  2. # More details here https://woshub.com/configure-kiosk-mode-windows/
  3. $MultiKioskModeConfig= @"
  4. <?xml version="1.0" encoding="utf-8" ?>
  5. <AssignedAccessConfiguration
  6. xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config" xmlns:win11="http://schemas.microsoft.com/AssignedAccess/2022/config">
  7. <Profiles>
  8. <Profile Id="{579c1e63-dccc-4403-a565-86b1f5db5fdd}">
  9. <AllAppsList>
  10. <AllowedApps>
  11. <App AppUserModelId="MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe!App" />
  12. <App AppUserModelId="Microsoft.AutoGenerated.{F391E5DB-C1EE-FAE0-7D6A-37A5D5DC94FA}" />
  13. <App AppUserModelId="windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel" />
  14. <App ClassicAppPath="%ProgramFiles(x86)%\HOBLink\Configs\sessiona.hlk" />
  15. <App ClassicAppPath="%ProgramFiles(x86)%\HOBLink\Configs\sessionb.hlk" />
  16. <App ClassicAppPath="%ProgramFiles(x86)%\HOBLink\Configs\sessionc.hlk" />
  17. </AllowedApps>
  18. </AllAppsList>
  19. <win11:StartPins>
  20. <![CDATA[
  21. { "pinnedList":[
  22. {"packagedAppId":"MicrosoftCorporationII.QuickAssist_8wekyb3d8bbwe!App"},
  23. {"packagedAppId":"windows.immersivecontrolpanel_cw5n1h2txyewy!microsoft.windows.immersivecontrolpanel"},
  24. {"packagedAppId":"%ProgramFiles(x86)%\HOBLink\HL3270\Hoblink.exe"},
  25. {"packagedAppId":"%ProgramFiles(x86)%\HOBLink\Configs\sessiona.hlk"},
  26. {"packagedAppId":"%ProgramFiles(x86)%\HOBLink\Configs\sessionb.hlk"},
  27. {"packagedAppId":"%ProgramFiles(x86)%\HOBLink\Configs\sessionc.hlk"}
  28. ] }
  29. ]]>
  30. </win11:StartPins>
  31. <Taskbar ShowTaskbar="true"/>
  32. </Profile>
  33. </Profiles>
  34. <Configs>
  35. <Config>
  36. <AutoLogonAccount/>
  37. <DefaultProfile Id="{579c1e63-dccc-4403-a565-86b1f5db5fdd}"/>
  38. </Config>
  39. </Configs>
  40. </AssignedAccessConfiguration>
  41. "@
  42. $namespaceName="root\cimv2\mdm\dmmap"
  43. $className="MDM_AssignedAccess"
  44. $obj = Get-CimInstance -Namespace $namespaceName -ClassName $className
  45. $obj.Configuration = [System.Net.WebUtility]::HtmlEncode($MultiKioskModeConfig)
  46. Set-CimInstance -CimInstance $obj
  47. # Turn off and clean up the Multi-App Kiosk mode settings in Windows 11
  48. # $obj = Get-CimInstance -Namespace "root\cimv2\mdm\dmmap" -ClassName "MDM_AssignedAccess"
  49. # $obj.Configuration = $NULL
  50. # Set-CimInstance -CimInstance $obj
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement