Archive

Archive for October, 2013

Prompt for Password, UDA and Computer Name in a tasksequence.

October 9, 2013 11 comments

Hello. Long time since i wrote something, will try and post more frequently.

So i´ve been using a HTA app to prompt for a password at the beginning of each task sequence. Why you ask? let´s say you have task sequences for Client OS and some for Server OS, you might not want anyone to deploy those but if you set a PXE password you would need to distribute that password to everyone that needs to deploy Client.

There is a great post on all this written by Niall Brady over at Windows-Noob and most of this is taken from there. http://www.windows-noob.com/forums/index.php?/topic/2336-password-protect-a-task-sequence/page-2 i found the HTA there and have modified it to include prompts for Primary User and Computer name Below is the HTA im not the greatest wizard with Graphics but you get the Picture.

Prompt

There are also a prompt for Primary user and one for computer name you can download the HTA from

you can download a sample of the task sequence here and just copy it to your own.

 

To display a HTA in WinPE you need to have MDT integrated to you SCCM enviroment. i added the files to a folder called WNB and copied that to the script folder inside the MDT toolpackage source. but you can create your own package and reference that when you call the script. just make sure you load the MDT toolpackage Before the passwordprompt. Before you implement it you need to edit Password.hta with your favorite text editor The three prompts set 3 variables. ALLOWOSDBUILD wich is set YES if you input the right password, if you dont then the task sequence will fail and shutdown the computer, to change the password edit line 98, default password is password SMSTSUdaUsers wich is the built in UDA Variable that sets primary user, if you only have 1 domain change the domain\ on line 113 then you only need to input the username without domain\ first. if you have multiple domains just remove domain\ OSDComputerName wich is the built in variable that sets computer name wont go into more details on this pretty obvious. There is a check on line 104 to 109 that the username and compuername is between 5 and 10/15 characters long and the computername is changed to uppercase characters on line 114

Advertisements
Categories: SCCM