OBXMAN007
Contributor
Contributor

Create Multiple VMs for Server 2008 R2 and SYSPREP

Hello!

Thanks to Luc (LucD), I have some starter code that will create vms en masse (see below).

In addition though, I need to be able to successfully perform a SYSPREP on the vms once created (re-SID, etc.. We currently use some xml code in our OScustomizationSpec setup, but I don't know how to make SYSPREP work for server 2008 R2 once the vm has been created.

Thanks in advance for any and all assistance:

Luc's modified code:

$ErrorActionPreference = "SilentlyContinue"

$vmhost = Get-vmHost esxhost001.mc.vanderbilt.edu

$esxName = $vmhost

$modelVm = "WINDOWS_SERVER_2008_R2_X64_THIN"

$newVmList = "NEWVM001","NEWVM002","NEWVM003"

$taskTab = @{}

  1. Create all the VMs specified in $newVmList

foreach($Name in $newVmList){

$taskTab = $Name

}

0 Kudos
2 Replies
FranckRookie
Leadership
Leadership

Hi Obxman007,

There are examples on how to Sysprep deployed VMs using Powershell in the following articles: link 1 and link 2

Hope it helps

Regards

Franck

OBXMAN007
Contributor
Contributor

Thanks Franck - I will check these out

Michael

0 Kudos