Script for w10 kiosk mode

Trying to make a kiosk setup with an AD user. Found this script, but have no idea how to incorporate AD password too


pre class=“wp-block-syntaxhighlighter-code”> commented out as it generated errors, don’t know why"
$LogonDomain = “YourDomainName”
$User = “YourDomainUserAccount”

function Set-KioskMode {

$User = “$($Domain)$($UserName)”.TrimStart(’’)

$obj = Get-CimInstance -Namespace $namespaceName -ClassName $className
$obj.Configuration = @"
<?xml version=“1.0” encoding=“utf-8” ?>
<AssignedAccessConfiguration xmlns=“ttp://”>
<Profile Id="{6a8bebd2-xxxx-4b5e-8e4b-bc8b9421xxxx}">
<App AppUserModelId=“Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge” />
<App DesktopAppPath=“C:\Program Files\Notepad++\Notepad++.exe” />
<![CDATA[<LayoutModificationTemplate xmlns:defaultlayout=“ttp://” xmlns:start=“ttp://” Version=“1” xmlns=“ttp://”>
<LayoutOptions StartTileGroupCellWidth=“6” />
<defaultlayout:StartLayout GroupCellWidth=“6”>
<start:Group Name=“Get Started”>
<start:DesktopApplicationTile Size=“2x2” Column=“2” Row=“0” DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Notepad++.lnk" />
<start:Group Name=“Internet”>
<start:Tile Size=“2x2” Column=“2” Row=“0” AppUserModelID=“Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge” />
<Taskbar ShowTaskbar=“false”/>
<DefaultProfile Id="{6a8bebd2-xxxx-4b5e-8e4b-bc8b9421xxxx}"/>

Set-CimInstance -CimInstance $obj

Set-KioskMode -Domain $LogonDomain -UserName $User

Script source: How to setup Kiosk mode on Windows 10 with AD user Account | Learn [Solve IT] (

Links have been left without a H, as post have a 2 links restriction


Firstly, when posting code in the forum, please can you use the preformatted text </> button. It really helps us with readability, and copying and pasting your code (we don’t have to faff about replacing curly quote marks to get things working).

The author has a couple of links on his site for setting up the auto logon function. Is that what you’re having a problem with?

Ahh was looking for a code option, thx.

Following scipt works in junction with auto login, but it fails starting edge, and i don’t have a clue about the xml part

$LogonDomain = "CCMEXEC"
$User = "Kiosk"
function Set-KioskMode {
$User = "$($Domain)\$($UserName)".TrimStart('\')
$obj = Get-CimInstance -Namespace $namespaceName -ClassName $className
$obj.Configuration = @"
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
        &lt;Profile Id=&quot;{AFF9DA33-AE89-4039-B646-3A5706E92957}&quot;&gt;
            &lt;KioskModeApp AppUserModelId=&quot;Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge&quot;/&gt;
            &lt;DefaultProfile Id=&quot;{AFF9DA33-AE89-4039-B646-3A5706E92957}&quot;/&gt;
Set-CimInstance -CimInstance $obj
Set-KioskMode -Domain $LogonDomain -UserName $User