10/15/2019 Hard Drive Serial Number Sccm Client
If a user has more than one hard drive, I suggest you display the available hard drives to the user. Ask him which hard drive he's not planning to upgrade soon, then use that hard drive serial number to generate a license key. This will prevent your user from nagging for a new license key in short time.
Zero Touch Installation (ZTI) is the pinnacle of OS deployment! Once a machine is imaged, ZTI means never visiting the machine again for re-imaging. Think for a second how much time is wasted by having to physically visit each machine when re-imaing! Most organizations believe it is only possible to reach ZTI with solutions like System Center Configuration Manager (SCCM). In fact, I am here to tell you that ZTI is possible without SCCM! Start by importing computers into the MDT Database with PowerShell: What is the MDT Database?
This guide will assume you already have MDT configured and that you have the MDT database setup (though not populated). If you aren’t at the step yet, you can keep reading but you might want to check out these two resources. When MDT is completely configured, you should have a full CustomSettings.ini that pre-populates most of your deployment settings.
You will be left with a few options that have to be manually filled out though. The big two that have to be selected is the computer name and the Task Sequence. This is where the MDT database comes in. The MDT database links future deployments with existing computers. As you can see in the picture above, the physical computer alt01n01 has a computer object in the MDT database. This object stores the computer’s serial number and a fake asset tag (which we will talk about on a future post). When alt01n01 begins imaging, it will search the database for its serial number.
Once found, it will search for custom values that should replace the default values found in CustomSettings.ini. To ensure that no prompt appears during the imaging process, we fill out the OSDComputerName, TaskSequenceID, SkipComputerName, and SkipTaskSequence attributes on our computer object in the MDT database. We do this for all 6,500 computers in our organization!
Holy Crap Batman! How much time does that take! About 15 seconds! Importing computers is actually very easy if you already have the serial numbers of your computers., your serial numbers are automatically recorded for you!
The only trick is to extract the serial numbers from AD and to import them into MDT. Luckily, PowerShell is pretty good at these kind of tricks and can automate this task with a short script. Our script starts by importing the MDT Database PowerShell module and connecting to our MDT database.
If you don’t have the MDTDB module, it can be Next, we search AD for our computers and grab the Name and Description attributes. Our description contains more than just a service tag. By using.TrimStart and.Substring, we can filter out everything but the serial number. If your serial numbers are more than 7 characters long, you will need to change (0,7) to fit your environment.
Finally, we use the New-MDTComputer cmdlet to create our computer object. The real bulk of this command is in the -settings section.
If you need to specify additional settings, just grab the computer attribute from the database and create a new line under SkipTaskSequence. Just be sure to keep the syntax the same (quotes and semicolons). By using the script above, you can effortlessly import all of your computers into the MDT database. By importing computers into the MDT database with PowerShell, you’ve tackled one of the biggest hurdles in getting to a ZTI environment!
![]()
If you have any questions (or improvements), leave a comment! I am currently researching MDT to get to ZTI for my company. I have our WDS pretty much at the point that we manually boot for PXE, tell it the Image to install and format the drive. (We are not sure if we want to setup Wake On LAN to do this, unless you have another option for this) I have it automated to the point that it gets to the login screen from there.
![]()
We currently have almost 80 Vista machines that eventually will be gone and will allow us to use the ADK instead of AIK. I have made an excel file with preconfigured Computer Names, the MAC’s and the OEM Windows Keys for each system.
From my understanding if I can get the MDT Database working will this allow for the serial key to be installed and activated and the Computer Name to be set based on the MAC? We are currently waiting for our last of our 3 images to be finished and I would love to get this into place before that Is built. Thanks for an amazing blog, it is so easy to follow and organized. Sincerely, Richard.
Thanks for commenting (and your kind words)! I am not sure if you are referring to MAC addresses or MAK license keys. So I will answer both ways. ? You can actually modify the your Task Sequence to import the MAK key and activate it for you. Under the state restore phase, create a new command line task that runs: cscript.exe c: windows system32 slmgr.vbs /ipk YOUR-KEY-SEPARATE-BY-DASHES Then create a second command line task that runs: cscript.exe c: windows system32 slmgr.vbs /ato Both of these start in C: Windows System32.
Importorting the MAC addresses (or serial numbers) will let you automatically name machines and preconfigure certain options (like saying that certain machines should get a certain task sequence. Does that answer your questions? What benefits does this have?
It looks relatively simple, but I am trying to think forward and see where this would help us. We typically only image computers when doing a refresh, or when we have turnover, which is rare. I am usually doing a side by side refresh, so typically a user will have the same computer image for three years, and then we refresh them with a new computer. We use WSUS to update the image, and I push application packages when there are updates to our apps. We are considering Windows 8.1 this year, so that may make this worthwhile, but could you please elaborate on what kind of things this will help us do?
Zero Touch Installation is the pinnacle of OS deployment. With ZTI, you can remotely image machines without having to input any information. You can even setup scheduled imaging with Active Directory.
For example, we can place a group of computers into a security group for automatic imaging. A few months ago, we switched about 200 computers from an X86 to an X64 OS without any user intervention. The machines powered up at 3:00 AM and were running a whole new OS before the workday began. Does that explain some of the benefits?
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |