Deploy Kiosk Modeand Autologon with MPA Tools

Computer Uptime MPA Tools

Deploy Kiosk mode and Autologon with MPA Tools

Welcome back to our extended Kiosk mode series on configuring kiosk mode in Windows 11! We’re thrilled to present the fifth and final installment. Building upon the previously discussed methods, we will demonstrate how to use MPA Tools to deploy Kiosk mode in Windows 11 with the MDM Bridge WMI Provider. And we will set up the Kiosk mode to use an AD user account and the desktop/Win32 version of Edge. We will also deploy PsExec (which is required to execute the script) and we will deploy Autologon.

Downloading PsExec and Autologon

First we will need to download both PsExec and Autologon by Sysinternals.

Creating the PowerShell script

Next, we will save the PowerShell script snippet from above as a PS1 script file that can be deployed. In this example, we will give the script the file name of Set-MDM_AssignedAccess.ps1 and we will save it somewhere locally on the host computer (where MPA Tools is installed).

$Account = “CORP\TestUser1”
$Win32AppPath = “%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe”
$Win32AppArgs = “–kiosk www.velessoftware.com –edge-kiosk-type=public-browsing –no-first-run”
$AssignedAccess = Get-CimInstance -Namespace “root\cimv2\mdm\dmmap” -ClassName “MDM_AssignedAccess”
Add-Type -AssemblyName System.Web

$AssignedAccess.Configuration = [System.Web.HttpUtility]::HtmlEncode(@”
<?xml version=”1.0″ encoding=”utf-8″ ?>
<AssignedAccessConfiguration
xmlns=”http://schemas.microsoft.com/AssignedAccess/2017/config”
xmlns:v4=”http://schemas.microsoft.com/AssignedAccess/2021/config”
>
<Profiles>
<Profile Id=”{AFF9DA33-AE89-4039-B646-3A5706E92957}”>
<KioskModeApp v4:ClassicAppPath=”$($Win32AppPath)” v4:ClassicAppArguments=”$($Win32AppArgs)”/>
<v4:BreakoutSequence Key=”Ctrl+Q”/>
</Profile>
</Profiles>
<Configs>
<Config>
<Account>$($Account)</Account>
<DefaultProfile Id=”{AFF9DA33-AE89-4039-B646-3A5706E92957}”/>
</Config>
</Configs>
</AssignedAccessConfiguration>
“@)

Set-CimInstance -CimInstance $AssignedAccess

Creating the action workflow in MPA Tools

In MPA Tools, select the computers that you would like to deploy Kiosk mode to and then click the Actions button.

A screenshot of a computer Description automatically generated

Select Folder from the action type list. Enter the source folder path in the “1. Select Folders” field or navigate to the folder using the folder icon button. Then next to “2. Select Folder to copy to”, click on the folder icon button.

A screenshot of a computer Description automatically generated

Navigate to the desired destination folder.

A screenshot of a computer Description automatically generated

This will use the host computer (where MPA Tools is installed) as a reference and it will populate the destination field with “\Computername\C$\<Path>”. The path in the destination field can be edited once the root folder is selected. For example; you may want to change the path to \Computername\C$\Program Files\Sysinternals and then when the action is executed, MPA Tools will automatically create the Sysinternals sub folder and then copy the Autologon and PSTools folders beneath it.

Once the destination path has been entered, click the Add button.
A screenshot of a computer Description automatically generated

This will add the folder copy action to the workflow.

A screenshot of a computer Description automatically generated

Adding the PowerShell script to the action workflow

Next, we will add a file copy action to copy the Set-MDM_AssignedAccess.ps1 script to the Kiosk devices. Select File from the action type list. Click the File browse button next to the “1. Select Files” option.

A screenshot of a computer Description automatically generated

Navigate to the Set-MDM_AssignedAccess.ps1 script file and then click Open.

A screenshot of a computer Description automatically generated

Then beside the option “2. Select Folder to copy to”, click on the folder icon button.

A screenshot of a computer Description automatically generated

Navigate to the desired destination folder.

A screenshot of a computer Description automatically generated

This will use the host computer (where MPA Tools is installed) as a reference and it will populate the destination field with “\Computername\C$\<Path>”. The path in the destination field can be edited once the root folder is selected. For example, you may want to change the path to \Computername\C$\Windows\Temp.

Once the destination path has been entered, click the Add button.
A screenshot of a computer Description automatically generated

Next, we will add a CMD script action for executing the PowerShell script using PsExec using the below command line:

“C:\Program Files\Sysinternals\PSTools\PsExec.exe” -s Powershell -ExecutionPolicy Bypass -File C:\Windows\Temp\Set-MDM_AssignedAccess.ps1 -accepteula

In the action list in MPA Tools, select Scripts. Scroll down and expand “Run CMD Scripts”. Then we will enter the above command line. Then click Add.

A computer screen shot of a computer Description automatically generated

Adding Autologon to the action workflow

Next, we will add a CMD script action for automatically enabling Autologon. For this, we will need the silent command syntax for Autologon which is presented by executing Autologon.exe /?

A screenshot of a computer Description automatically generated

Note: as with all Sysinternals tools, the silent command also requires the “/accepteula” parameter which is not shown in the syntax help window. This means that for this example, the full command will be as follows:

“C:\Program Files\Sysinternals\AutoLogon\Autologon.exe” <UserName> <Domain> <Password> /accepteula

In the action list in MPA Tools, select Scripts. Scroll down and expand “Run CMD Scripts”. Then we will enter the Autologon silent command with the username, domain and password specified. Then click Add.

A screenshot of a computer Description automatically generated

Adding a restart to the action workflow

Finally, we will add a computer restart to the workflow. Under the action list select Reboot / Shutdown. Select Restart, enter a comment (this is a message that will be displayed to the end-user on the device) and then click Add.

A screenshot of a computer Description automatically generated

Saving the action workflow

You can save the workflow so that it can be re-used later for any other devices.

A screenshot of a computer Description automatically generated

Specify a file name for the action sequence file and then click Save.

A screenshot of a computer Description automatically generated

The saved action sequence will now appear in the drop-down list. This can be re-loaded at any point.
Note: Each action has a Wait and a Stop button. This allows you to set the action to wait until it is completed before moving on to the next action. And it allows you to stop the action sequence if the action fails. The reboot/shutdown action defaults to “don’t wait” and “don’t stop”.

A screenshot of a computer Description automatically generated

Executing the action workflow

To execute the action workflow, select the computers that you would like to deploy Kiosk mode to and then click the blue play button.

A screenshot of a computer Description automatically generated

The action status will now appear for the selected devices.

A screenshot of a computer Description automatically generated

If we click on the log button, we can see that both the folder and file copy actions and the CMD script actions were successful on CLIENT1.

A screenshot of a computer Description automatically generated

If we click on the Output link in the action log, we can see the full output from each command (as shown below).

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

Once the device has restarted, the user account will automatically log on.

A screenshot of a blue screen Description automatically generated

Microsoft Edge will automatically load in kiosk mode (as shown below).

A screenshot of a computer Description automatically generated

There you have it, a comprehensive guide to deploying Kiosk mode in Windows 11 and once again MPA Tools can simplify the deployment process!

As we conclude this series on configuring kiosk mode in Windows 11, we hope these guides have been helpful in aiding your understanding and implementation. Remember to adapt these techniques to suit your specific needs and explore additional functionalities or optimizations.

Stay tuned for more insightful content, and thank you for joining us on this journey!

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Pin It on Pinterest

Share This