Recently I was working on a project that creates lab images using SCCM task sequences. I encountered a problem, the image after being completely set up would autologin to the local administrator at reboot. This was a security risk. I found a fix by running a script at the end of the deployment in which will change the registry settings to disable auto login. Note: this guide assumes that you have the SCCM administrator console installed.
Find and add a script to the proper source directory
- Open the SCCM Configuration Manager Console and navigate to your site packages.
- Right click on your Task Sequence Scripts and click on “Properties”.
- A menu will pop up, navigate to the “Data Source” Tab, the “Source Directory” is where you will want to put your script you will be writing.
- Navigate and keep this source directory open.
Make the disable autologin script
- Open notepad and put the following into it and name it something like “autologin_disable.reg”.
- It will look something like this.
- Add this script to the source directory that we found earlier.
Add the script to your task sequence
- Locate your task sequence in the SCCM console, right click on it and choose “Edit”.
- A menu will pop up, on the left scroll down to the bottom and click the last task in the sequence. Click the “Add” button at he top and choose “General” -> “Run Command Line”.
- A menu will pop up, give the rule a name, Something like “Disable Auto Login”.
- Check the box next to “Package” and hit the browse button. Choose the “Task Sequence script” that you placed your script in earlier. Hit “ok”.
- In the “Command Line” section, input the following command:
REG IMPORT <yourScriptName>.reg
- Before you hit “Apply” your new rule should look something like this.
- You should be done.
Please feel free to leave a comment or a question!