

- #SYSINTERNALS SUITE SECURITY TASK CONTEXT HOW TO#
- #SYSINTERNALS SUITE SECURITY TASK CONTEXT PASSWORD#
Invoke-Expression -Command:"icacls C:\Windows\Temp\Autologon.cmd /inheritance:r" # Sets permissions so only System can read the cmd file New-Item $AutologonFile -ItemType File -Value "C:\Windows\Autologon.exe /accepteula $Username $Domain $Password"Īdd-Content $AutologonFile "del C:\Windows\Autologon.exe"Īdd-Content $AutologonFile "schtasks.exe /delete /tn AutoLogon /f"Īdd-Content $AutologonFile "shutdown /r /t 20 /f" $AutologonFile = "C:\Windows\temp\Autologon.cmd" Register-ScheduledTask -Xml (get-content $PSScriptRoot\autologon.xml | out-string) -TaskName "Autologon"Ĭopy-Item -path $PSScriptRoot\autologon.exe -Destination C:\Windows New-itemproperty $FullRegKeyName -Name "UserName" -Value $username -Type STRING -Force -ErrorAction Silentl圜ontinue | Out-Null New-itemproperty $FullRegKeyName -Name "Kiosk Version" -Value $Version -Type STRING -Force -ErrorAction Silentl圜ontinue | Out-Null New-Item -Path $FullRegKeyName -type Directory -ErrorAction Silentl圜ontinue $FullRegKeyName = "HKLM:\SOFTWARE\" + $regkeyname The PowerShell script, remember to change the $Domain and the $RegKeyName to reflect your environment. xml file for the schedule task and the PowerShell script which can be downloaded here: I create a package with Autologon.exe and the.
#SYSINTERNALS SUITE SECURITY TASK CONTEXT PASSWORD#
I use Collection variables to set username and password to be used during OS deployment shown below. Autologon.cmd runs Autologon.cmd then deletes Autologon.cmd and AutoLogon.exe and reboots. Creates a schedule task that runs Autologon.cmd Autologon.cmd includes username/password for the kiosk user with permissions set to System Creates an Autologon.cmd file in C:\Windows\Temp which we can run as a scheduled task. Writes the username to a registry value so we can pick up later (in another blog post)

Run a PowerShell script during OSD that does the following: Another challenge is that the username and password is saved in clear test in the registry.Īutologon.exe is a SysInternals tool that encrypts the password used by Autologon in the registry instead of storing it in clear text.

What are the challenges with Autologon then? To start with the OOBE phase clears out all Autologon registry values so they need to be configured after OSD is complete. I needed to solve that in a kiosk scenario, more kiosk blogposts will be posted later.
#SYSINTERNALS SUITE SECURITY TASK CONTEXT HOW TO#
There are many blogposts on how to configure Autologon for use when deploying kiosk devices for example.
