The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

OS Deployment – Out Of Band install of Windows Server 2012 R2 Using MDT,WDS and PowerShell

Posted by Mikael Nystrom on December 29, 2013

PowerShell is amazing, it is now possible to do all those things I know would be possible, but did require compiled code or time I don’t have (Still working as an consultant in the real world you know). In my line of work besides automation, flexibility is one other keyword and that is very often used in conjuction with Windows Server deployment. Now, Windows Server is also amazing, it is a multipurpose operating system and multipurpose also means that while client deployment is pretty standard these days, server deployment is not even close to that. In SCCM we have great OS Deployment (even better with MDT integration), but in many cases I’m not allowed to use it. MDT is very flexible and many orgs are using MDT for server deployment and SCCM for clients and they have their reasons, but MDT lacks some of the features that SCCM/MDT does have. We also have an upcoming star and that is SCVMM, while SCVMM has some of the benefits that SCCM have but MDT does not have, well you get the point. But, if you could have bits and pieces from each and every one, and does not require an investment in System Center knowledge, what about having only Active Directory. Windows Deployment Services, DHCP/DNS, MDT and a PowerShell script? Wouldn’t that be nice?

The parts

It is not that hard to setup and configure, but still, there is a lot of moving parts and you need to understand them all, therefore it is dived in the following parts for more details
(note I’ll add the links as soon as I have written them, ok)

  • OS Deployment – Out Of Band install of Windows Server 2012 R2 Using MDT,WDS and PowerShell (Part 1–Getting the Hardware info)
  • OS Deployment – Out Of Band install of Windows Server 2012 R2 Using MDT,WDS and PowerShell (Part 2–Pre-stage device in AD)
  • OS Deployment – Out Of Band install of Windows Server 2012 R2 Using MDT,WDS and PowerShell  (Part 3–Pre-stage device in MDT)
  • OS Deployment – Out Of Band install of Windows Server 2012 R2 Using MDT,WDS and PowerShell (Part 4–Controlling Power remote)
  • OS Deployment – Out Of Band install of Windows Server 2012 R2 Using MDT,WDS and PowerShell (Part 5–Controlling Drivers)
  • OS Deployment – Out Of Band install of Windows Server 2012 R2 Using MDT,WDS and PowerShell (Part 6–Apps and Firmware)

The Script

If you know this stuff and just need the script, download it from here: http://sdrv.ms/JCo5bO

Run Import-Module .\ServerDeployment-v1.psm1 –Verbose to import the module

image

run Get-Module to verify

image

To see all the functions you now have, just run Get-Command – Module ServerDeployment-v1

image

to get all the command syntax, just type Get-Command -Module ServerDeployment-v1 –Syntax

image

There is builtin help with command samples, just use Get-Help Command to get the help

image

Note: The script will assume certain things:

There are just a few hardcoded paths, its for the  two modules (yes, there are others way to solve the problem)

Make sure the dependent POSH modules are located here:

  • Import-Module ‘C:\Program Files\Hewlett-Packard\PowerShell\Modules\HPiLOCmdlets’ -ErrorAction Stop
  • Import-Module ‘C:\Program Files\Microsoft Deployment Toolkit\MDTDB.psm1′ -ErrorAction Stop

One last thing, this is not for beginners, you really need to understand the bits and pieces this time.

/mike

3 Responses to “OS Deployment – Out Of Band install of Windows Server 2012 R2 Using MDT,WDS and PowerShell”

  1. […] Riktar även ett stort tack till Micke Nyström för inspirationen jag hämtat från hans Out Of Band install of Windows Server 2012 R2 Using MDT,WDS and PowerShell inlägg och tillhörande script som gör de samma med fysiska HP servrar. Powershell is […]

  2. […] OS Deployment – Out Of Band install of Windows Server 2012 R2 Using MDT,WDS and PowerShell […]

  3. […] This is post refers to this post http://deploymentbunny.com/2013/12/29/os-deployment-oob-install-of-windows-server-2012-r2-using-mdtw… […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 3,711 other followers

%d bloggers like this: