SCCM R2 Unknown Computer Support and changing computer name during Task Sequence
Hi We are evaluating the new unknown computer support in SCCM 2007 R2. We would like the Task Sequence that is advertised to the Unknown Computers Collection to ask for the name of the computer running the task sequence. I have created a short VBScript that asks the user for the computername and have added the script to the task sequence using a Run Command Line item. The script sets the OSDComputerName TS variable to the name input by the user. According to the documentation the OSDComputerName variable is only valid during the Apply Windows Settings Task Sequence Action. So my question is; where should the Run Command Line item be placed? Thanks Morgan
September 16th, 2008 9:26pm

Hi I am also using a script to ask for the username. The "run command line" runs before "partition disk". The OSDComputername is used during the "Apply Windows setting" step. The ts remembers the variables throughout the whole ts. David
Free Windows Admin Tool Kit Click here and download it now
September 17th, 2008 12:23pm

Guys, is this code something you would like to share? So many posts about OSD computer name and unknown computers, and last days R2 and computer name etc. /Ragnar
September 18th, 2008 11:09am

Any idea why the below error gets logged inSCCM environment: SMSTSLog File detail showing the error when renamed the computerforOSDComputerName : <![LOG[============================[ OSDWinSettings.exe ]============================]LOG]!><time="16:48:46.233+480" date="10-01-2008" component="OSDWinSettings" context="" type="1" thread="1864" file="osdwinsettings.cpp:579"><![LOG[Command line: "osdwinsettings.exe" /config]LOG]!><time="16:48:46.243+480" date="10-01-2008" component="OSDWinSettings" context="" type="0" thread="1864" file="osdwinsettings.cpp:580"><![LOG[Setting %SystemRoot% to "C:\Windows"]LOG]!><time="16:48:46.453+480" date="10-01-2008" component="OSDWinSettings" context="" type="0" thread="1864" file="smiinterface.cpp:819"><![LOG[Loading existing answer file "C:\Windows\panther\unattend\unattend.xml"]LOG]!><time="16:48:47.515+480" date="10-01-2008" component="OSDWinSettings" context="" type="0" thread="1864" file="xmlanswerfile.cpp:579"><![LOG[Computer Name: ChiragOSDCheckTest]LOG]!><time="16:48:47.785+480" date="10-01-2008" component="OSDWinSettings" context="" type="1" thread="1864" file="osdwinsettings.cpp:375"><![LOG[Getting namespace "Microsoft-Windows-Shell-Setup" for architecture "x86"]LOG]!><time="16:48:47.785+480" date="10-01-2008" component="OSDWinSettings" context="" type="1" thread="1864" file="smiinterface.cpp:222"><![LOG[spItem->SetValue( var ), HRESULT=80220005 (e:\nts_sms_fre\sms\framework\osdcore\smiinterface.cpp,286)]LOG]!><time="16:48:47.835+480" date="10-01-2008" component="OSDWinSettings" context="" type="0" thread="1864" file="smiinterface.cpp:286"><![LOG[pSetupPass->setValue(m_spSettingsEngine, pszNamespace, pszPath, pszValue), HRESULT=80220005 (e:\nts_sms_fre\sms\framework\osdcore\smiinterface.cpp,1126)]LOG]!><time="16:48:47.845+480" date="10-01-2008" component="OSDWinSettings" context="" type="0" thread="1864" file="smiinterface.cpp:1126"><![LOG[m_pSMIInterface->setValue( SetupPassValue[eSetupPass], pszComponentName, pszPath, pszValue ), HRESULT=80220005 (e:\nts_sms_fre\sms\framework\osdcore\xmlanswerfile.cpp,768)]LOG]!><time="16:48:47.845+480" date="10-01-2008" component="OSDWinSettings" context="" type="0" thread="1864" file="xmlanswerfile.cpp:768"><![LOG[this->SetValue( Specialize, XML::Shell::ComponentName, XML::Shell::ComputerName::Element, pszComputerName ), HRESULT=80220005 (e:\nts_sms_fre\sms\framework\osdcore\xmlanswerfile.cpp,884)]LOG]!><time="16:48:47.845+480" date="10-01-2008" component="OSDWinSettings" context="" type="0" thread="1864" file="xmlanswerfile.cpp:884"><![LOG[m_pImpl->SetComputerNameW(pszComputerName), HRESULT=80220005 (e:\nts_sms_fre\sms\framework\osdcore\xmlanswerfile.cpp,2184)]LOG]!><time="16:48:47.845+480" date="10-01-2008" component="OSDWinSettings" context="" type="0" thread="1864" file="xmlanswerfile.cpp:2184"><![LOG[pAnswerFile->SetComputerNameW(sValue), HRESULT=80220005 (e:\nts_sms_fre\sms\client\osdeployment\osdwinsettings\osdwinsettings.cpp,376)]LOG]!><time="16:48:47.845+480" date="10-01-2008" component="OSDWinSettings" context="" type="0" thread="1864" file="osdwinsettings.cpp:376"><![LOG[ConfigureWinSettings(), HRESULT=80220005 (e:\nts_sms_fre\sms\client\osdeployment\osdwinsettings\osdwinsettings.cpp,637)]LOG]!><time="16:48:47.845+480" date="10-01-2008" component="OSDWinSettings" context="" type="0" thread="1864" file="osdwinsettings.cpp:637"><![LOG[Failed to open the Task Sequencing Environment. Code 0x80220005. Please ensure you are running this executable inside a properly configured OS Deployment task sequence.Unknown error (Error: 80220005; Source: Unknown)]LOG]!><time="16:48:47.905+480" date="10-01-2008" component="OSDWinSettings" context="" type="3" thread="1864" file="osdwinsettings.cpp:637"><![LOG[Exiting with return code 0x80220005]LOG]!><time="16:48:47.915+480" date="10-01-2008" component="OSDWinSettings" context="" type="1" thread="1864" file="osdwinsettings.cpp:647"><![LOG[Process completed with exit code 2149711877]LOG]!><time="16:48:48.005+480" date="10-01-2008" component="TSManager" context="" type="1" thread="456" file="commandline.cpp:1102"><![LOG[!--------------------------------------------------------------------------------------------!]LOG]!><time="16:48:48.015+480" date="10-01-2008" component="TSManager" context="" type="1" thread="456" file="instruction.cxx:3010"><![LOG[Failed to run the action: Apply Windows Settings. Unknown error (Error: 80220005; Source: Unknown)]LOG]!><time="16:48:48.045+480" date="10-01-2008" component="TSManager" context="" type="3" thread="456" file="instruction.cxx:3101"><![LOG[Sending status message . . .]LOG]!><time="16:48:48.045+480" date="10-01-2008" component="TSManager" context="" type="1" thread="456" file="utility.cxx:292"><![LOG[Send a task execution status message SMS_TSExecution_ActionFailError]LOG]!><time="16:48:48.055+480" date="10-01-2008" component="TSManager" context="" type="1" thread="456" file="utility.cxx:314"><![LOG[MP server SCCMTEST01.SCCMTEST.LAB and port 80. SSL=false. CRL=false.]LOG]!><time="16:48:48.055+480" date="10-01-2008" component="TSManager" context="" type="1" thread="456" file="utility.cxx:458"><![LOG[Site code: AVA]LOG]!><time="16:48:48.065+480" date="10-01-2008" component="TSManager" context="" type="1" thread="456" file="utility.cxx:489"><![LOG[Client machine name: ChiragOSDTest]LOG]!><time="16:48:48.065+480" date="10-01-2008" component="TSManager" context="" type="1" thread="456" file="utility.cxx:494"><![LOG[Client Identity: GUID:84AEF6CD-5D82-4DB4-BF05-51DC4834A932]LOG]!><time="16:48:48.075+480" date="10-01-2008" component="TSManager" context="" type="1" thread="456" file="utility.cxx:496"><![LOG[Advertisement ID: AVA20023]LOG]!><time="16:48:48.075+480" date="10-01-2008" component="TSManager" context="" type="1" thread="456" file="utility.cxx:505"><![LOG[Package ID: AVA00036]LOG]!><time="16:48:48.075+480" date="10-01-2008" component="TSManager" context="" type="1" thread="456" file="utility.cxx:507"> Regards, Chirag
Free Windows Admin Tool Kit Click here and download it now
October 2nd, 2008 5:06am

