Powershell Deployment Toolkit quick startup #sysctr #wapack

Powershell deployment toolkit is a great accelerator to have your System Center POC environment up and running in a few hours. Until recently I seldom used it, but the need to prepare a “CloudOS POC in a Day” made me realign to the latest version. This post is more a collection of notes than a guide, but since the procedures described saved me a lot of time I decided to share them with the community.

The goal is to make PDT easily portable on different customer environments and remove, as far as possible, any dependency on the system drive avoiding if possible coping all the source binaries to the first VM created.

So this post is about a quick use of PDT with the default parameters including a Domain Controller setup using a custom repository for binaries. It’s by no way the final word on PDT, but if you want to have a CloudOS environment up and running without thinking about the fine tuning this is going to help.

All the actions must be accomplished on a Windows 8.1 or Windows Server 2012 R2 machine. Create a vdisk at least 50 GB in size, this will be the common repository for PDT. You can share it from a networked system or mount it directly on your VMs or host systems. Let’s call it PDT. It will be mapped/mounted as P: on the Hyper-v host and on DC01.contoso.com (i.e. the system we will use to install the environment).

As usual this post will be a work in progress and be regularly updated with my PDT experiences.

Preparation steps.

Let’s start with a few links of needed software and proper deployment:

          PDT http://gallery.technet.microsoft.com/PowerShell-Deployment-f20bb605 – Expand in P:\

          PDT GUI http://gallery.technet.microsoft.com/PDT-GUI-for-Powershell-6908b819 – not used in this post

          7-Zip http://www.7-zip.org/download.html – Install on the system used to download binaries

          Convert-WindowsImage.ps1 http://gallery.technet.microsoft.com/Convert-WindowsImageps1-0fe23a8f – Expand in \PDT

          Web Platform Installer http://www.microsoft.com/web/downloads/platform.aspx – Install on the system used to download binaries

          Other software that needs to be manually downloaded and expanded

o   Windows Server 2012: http://technet.microsoft.com/en-us/evalcenter/hh670538.aspx -> p:\Installer\WindowsServer2012

o   Windows Server 2012 R2: http://msdn.microsoft.com/en-us/library/dn205302.aspx -> p:\Installer\WindowsServer2012R2

o   System Center 2012 R2: http://msdn.microsoft.com/en-us/library/dn205295.aspx  -> p:\installer\SystemCenter2012R2

§  Operations Manager -> OperationsManager.en (remember .en or you have to change workflow.xml)

§  Virtual Machine Manager -> VirtualMachineManager

§  Service Manager -> ServiceManager

§  Orchestrator -> Orchestrator

§  Data Protection Manager -> DataProtectionManager

§  Configuration Manager -> Configuration Manager

§  AppController -> AppController

Environment configuration

The you must setup the environment, this need to be done once, then you can reuse the settings for all the deployments that you need:

          In PDT Copy VariableAD.xml to Variable.xml, to have a the domain created for you. You can find more variable.xml samples here (https://github.com/ThojoUno/PDT)

          Create the following folders

o   P: \Installer

          Change the following variables in variable.xml

o     <Variable Name=”SourcePath” Value=”P:\Installer” />

o     <Variable Name=”Download” Value=”P:\Installer” />

o     <Variable Name=”TempPath” Value=”$SystemDrive\Temp” /> This must be left unchanged if not the installer will fail. It is used for file sharing checks, so the drive must exists on every VM.

o   Set SystemCenter2012ProductKey in variable.xml, it is not marked as required but it is for DPM.

          Launch Downloader.ps1 from a powershell admin prompt

          Adjust versioning

o   From P:\Installer\Prerequistes\ADK81 take note of adksetup.exe version (currently 8.100.26629) and change the corresponding entry in Workflow.xml

    <Installable Name=”Windows Automated Deployment Kit 8.1″>

      <Variable Name=”WindowsAutomatedDeploymentKit81Source” Value=”Prerequisites\ADK81″ />










          <Argument>/silent /layout $Download\$DownloadFolder</Argument>

o   Launch Downloader.ps1 –DeploymentOnly to check and process what’s needed. Repeat this step until everything is reported ok

Deploy the environment

o   On the hyper-v host map P: to the file repository (so that P:\installer will contain the downloaded files)

o   On the hyperv host prepare 2 base sysprepped images for Windows Server 2012 R2 and Windows Server 2008 R2. If you don’t have any ready, you can use Convert-WindowsImage.ps1 –SourcePath p:\Installer\WindowsServer2012R2\Sources\Install.wim VHDFormat VHDX Edition “ServerDataCenterEval” SizeBytes 40GB VHDPartitionStyle MBR RemoteDesktopEnable

Same thing must be done for the Windows Server 2008 R2 media, this is needed if you want the Service manager Sharepoint based user portal. I strongly recommend to use the created vhdx to startup a VM and make a windows update or a dism offline servicing. Copy the two vhdx on your hyper-v host say in E:\PDT\VHD and name them WS12R2D.vhdx and WS08R2E-SP1.vhdx

Modify Variable.xml setting the proper paths:










o   Create a Virtual Switch on you hyper-v host (it can be external or internal, better not private since it is probable you want the VMs to access the host). Remember the VM must be able to access your PDT share if you want to, if you mount the vdisk it can be completeòy isolated. Name it “PDT – Internal” (os something meaningful). Modify variable.xml to set the Virtual Switch accordingly set the VMFolder variable as well (for example to E:\PDT\VMs)





















o   To create the virtual machines launch VMCreation.ps1 from the hyper-v host (remember to map the P: drive)

o   Once finished logon to DC01.contoso.com wait for the running powershell script to finish. It must terminate in error on the validation path steps, since it doesn’t have access to the source files.

o   Map the P: drive. Launch c:\temp\setup.bat from an admin prompt. [If you want you can launch in powershell admin mode Installer.ps1 –ValidateOnly everything should be ok, if not fix it and then launch Installer.ps1 and you’ve done.]

Advanced Usage

Never modify workflow.xml, instead add one or more files named Extender*.xml with the same structure of workflow.xml in the PDT directory.

Variables defined in variable.xml take precedence over workflow.xml variables. I prefer to modify only the former.

  • Daniele This posting is provided “AS IS” with no warranties, and confers no rights.
  1. Leave a comment

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

%d bloggers like this: