Jump to content


anyweb

How can I easily prompt for a computer name in Configuration Manager 2012

Recommended Posts

Hi Guys...Dani3l

 

I never new you could do variables to add a computer name (cool)......but this is what I use in SCCM 2012 and it works just as it should (Dani3l this works for me)....you can leave it attached to your TS at all times and during OSD time when SCCM database knows the computer name it will bypass this step and it will hold on to it's old name, if it does not know the computer name(out of the box or Unknown) it will prompt you to enter one in....pretty cool..

 

Dim sNewComputerName, oTaskSequence, sTSMachineName, bPromptName

Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment")

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

sTSMachineName = lcase(oTaskSequence("_SMSTSMachineName"))

If left(sTSMachineName,6) = "minint" Then

bPromptName = True

ElseIf sTSMachineName = "minwinpc" Then

bPromptName = True

Else

bPromptName = False

End If

' Note: The wscript.echo commands are logged in SMSTS.log for troubleshooting. They are not displayed to the end user.

If bPromptName = True Then

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 to continue.", "Computer Name", , 30,30)

oTaskSequence("OSDComputerName") = UCase(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

 

 

 

 

 

Rocket Man

Share this post


Link to post
Share on other sites

experiencing the same issue as moustafafafa and I find it utterly annoying...

I was thinking something went wrong with my sccm install but apparently not. I'm going to google around a bit to check what can be done.

 

This is a byproduct of leveraging unknown computer support. During the TS process, SCCM has to create an object for any "Unknown" computers so that the SCCM database can "recognize" it and thus service it in the TS. If during the TS, the TS fails, SCCM does not remove the "orphaned' Unknown computer object. It has to be manually deleted.

 

http://blogs.technet.com/b/inside_osd/archive/2012/05/02/managing-unprovisioned-computers-in-system-center-2012-configuration-manager.aspx

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.