I'm also looking for this information - I'm going to try and write something myself, but if there is an official way to do this, that would be great. Naming the machine "minint-<random>" is pretty terrible - I was surprised it doesn't prompt for a machine name automatically. Thanks! Andrew
November 4th, 2008 7:19pm

There have been lots of threads about this - MS should really implement a supported script to do this - after all that's what SMS 2003 OSD did Personally, I use SCCM collection variables to define different build types - for example let's say there's a Finance build then I use variables passed down to a VB script to set extra software apps that are then installed by the install multiple application TS. I haven't had the opportunity of testing R2 but I reckon it would need a VB script just like above to check for and if necessary ask for the Computer Name to be input AND also to have a drop down box with the different build types - in my example the name "Finance". Then the script could process the SMSTSMachine name variable as you guys have done and also process the variables for the additional apps PS - Is there still an official SMSWish email address to MS for enhancements ?
Free Windows Admin Tool Kit Click here and download it now
November 14th, 2008 11:40am

androidtopp said: OK, this code should work just fine...but may not cut and paste well. I tested it and it works perfectly for me. YMMV. Code Snippet Dim objOSD, objRegExDim Matches, MatchDim strPattern, strInputBox, strReasonDim boolLength, boolValid Set objOSD = CreateObject("Microsoft.SMS.TSEnvironment")Set objRegEx = New RegExp ' Define valid patterns as and character not in (a-z, A-Z, 0-9, or -)strPattern = "[^a-zA-Z0-9-]" DostrReason = ""strInputBox = InputBox("Enter desired machine name. Leave blank if the machine being imaged is already in the SCCM Console with the proper name, or if a random name is acceptable." & VbCrLf & VbCrLf & "Machine names must be 3-14 characters, and include a-z, A-Z, 0-9, -, and _ ONLY.","Machine Name")If strInputBox = "" Then TemplateQuit(0)' Check length - must be less than 16 charatcersIf Len(strInputBox) <= 15 Then boolLength = True ElsestrReason = strReason & "Machine name too long. Please choose a name from 1-15 characters in length." & VbCrLf boolLength = FalseEnd If' Check character validityboolValid = True' Return all matches for invalid charactersobjRegEx.Global = TrueobjRegEx.Pattern = strPattern' Generate collection of matchesSet Matches = objRegEx.Execute(strInputBox)' Check for matches on invalid charactersFor Each Match In MatchesstrReason = strReason & "Invalid character """ & Match.Value & """ found. Please use only a-z, A-Z, 0-9, and -." & VbCrLfboolValid = FalseNextIf Not (boolLength And boolValid) Then MsgBox "Invalid name """ & strInputBox & """ entered!" & VbCrLf & VbCrLf & strReason,vbCritical+vbOKOnly,"Invalid Name Entered"Loop While Not (boolLength And boolValid) MsgBox "Computer name set to """ & strInputBox & """.",vbInformation+vbOKOnly,"Computer Name Set" objOSD("OSDComputerName") = strInputBox This should disallow names that are too long, as well as names with invalid characters (not a-z, A-Z, 0-9 or -). I run this as a command line right before I partition the hard drive, but the catch is that I had to import it into my boot.wim file - otherwise I was trying to access a network share as the local machine system account, and that wasn't working so hot. Andrew This has been the script i've been looking for. Since getting SCCM i've been tring to find a way to name the machines. The only trouble i'm having is that the inputboxes aren't getting focus and are sitting behind the SCCM TS box. I've tried to find on Google a way to set focus. But since I have very little VBScript experence. I'm having trouble seeing where to apply some on the commands i'm finding. Most pertain to HTML withwindow.focus while subloading a document. So i'm here to beg for some help. ThanksJoshua
February 6th, 2009 7:48pm

In R2 a script for this is unnecessary.If you define empty TS variables in R2 you will be prompted to fill in the value.And AFIAK smswish is still alive as an email alias."Everyone is an expert at something" Kim Oppalfens Configmgr expert for lack of any other expertise. http://www.scug.be/blogs/sccm
Free Windows Admin Tool Kit Click here and download it now
February 6th, 2009 8:13pm

androidtopp said: OK, this code should work just fine...but may not cut and paste well. I tested it and it works perfectly for me. YMMV. Code Snippet Dim objOSD, objRegExDim Matches, MatchDim strPattern, strInputBox, strReasonDim boolLength, boolValid Set objOSD = CreateObject("Microsoft.SMS.TSEnvironment")Set objRegEx = New RegExp ' Define valid patterns as and character not in (a-z, A-Z, 0-9, or -)strPattern = "[^a-zA-Z0-9-]" DostrReason = ""strInputBox = InputBox("Enter desired machine name. Leave blank if the machine being imaged is already in the SCCM Console with the proper name, or if a random name is acceptable." & VbCrLf & VbCrLf & "Machine names must be 3-14 characters, and include a-z, A-Z, 0-9, -, and _ ONLY.","Machine Name")If strInputBox = "" Then TemplateQuit(0)' Check length - must be less than 16 charatcersIf Len(strInputBox) <= 15 Then boolLength = True ElsestrReason = strReason & "Machine name too long. Please choose a name from 1-15 characters in length." & VbCrLf boolLength = FalseEnd If' Check character validityboolValid = True' Return all matches for invalid charactersobjRegEx.Global = TrueobjRegEx.Pattern = strPattern' Generate collection of matchesSet Matches = objRegEx.Execute(strInputBox)' Check for matches on invalid charactersFor Each Match In MatchesstrReason = strReason & "Invalid character """ & Match.Value & """ found. Please use only a-z, A-Z, 0-9, and -." & VbCrLfboolValid = FalseNextIf Not (boolLength And boolValid) Then MsgBox "Invalid name """ & strInputBox & """ entered!" & VbCrLf & VbCrLf & strReason,vbCritical+vbOKOnly,"Invalid Name Entered"Loop While Not (boolLength And boolValid) MsgBox "Computer name set to """ & strInputBox & """.",vbInformation+vbOKOnly,"Computer Name Set" objOSD("OSDComputerName") = strInputBox This should disallow names that are too long, as well as names with invalid characters (not a-z, A-Z, 0-9 or -). I run this as a command line right before I partition the hard drive, but the catch is that I had to import it into my boot.wim file - otherwise I was trying to access a network share as the local machine system account, and that wasn't working so hot. Andrew This has been the script i've been looking for. Since getting SCCM i've been tring to find a way to name the machines. The only trouble i'm having is that the inputboxes aren't getting focus and are sitting behind the SCCM TS box. I've tried to find on Google a way to set focus. But since I have very little VBScript experence. I'm having trouble seeing where to apply some on the commands i'm finding. Most pertain to HTML withwindow.focus while subloading a document. So i'm here to beg for some help. ThanksJoshua You are not the only one having this issue.They asked me to have a look and see if I could find a more easy way to fill in Computer name and OU.Also I have No experience in SCCM and VB scripts, But I am Learning all day new stuff.Some Help here would be apriciated.
April 6th, 2009 4:47pm

Could you be more specific? Which step is the variable in and what do you name it?
Free Windows Admin Tool Kit Click here and download it now
April 6th, 2009 11:12pm

Could you be more specific? Which step is the variable in and what do you name it? As I said just before. I have on experiance in this field. If the posibility exists that someone could explain what I need to do. I just copied the script and made a packet in the SCCM to make it avainable. Now I am looking for a way to fill in to OU using this script. I just need the code, adjusting it to my needs will nog be a big issue. thx... me :-)
April 7th, 2009 11:14am

In R2 a script for this is unnecessary.If you define empty TS variables in R2 you will be prompted to fill in the value.And AFIAK smswish is still alive as an email alias. "Everyone is an expert at something" Kim Oppalfens Configmgr expert for lack of any other expertise. http://www.scug.be/blogs/sccm
Free Windows Admin Tool Kit Click here and download it now
April 15th, 2009 12:30pm

Hi Kim, Can you provide some clarification/instructions on what you mean here with setting up an empty variable in a task sequence will prompt in SCCM 2007 R2? I'm running R2 and have tried this to no avail. Thanks in Advance!
July 14th, 2009 5:28pm

Hi Kim, Can you provide some clarification/instructions on what you mean here with setting up an empty variable in a task sequence will prompt in SCCM 2007 R2? I'm running R2 and have tried this to no avail. Thanks in Advance! I too am trying to get this working without scripting, as it seems Kim suggests it should. However, I too cannot get it to work as described. Kim can you provide any other details about it?
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2009 8:03pm

Yes, the comment Kim made didn't make any sense to me either - then again, I am a SCCM and deployment noob :( Trying out R2's unknown computer support now, and it's great for reducing administration apart from the fact that computers get weird names and the deployer then have to go about relogging.
July 16th, 2009 8:38pm

I did however through some testing discover that the task sequence writes the contents of OSDComputerName to an xml answerfile. I put a colon ':' in as my OSDComputerName variable in my task sequence knowing full well that a colon is an invalid character, and during the specialize pass the process stopped and complained that windows could not parse the answerfile for the [specialize] pass for [amd64_Microsoft-Windows-Shell-Setup]. In the specialize pass this entry in the answerfile contains 'computername'. However it appears that if you include an answerfile and populate it with a specialize pass and write a blank string into 'computername' the task sequence still uses the MININT name and ignores the provided answerfile for the specialize pass.
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2009 9:25pm

Uhm. This doesn't seem to work - at least not on our SP1 R2 system. I created 2 "Set Tast Sequence Variable" actions in my TS... One with Variable "OSDComputerName" and no value and one with TS_RandomVariable and no value I then tried to set %TS_RandomVariable% as the "registered user" for Windows in the TS (and it showed up as %TS_RandomVariable% in XP, doing the same with %OSDComputerName% at least shows it replaces the variable correctly as it's then registered to MININT-RANDOM) At no point during either PXE/WinPE or "XP install" did it ask for me to fill in the empty variables... Maybe because they weren't used for anything? But then again I see no place in the TS to enter a computer name... I'd really like to avoid "pre staging" new computers in the ConfigMGR - but I don't like MININT-RANDOM computer names either :(
July 18th, 2009 10:41pm

We're pretty much a Dell shop here soI cobbled together a vbscript that will query WMI for the Service Tag from the BIOSthen set the TS Variable OSDComputerName to <DEPT>-%ServiceTag%. Works pretty well. Now i've just got to convince the powers that be that our computer names need to be what i can programmatically get it to do. :) It would be supremely helpful if it did prompt however, it makes the whole process much more agile for systems that aren't Dell's. I did come across an off handed remark on some post somewhere while looking for an answer to this that if any of the TS variables are empty it auto fills them in rather than prompting. I'm sure that's useful, there are lots of TS Variables, and getting prompted for all of them if they are empty would get tiresome. With as much traffic as there seems to be around comptuer name, perhaps they could treat it somewhat differently. I don't know.
Free Windows Admin Tool Kit Click here and download it now
July 20th, 2009 5:40pm

For my part the problem was running the TS as a mandatory advertisement. Seems it doesn't ask for input then. Changing to a non-mandatory advertisement and the TS process kindly asked med to enter OSDComputerName as I had assigned that as a blank variable to my collection. *sigh*
August 5th, 2009 11:57am

Hi Kim, Can you provide some clarification/instructions on what you mean here with setting up an empty variable in a task sequence will prompt in SCCM 2007 R2? I'm running R2 and have tried this to no avail. Thanks in Advance! If you add a collection variable to a collection (right click collection, choose modify collection settings, click collection variables) and don't assign a value, this value will be asked for in the OSD-process. As long as the client is a member of the collection that has this collection variable. We have for instance used a collection variable named "Primary user". When doing OSD, a window pops up asking for a value for Primary user.Kenneth Titlestad | MCSE | MCTS:SCCM | www.deploymenttech.com
Free Windows Admin Tool Kit Click here and download it now
August 5th, 2009 12:06pm

Hi Kim, Can you provide some clarification/instructions on what you mean here with setting up an empty variable in a task sequence will prompt in SCCM 2007 R2? I'm running R2 and have tried this to no avail. Thanks in Advance! If you add a collection variable to a collection (right click collection, choose modify collection settings, click collection variables) and don't assign a value, this value will be asked for in the OSD-process. As long as the client is a member of the collection that has this collection variable. We have for instance used a collection variable named "Primary user". When doing OSD, a window pops up asking for a value for Primary user. Kenneth Titlestad | MCSE | MCTS:SCCM | www.deploymenttech.com Look, it's fairly simple when you know how:[img src="http://img12.imageshack.us/i/capture2r.png/" />[img src="http://img190.imageshack.us/i/capturefoc.png/" />Logically, you will always want to choose a name for unknown computers. So right click All Unknown Systems and select "Modify collection settings".Go to "Collection Variables" tab, click the silly star icon, name the variable osdcomputername and leave the value blank. YES I KNOW MINE HAS DOTS it just puts those in by itself like the password security asterisks.Now the next time you try to image an unknown computer, it will ask you to fill out the variables, the only one being 'osdcomputername'. Double click it, enter your PC name and hit OK. That's all there is to it. It won't explicitly be saying "What do you want to name this PC?" but trust me, it takes the PC name from the osdcomputername variable.As previously mentioned, for some reason this doesn't work when the imaging task sequence is a mandatory advertisement (at least it doesn't work for me). However, I have some misgivings about making an imaging task sequence for unknown computers mandatory, which should hopefully be obvious to all. I strongly recommend against using a script to do this when it's already inbuilt - this is a tool to make deployment easier and you should be trying to keep to that idea IMO.
August 5th, 2009 12:21pm

For getting new machine names, Iuse a custom-made script instead of the built in functionality of collection variables. There is no time out on the built-in popup window, and it can not itself offer a vacant name from a predefined pattern. With the script both offering a vacant name, and with a timout,the user who deploys a machine really doesn't need to supply a machine name, unless he/she explicitly want to supply a name. And the script implies logic that makes sure you get the right name from the pattern and makes sure you don't get duplicate names.The more the user don't have to think of the better:-)Kenneth Titlestad | MCSE | MCTS:SCCM | www.deploymenttech.com
Free Windows Admin Tool Kit Click here and download it now
August 5th, 2009 3:49pm

Hi Kim, Can you provide some clarification/instructions on what you mean here with setting up an empty variable in a task sequence will prompt in SCCM 2007 R2? I'm running R2 and have tried this to no avail. Thanks in Advance! If you add a collection variable to a collection (right click collection, choose modify collection settings, click collection variables) and don't assign a value, this value will be asked for in the OSD-process. As long as the client is a member of the collection that has this collection variable. We have for instance used a collection variable named "Primary user". When doing OSD, a window pops up asking for a value for Primary user. Kenneth Titlestad | MCSE | MCTS:SCCM | www.deploymenttech.com Look, it's fairly simple when you know how:[img src="http://img12.imageshack.us/i/capture2r.png/" />[img src="http://img190.imageshack.us/i/capturefoc.png/" />Logically, you will always want to choose a name for unknown computers. So right click All Unknown Systems and select "Modify collection settings".Go to "Collection Variables" tab, click the silly star icon, name the variable osdcomputername and leave the value blank. YES I KNOW MINE HAS DOTS it just puts those in by itself like the password security asterisks.Now the next time you try to image an unknown computer, it will ask you to fill out the variables, the only one being 'osdcomputername'. Double click it, enter your PC name and hit OK. That's all there is to it. It won't explicitly be saying "What do you want to name this PC?" but trust me, it takes the PC name from the osdcomputername variable.As previously mentioned, for some reason this doesn't work when the imaging task sequence is a mandatory advertisement (at least it doesn't work for me). However, I have some misgivings about making an imaging task sequence for unknown computers mandatory, which should hopefully be obvious to all. I strongly recommend against using a script to do this when it's already inbuilt - this is a tool to make deployment easier and you should be trying to keep to that idea IMO. Unfortunately for me, my SCCM installation isa child site and i don't have access to make changes to the collection settings for Unknown Computers, it's locked. i ended upcreating a new TS variable called serialnumber and get the serial number from the biosvia vbscript, i then use the TS variable action during the TS to set OSDComputerName to <orgainzation abreviation>-%serialnumber%. It works pretty well. depending on how far management decides they want this whole OSD solution to go, i may have to use the script at the top of the thread to prompt users for computer names, or perhapsmake <organization abreviation> what's prompted for, thenassemble the computer name that way, and change my TS step from a static <org abreviation>-%serialnumber% to something like %orgabrv%-%serialnumber%. time will tell for me. thanks to all on this thread and others to get me this far with computer names in Task Sequences.Todd
August 5th, 2009 5:46pm

Just to see how this script worked, i made the neccessary changes and it does pretty well, it prompts for organization abreviation and it assembles the computer name fine. Though i too am seeing the issue Josh posted about, the input boxes are "under" the TS progress bar window. it seems that the TS window is set to "always on top", as it's always infront of every other window that ever comes up during the TS. any way to put the input boxeson top?
Free Windows Admin Tool Kit Click here and download it now
August 6th, 2009 4:17pm

You can hide the window with Set ProgressUI = CreateObject("Microsoft.SMS.TsProgressUI") ProgressUI.CloseProgressDialog Kenneth Titlestad | MCSE | MCTS:SCCM | www.deploymenttech.com
August 6th, 2009 4:23pm

nice! can i show it again after setting what i need to in the input boxes with something similar? is there a method for opening it?ProgressUI.OpenProgressDialogperhaps?
Free Windows Admin Tool Kit Click here and download it now
August 6th, 2009 4:28pm

It will automatically pop up again once the TS progresses further.Kenneth Titlestad | MCSE | MCTS:SCCM | www.deploymenttech.com
August 6th, 2009 4:31pm

Awesome! It worked great. Thanks for all the advice.
Free Windows Admin Tool Kit Click here and download it now
August 6th, 2009 4:43pm

Hi Kim, Can you provide some clarification/instructions on what you mean here with setting up an empty variable in a task sequence will prompt in SCCM 2007 R2? I'm running R2 and have tried this to no avail. Thanks in Advance! If you add a collection variable to a collection (right click collection, choose modify collection settings, click collection variables) and don't assign a value, this value will be asked for in the OSD-process. As long as the client is a member of the collection that has this collection variable. We have for instance used a collection variable named "Primary user". When doing OSD, a window pops up asking for a value for Primary user. Kenneth Titlestad | MCSE | MCTS:SCCM | www.deploymenttech.com Look, it's fairly simple when you know how: [img src="http://img12.imageshack.us/i/capture2r.png/" /> [img src="http://img190.imageshack.us/i/capturefoc.png/" /> Logically, you will always want to choose a name for unknown computers. So right click All Unknown Systems and select "Modify collection settings". Go to "Collection Variables" tab, click the silly star icon, name the variable osdcomputername and leave the value blank. YES I KNOW MINE HAS DOTS it just puts those in by itself like the password security asterisks. Now the next time you try to image an unknown computer, it will ask you to fill out the variables, the only one being 'osdcomputername'. Double click it, enter your PC name and hit OK. That's all there is to it. It won't explicitly be saying "What do you want to name this PC?" but trust me, it takes the PC name from the osdcomputername variable. As previously mentioned, for some reason this doesn't work when the imaging task sequence is a mandatory advertisement (at least it doesn't work for me). However, I have some misgivings about making an imaging task sequence for unknown computers mandatory, which should hopefully be obvious to all. I strongly recommend against using a script to do this when it's already inbuilt - this is a tool to make deployment easier and you should be trying to keep to that idea IMO. Hi Andrew, I followed your instruction to add a collection variable with blank value. When I ran a task sequence it asked me to enter the value for "osdcomputername" and provided the required computer name. But when the system got build it didn't pick that name instead it took name like "MININT-K3T1U73". All other steps completed as expected. Am I doing anything wrong? Please help!! Thanks,Umesh Mishra
August 21st, 2009 2:04pm

Hello Ushmesh,in the collection where the unknown computers should be collected, you have to do following actions:1. In Properties of the collection choose "Ressource Class" --> Unknown Computer (now All unknown Computers will be collected)2. Then right click the collection and choose"Modify Collection Settings" and go to "Collection Variables"3. Add a new Variable with exactly the name "OSDComputername" (without quoation marks) and remove checkbox "Do not Display...."This worked for me 100%, hope for you too! :)Florian Weiss
Free Windows Admin Tool Kit Click here and download it now
September 30th, 2009 5:53pm

Hello Ushmesh, in the collection where the unknown computers should be collected, you have to do following actions: 1. In Properties of the collection choose "Ressource Class" --> Unknown Computer (now All unknown Computers will be collected) 2. Then right click the collection and choose "Modify Collection Settings" and go to "Collection Variables" 3. Add a new Variable with exactly the name "OSDComputername" (without quoation marks) and remove checkbox "Do not Display...." This worked for me 100%, hope for you too! :) Florian Weiss Thanks Florian, I did that but when I booted a new computer from LAN ,TS never ask me for a computer. Do I need to add anything in the task sequence? as mentioned above by "nickmo " and " androidtopp "?Umesh Mishra
October 7th, 2009 10:02pm

Guys and Gals, I have used one of the scripts in this thread and created a blog outline with pics on how to make this work. I have found one of my customer tell me, he had to use an xp cscript. In this blog, I used a 2003 server cscript.exe file.http://blogs.catapultsystems.com/javery/archive/2009/01/23/have-os-deployment-ask-for-a-computer-name.aspxIf you have any questions or comments, please ask. I would like to make sure this is clear for everyone.
Free Windows Admin Tool Kit Click here and download it now
October 8th, 2009 7:38pm

When I tried it without the CSCRIPT, it doesn't work.
October 9th, 2009 6:11pm

Hello Everyone,This was bugging me too... and when researching I found TWO entries that helped resolve the issue!!!FIRST : YOU DONT NEED TO SCRIPT ANYTHING when using R2 and Unknown computer support! Thanks Kim Oppalfens [MVP]MVP, Moderator for putting me on the right pathSECOND: For my part the problem was running the TS as a mandatory advertisement. Seems it doesn't ask for input then. Changing to a non-mandatory advertisement and the TS process kindly asked med to enter OSDComputerName as I had assigned that as a blank variable to my collection. Thanks gojensen for making that statement.So this is now looking alot like light touch :-)In order to be prompte for the Computer Name for ANY OS task sequence targeting an All Unknown Computers Group1) Select All Unknown Computer Group and go to Modify Collection Settings 2) Under Collection Variables create a new Variable called "OSDcomputerName" make sure it has no Value3) Advertise your OSD task Sequence as an OPTIONAL task sequence (in other words it's not mandatory...)4) Boot to PXE and HIT F12 AGAIN to boot to network (Since its Optional you have to confirm you want to boot to Network)5) Since its an Optional Advertisment you have to pick what Task sequence you want to run6) Once the task sequence is selected it prompts you to imput the missing Task Sequence Variables. In this case the Computer Name!I hope this helps clarify things, all the info was in the blog, just needed to put it in the right order ;-)You can still add the script if you dont want to go through hitting the F12 twice and selecting the task sequence, but I like this better because now I get to push multiple Task Sequences and get to chose what to run :-) Enjoy,Chris
Free Windows Admin Tool Kit Click here and download it now
October 10th, 2009 12:48am

Hello Usmesh, You dont need to add anything in the TS. Only the collection must be modified. Did you check if the computer will be taken in the correct Collection? Check smspxe.log there must be something with "Getting Action for unknown computer..." Its important that you DONT define any Value in the Collection Variable. Only the Name is needed. Only Collection Variables without a Value will be displayed in TS. Best regards Florian
October 11th, 2009 4:12pm

Hi DR_MOM,Thank you for your help I didn't know this procedure.I did what you wrote, and effectivelly the ts asked me the OSDcomputerName.I choosed the name and click on next.The ts finished but the computer name didn't change, it was not mine.Have you an idea?The name of the variable is OSDcomputerName exactely?Thank you.
Free Windows Admin Tool Kit Click here and download it now
January 20th, 2010 1:18pm

Hi David, I am looking for similar kind of a code for adding username. could you please post the code also and let us know how it works. my scenario is like this: 1. i am building a bare metal PC using PXE. 2. I hav written all the codes to generate compname,select domain etc. 3. Really stuck in the part of user name, because it requires a input from the user. cannot use hta files as it shows up behind TS. Please let me know hw this can be handled.Thanks in advanceNachik
January 31st, 2010 1:25pm

We're pretty much a Dell shop here so I cobbled together a vbscript that will query WMI for the Service Tag from the BIOS then set the TS Variable OSDComputerName to <DEPT>-%ServiceTag%. Works pretty well. Motert, I work for a technical college and we are completely a Dell shop (at least our workstations)... We've recently implemented SCCM 2007 and the VBScript you mention is exactly what I'm looking for! I was trying to create a script that uses the Dell Client Configuration Toolkit to grab the Asset Tag field from the BIOS and apply it to the end of my OSDComputerName variable, but with my limited VBScript knowledge I was unsuccessful... Do you or anyone else have a working script (vbs or cmd) and some instructions on how to set this up in SCCM? Help is greatly appreciated!!! Thanks, Justin
Free Windows Admin Tool Kit Click here and download it now
April 29th, 2010 1:17am

It may be useful for other administrators, so I'm posting my own custom vbscript that I created and how I used it with task sequences. 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. Create an SCCM package that holds this script. No program is need be created. Add the package to the approprate DPs In the task sequence, add a task to Run Command Line. Move it to occur between "Restart in Windows PE" and "Partition Disk" For the task, give it the name you want. (e.g. Set Standard Computer Name) Select checkbox "Package" and then select the package created that has the script In the command line section, put the name of vbscript...with the file extension! Click OK Repeat steps for other necessary task sequences. Note the code looks sloppy below because of page length limitations. Copy and paste into Notepad for a better view. 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 This works great, thank you very much. I did exact as you wrote (thanks for a good instruction as well) and during TS I got white window with computer name field, cool! Only thing I can note, is that Advertisment of TS looks very intresting: that MININT-XXXXX is still seeing in some of TS actions, as the same time COMPUTER2 is the name I provided. That MININT-XXXXX is the same machine, I know it. See the pic-> https://s-hphotos-snc6.fbcdn.net/168684_492481175403_145461595403_6493596_166385_n.jpg
February 11th, 2011 10:10pm

Hi Justin007, I am also looking for that same script for the exact same reason. If you have it I would appreciate you sharing it! thanks
Free Windows Admin Tool Kit Click here and download it now
February 14th, 2011 3:30pm

1) Select All Unknown Computer Group and go to Modify Collection Settings 2) Under Collection Variables create a new Variable called "OSDcomputerName" make sure it has no Value 3) Advertise your OSD task Sequence as an OPTIONAL task sequence (in other words it's not mandatory...) 4) Boot to PXE and HIT F12 AGAIN to boot to network (Since its Optional you have to confirm you want to boot to Network) 5) Since its an Optional Advertisment you have to pick what Task sequence you want to run 6) Once the task sequence is selected it prompts you to imput the missing Task Sequence Variables. In this case the Computer Name! I think that this is the best option of all, to handle this issue. I used the computername.vbs script which was offered above, but at some time it didn't work, and stopped TS.
February 20th, 2011 4:21pm

I am also looking for that same script for the exact same reason. If you have it I would appreciate you sharing it! The script that yannara quoted works: 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 In our environment, we wanted the TS to prompt for a PC name whether it was a new machine (MININT-xxxxx) or one that was already imaged once before... We use the above script, slightly modified, in our environment: Dim sNewComputerName, sTSCurrentName Set oTaskSequence = CreateObject ("Microsoft.SMS.TSEnvironment") sTSCurrentName = oTaskSequence("_SMSTSMachineName") sNewComputerName = InputBox ("Please enter a standard computer name.", "Computer Name", , 30, 30) oTaskSequence("OSDComputerName") = sNewComputerName wscript.echo "Set Task Sequence variable OSDComputerName to: " & sNewComputerName Justin
Free Windows Admin Tool Kit Click here and download it now
April 4th, 2011 6:59pm

WellDone .......great...its work for me...thanks a lot....:)
November 1st, 2011 2:43am

hi there, the answer provided by Dr_Mom works fine. was just wondering can we make the OSDComputerName option mandatory and disabled the option Next without entering a name for the computer? thanks
Free Windows Admin Tool Kit Click here and download it now
January 10th, 2012 12:46am

Hello Everyone, This was bugging me too... and when researching I found TWO entries that helped resolve the issue!!! FIRST : YOU DONT NEED TO SCRIPT ANYTHING when using R2 and Unknown computer support! Thanks Kim Oppalfens [MVP]<abbr class="affil">MVP</abbr><abbr class="affil">, Moderator</abbr> for putting me on the right path SECOND: For my part the problem was running the TS as a mandatory advertisement. Seems it doesn't ask for input then. Changing to a non-mandatory advertisement and the TS process kindly asked med to enter OSDComputerName as I had assigned that as a blank variable to my collection. Thanks gojensen for making that statement. So this is now looking alot like light touch :-) In order to be prompte for the Computer Name for ANY OS task sequence targeting an All Unknown Computers Group 1) Select All Unknown Computer Group and go to Modify Collection Settings 2) Under Collection Variables create a new Variable called "OSDcomputerName" make sure it has no Value 3) Advertise your OSD task Sequence as an OPTIONAL task sequence (in other words it's not mandatory...) 4) Boot to PXE and HIT F12 AGAIN to boot to network (Since its Optional you have to confirm you want to boot to Network) 5) Since its an Optional Advertisment you have to pick what Task sequence you want to run 6) Once the task sequence is selected it prompts you to imput the missing Task Sequence Variables. In this case the Computer Name! I hope this helps clarify things, all the info was in the blog, just needed to put it in the right order ;-) You can still add the script if you dont want to go through hitting the F12 twice and selecting the task sequence, but I like this better because now I get to push multiple Task Sequences and get to chose what to run :-) Enjoy, Chris Hi, We have only primary SCCM site in our organisation and previously we have WSUS server which is in different VLN. can we use dis WSUS server in SCCM primary site as aupstream server. WSUS server is connected to internet and on sccm no internet connection but can we use primary site as a upstream wsus server for dowloading patches from old WSUS. Please help. Thanks in advance. SAndy
April 28th, 2012 6:16am

Hi I am also using a script to ask for the username. The "run command line" runs before "partition disk". The OSDComputername is used during the "Apply Windows setting" step. The ts remembers the variables throughout the whole ts. David Hi, We have only primary SCCM site in our organisation and previously we have WSUS server which is in different VLN. can we use dis WSUS server in SCCM primary site as aupstream server. WSUS server is connected to internet and on sccm no internet connection but can we use primary site as a upstream wsus server for dowloading patches from old WSUS. Please help. Thanks in advance. SAndy
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2012 6:16am

Guys, is this code something you would like to share? So many posts about OSD computer name and unknown computers, and last days R2 and computer name etc. /Ragnar Hi, We have only primary SCCM site in our organisation and previously we have WSUS server which is in different VLN. can we use dis WSUS server in SCCM primary site as aupstream server. WSUS server is connected to internet and on sccm no internet connection but can we use primary site as a upstream wsus server for dowloading patches from old WSUS. Please help. Thanks in advance. SAndy
April 28th, 2012 6:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics