Jump to content


easybernd

SCCM2012 Automatic Computername in OSD^

Recommended Posts

Hi i am new in this forum.

 

I need help with Deployment OSD in SCCM 2012

 

actually i have a OSDComputer Name prompt over the Bare Metal Image

 

Who it is possible to make a Automatic Computername

Example: CONWS001, CONWS002 ...

 

I dont find any variable where i can use this.

 

Thx for help :)

 

Greetz from vienna

Share this post


Link to post
Share on other sites

I believe something like that would be possible with MDT integration, through use of customsettings.ini and the OSDComputerName variable there...I could be wrong, but it might be a place to start looking :)

Share this post


Link to post
Share on other sites

you can use a webservice to do this and i use Michael Niehaus's webservice to do this in my example HTA here. The logic is stored in the task sequence and HTA frontend code, all you have to do is create the webservice.

Share this post


Link to post
Share on other sites

The biggest reasonis that if you have ten companies, you've got ten naming conventions for computers... There is no one solution fits all with this, not even close, that's why there are so many scripts, hta's and tools in the community for that.

 

There are many things in System center products that doe's not fit all companies/envoirments, but they are always optional 'Auto OSD name' should be a optional feature in SCCM no dobut, it's sucha big part of OSD in general.

Share this post


Link to post
Share on other sites

At my company I use DELL's asset label (not the asset tag) for the computer's account name in active directory. We set the asset label during our BIOS setup, and then my script extracts this value and assigns it to the SCCM variable for the computer name. If there is no asset label configure in BIOS, the entire process stops.

Share this post


Link to post
Share on other sites

We do this by importing the MAC and final computer name into SCCM and the build will rename the computer automatically. This works well except when using a CD build. We have found that it does not rename the computer from MININT-xxxxxxx to the proper name in maybe 10% of cases. This was logged with MS Premier support and has been accepted as a bug. A fix will be included in SCCM 2012 SP1 due in October. There is no problem when using a client or PXE build.

Share this post


Link to post
Share on other sites

There are many things in System center products that doe's not fit all companies/envoirments, but they are always optional 'Auto OSD name' should be a optional feature in SCCM no dobut, it's sucha big part of OSD in general.

 

I totally agree with you - thats why I have taken my project on codeplex bit further and now have written custom console extension for SCCM that enables you to control autonaming directly from TS GUI editor

 

I just finished that for CM2007 - but I plan to finish the same extension for CM2012 till end of november

Share this post


Link to post
Share on other sites

I totally agree with you - thats why I have taken my project on codeplex bit further and now have written custom console extension for SCCM that enables you to control autonaming directly from TS GUI editor

 

I just finished that for CM2007 - but I plan to finish the same extension for CM2012 till end of november

 

Sounds great : )

Share this post


Link to post
Share on other sites

At my company I use DELL's asset label (not the asset tag) for the computer's account name in active directory. We set the asset label during our BIOS setup, and then my script extracts this value and assigns it to the SCCM variable for the computer name. If there is no asset label configure in BIOS, the entire process stops.

 

We do this as well, pulling the service tag from the Dell's and the serial number from the Lenovo's with a short vbScript to populate OSDComputerName

Share this post


Link to post
Share on other sites

We do this by importing the MAC and final computer name into SCCM and the build will rename the computer automatically. This works well except when using a CD build. We have found that it does not rename the computer from MININT-xxxxxxx to the proper name in maybe 10% of cases. This was logged with MS Premier support and has been accepted as a bug. A fix will be included in SCCM 2012 SP1 due in October. There is no problem when using a client or PXE build.

 

Hello all, sorry to bump up an old topic, but this is the exact type of solution we need in my company. We are just getting into SCCM, and I have started testing OSDs. Here's what we do:

 

- each quarter, we go through lease-end replacements of the PCs whose leases are up

- the new computer gets a device sticker with a 6-digit number on it; for example, it would look like this: W7-######

- we name the computer W7-###### in AD, and manually put it into the correct OU, right now

- the numbers are not necessarily in-sequence (and sometimes one of them gets corrupted and needs to be reimaged)

- we are given a list of the computer names, and their corresponding MAC addresses, by the manufacturer

 

So, I have been trying to automate the naming process (haven't tried the OU part yet). I would import the computer information, by choosing "import single computer", and inputting the name and MAC. I waited for it to show up, then ran the OSD. Worked perfectly, except it named the computer a random MININT-*******. It actually took the imported computer and renamed it - so the W7-###### is no longer listed in Devices, but the MININT-******* is.

 

Not sure why, and it happens on any test PC in multiple network locations. I have tried prestaging the computer in AD, no effect.

 

I would like to, eventually:

- have a CSV with name,MAC,OU - and import the whole list

- import into SCCM2012

- have the TS deploy Windows, name the PC properly, and put in the correct OU.

 

Any help would be greatly appreciated! Thank you in advance!

Share this post


Link to post
Share on other sites

All this auto-naming stuff is great in theory but why would you want SCCM to autoname machines?

 

Say a single department of 150 new PCs and they were all to be imaged at the same time, how would this auto-naming keep the machines in a nice sequence for we all know some machines may fail OSD for whatever reasons and this means that this machine(s) has missed it's naming stamp and some other machine gets it maybe at that far end of the office (not good)..... Dunno but I like to have some sort of order in the naming sequence so I know exactly where a specific named machine is physically located, this is achieved the old fashioned way via variable/script at OSD time to the new machine and manually entered. This only has to be done once after this just use staged deployment and it will hold onto the old name.

 

So, I have been trying to automate the naming process (haven't tried the OU part yet). I would import the computer information, by choosing "import single computer", and inputting the name and MAC. I waited for it to show up, then ran the OSD. Worked perfectly, except it named the computer a random MININT-*******. It actually took the imported computer and renamed it - so the W7-###### is no longer listed in Devices, but the MININT-******* is.

 

Could you just not deploy your TS(staged deployment) to a collection with this machine/machines in it.... instead of importing them in.........this way they will hold onto their old names, of course considering the ConfigMgr client is on the machine, if they are new machines just use unknown computer support for them as above with a variable configured on the unknown collection or via a script!!

Share this post


Link to post
Share on other sites

All this auto-naming stuff is great in theory but why would you want SCCM to autoname machines?

 

 

My company currently replaces about 1500 lease-end computers each year. I only have a couple of other people on my team to perform this task. The #1 reason that my team wants to use SCCM is to remove as much of the tedious, "heavy lifting" parts of our requirements as possible. We currently use a thick image, sysprepped and cloned on a HDD duplicator. Each computer boots up, and we have to put a monitor/keyboard/mouse on each one individually - so that we can add to the domain, etc. We then have to manually go into AD and move each one to its proper OU. SCCM seems to have the promise of automating all of that; we set things up in SCCM, then just turn the PCs on and let them do everything for us.

 

I don't want to name the computers in a sequence; each computer has a device number sticker put on it at the factory, so it MUST be named with that device number. My hope was to import a CSV with the computer names & MACs, and have SCCM name them accordingly during domain add.

 

However, it appears that SCCM finds the MAC in the collection; goes ahead and names the customer whatever it wants; then changes the name in the collection, as well.

 

The computers are brand-new, so they will not have the client installed on them.'

 

You mention a variable or a script; this sounds like what I need. However, I have no idea how to do this :) Basically, I would just like to have a CSV with computername & MAC, and have SCCM use it to name each PC as it is imaged.

 

Thank you!

Share this post


Link to post
Share on other sites

Have you enabled unknown computer support in your enviornment?

 

If not I would definitley recommend you do and use this method for your new PCs, will save alot of hardship of having to import computer info in, this way all you need do is f12 the machines into PXE and choose your available Task sequences. These will be initially deployed to the built in unknown computer collection and made available not mandatory!

 

This link gives guides on how to prompt for system name during OSD http://www.windows-n...n-manager-2012/

 

You can use the variable that Niall demonstrates or further on down the thread you will see a script that I posted(may I add I found this on the web, so thankyou to the owner of it).

If you use the script that I posted(PromptForSystemName.vbs) then you will have to create a package out of it.

Then add it to your TS as a run command line Task as seen in the screen shot below just after partion disk but before apply OS task!!

 

11.png

This is not automated unfortunately, but as i said it only has to be done once after this any new refreshes, SCCM will hold onto the systems old name. In my working environment I could safely say that we refresh approx 6000 machines per year and maybe add anywhere between 150-250 new machines also and decomission older machines of the same amount, this works for me with little help on the ground also!

Share this post


Link to post
Share on other sites

This will make it easier, but will still require us to type in the names manually. It would be perfect for us, to give SCCM a CSV with the names & MACs, and it do it automatically. (I have to scan the boxes into a spreadsheet with Device#, MAC, and serial# already.)

 

Any ideas? Unfortunately, I am nearly useless in vb scripting :)

Share this post


Link to post
Share on other sites

Is the device number sticker from the factory the serial number for the computer?

 

As a side note, using a web service, you could have SCCM automatically move the workstations into an OU...so that's at least one additional part that could be automated.

 

My concern is that if SCCM is not wanting to name the computer based on the imported info, that you're looking at a light-touch install instead of zero-touch...but the good news to that is that you'd only be required to enter the computer name during deployment.

Share this post


Link to post
Share on other sites

Hi hassel,

 

my first pick for your approach of computer naming would be to use the MDT database for the naming part. There are a lot of scripts around to import data from csv files.

As h4x0r asked already: if you are using the serial number of the machine you can just use MDTs customsettings.ini to apply the name. No importing needed.

  • Like 1

Share this post


Link to post
Share on other sites

Hi hassel,

 

my first pick for your approach of computer naming would be to use the MDT database for the naming part. There are a lot of scripts around to import data from csv files.

As h4x0r asked already: if you are using the serial number of the machine you can just use MDTs customsettings.ini to apply the name. No importing needed.

 

 

Hi! I will look into the OU script (I am not really using MDT yet, as we have accomplished everything else we need without it so far).

 

Unfortunately, the device number is not related to the serial# (or anything else BIOS-specific). We also do not necessarily use the computers in order. (We also want to be able to use this, in case one of them needs to be reimaged in the future and it cannot boot into Windows.)

 

Thank you!

Share this post


Link to post
Share on other sites

Hey ,

 

Quite interesting discussion. Let me make quick comment regarding autonaming. In global enterprise where computer name prefix may depend on certain factor like AD site , asset tag , manufacturer .... having a piece of automation that makes installation of OS totally problem free for users is a great thing to have. Thats why I wrote it.

 

regarding the problem mentioned by @TheHasselhoff if you have that list then with name VS MAC address then you are almost done. For example you could have webservice that accepts MAC address and returns name based on that CSV. Refresh scenarion would not be a problem as SCCM knows what is computer name that is running the task sequence (unless you remove that record from DB for refresh scenario - I personally have one task sequence for all departments and new/refresh scenario which makes life much more easier)

 

Also if you have collection with unknown computers and your task sequence advertised there - if you create collection variable called OSDCOMPUTERNAME without any value it will prompt you for computer name instead of using scripts to do that

 

 

In my previous posts you could seen webservices/console extensions published by me. Today I have published the source code for both. Info is here http://itx-solutions.nl/2013/01/code-source-code-for-webservices-and-sccm-console-extensions-available/

 

Hope it will help ;)

Share this post


Link to post
Share on other sites

Just to confirm I have implemented this service on a test lab. It was an easy installation of the webservice as per the instructions.

I have to say it does work extremely good, as I have tested it out quite a bit on the test lab which consists of 4 test VMs to deploy to. It auto-named them seemlessly and placed them in the target OU specified!! :D

 

I would recommend anyone who is looking for an auto_naming service to definitely try this out.

Thanks rpieniaz

 

Rocket Man

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...