James Avery
Just another GEEK expressing his thoughts
RSS
  • Home
  • Resume
  • Blog
    • Microsoft Azure
      • Microsoft Intune
    • Access and Information Protection (AIP)
    • SC Configuration Manager 2012
      • Configuration Manager 2007
    • Windows Server-2012
    • Desktop Virtualization
    • Remote Desktop Services
  • e-Books
  • Contact

Have OS deployment ask for a Computer Name 

javery February 20, 2013 Configuration Manager 2007

I found this on TechNet and had to work through it to make it work. I’ve added pics and better explanations on how to add and deploy the script to work for you. I found the scripts at this URL in TechNet. http://social.technet.microsoft.com/forums/en-US/configmgrosd/thread/5924e840-eb6e-48c1-858f-766a5be625a6/

 
 

This script will detect if the current assigned value for the computer name begins with MININT, indicating that this image is bare metal image.  It then prompts the end-user to enter a new computer name.  It is primarily useful for task sequences that do both bare metal and in-place reimages.

 
 

Steps to implement the script.

  1. Create a folder for your VBS script called “AskComputerName”.

     
     

  2. Copy cscript.exe to the AskComputerName folder.

 
 


 
 

3. In the folder copy the VBS script to Notepad and save the file as “askcomputername.vbs”

.

Dim sNewComputerName, oTaskSequence, sTSMachineName

Set oTaskSequence = CreateObject (“Microsoft.SMS.TSEnvironment”)

‘ Get the name the computer is set to receive and truncate to first 6 letters

sTSMachineName = oTAskSequence(“_SMSTSMachineName”)

sTSMachineName  = lcase(left(sTSMachineName,6))

If sTSMachineName = “minint” Then

    ‘ The wscript.echo commands are logged in SMSTS.log for troubleshooting.

    ‘ They are not displayed to the end user.

    wscript.echo “Detected that the computer name is scheduled to receive a random value.  Prompting user to input a standard name.”

    sNewComputerName = InputBox (“Please enter a standard computer name.”, “Computer Name”, , 30,30)

    oTaskSequence(“OSDComputerName”) = sNewComputerName

    wscript.echo “Set Task Sequence variable OSDComputerName to: ” & sNewComputerName

Else

    wscript.echo “Computer set to receive a standard name, continuing as is.”

End If

 
 

4. Create an SCCM package that holds this script.  Do not create a program. Leave the program blank. Add the package to the appropriate DPs

 
 


 
 

5. Edit an existing task sequence or create a new task sequence and add a new task to Run Command Line.  Move it to occur between “Restart in Windows PE” and “Partition Disk”

 
 

6. For the task, give it the name you want.  (e.g. AskComputerName)

 
 

7. Select checkbox “Package” and then select the package created that has the script

 
 

8. In the command line section, put the name of vbscript…with the file extension!

 
 

9. Click OK

 
 


 
 

  10. When deploying an image, you will see the following box asking for the computer name.

 
 


Software Updates Says Unknown  AppV Error 0000c800 

Related Posts

Configuration Manager 2007

Software Updates Says Unknown 

Ok, what does this mean, how do I figure out where the problem is? Man, what a pain!     Below is an example (PIC 1) of what I’m talking about with the “Unknown”. These “Unknown” machines mean they didn’t send in the Software Update scan on the workstation to the WSUS system. Now, which […]

Configuration Manager 2007

Software Updates released, When? 

Pretty much everyone knows when Microsoft releases their software updates every second Tuesday each month. But did you know it’s actually after 10am Pacific Time. Yes, I said Pacific Time. For you peeps that don’t know how to calculate that…that would be 11am Mountain Time, 12 Central Time, 1pm Eastern Time. Now Hawaii, well…now you […]

Configuration Manager 2007

SQL Server reporting Failure Audit in Application Log 

While I was out doing an installation at a customer I noticed I started having problems with the SQL server’s Windows Application Log. Below you will find the error and the solution on how to resolve this. This took me 3 days and a call to Microsoft to resolve this problem since I couldn’t really […]

Blog Categories

  • Access and Information Protection (AIP)
  • Desktop Virtualization
  • MDOP
  • Application Virtualization
  • Microsoft Azure
  • Remote Desktop Services
  • James Avery Resume
  • Tools
  • References
  • Exchange 2007
  • Windows-8-Desktop
  • Configuration Manager 2007
  • Microsoft Intune
  • SC Configuration Manager 2012
  • SMS 2003
  • Windows Server-2008
  • Windows Server-2012

Search

Tags

Cherished Moments Dreams family Friends Hobby Photography Romance Travel

Recent Posts

  • Scaling a standard Azure website to 380k queries per minute of 163M records with loader.ioScaling a standard Azure website to 380k queries per minute of 163M records with loader.io
    July 3, 2014
  • How to publish URL shortcuts to Windows 8.1
    July 3, 2014
  • Microsoft Virtual Machine Converter 2.0
    June 24, 2014

Social Media

© James Avery 2022
Powered by WordPress • Themify WordPress Themes