The Deployment Bunny

Subscribe to The Deployment Bunny feed The Deployment Bunny
OS Deployment, Virtualization, Microsoft based Infrastructure...
Updated: 40 min 22 sec ago

Nice to Know – Improve Bare Metal Deployment success rate in System Center Virtual Machine Manager

Tue, 11/04/2014 - 21:33

Bare Metal Deployment in SCVMM is a bit different compared to everything else, since it is using a push method. So instead of having some kind of client application controlling the deployment, the SCVMM server is controlling the OS Deployment. There could be issues, since SCVMM is building team and switches and there is a chance that SCVMM will loose connectivity to the host and the Bare Metal Deployment stops. In many case that is related to DNS and DNS cache, since that is the method used to be able to connect to the host during deployment. By decreasing the DNS cache timeout on the SCVMM server the success rate will improve very, very much.

How to fix it?

Logon to your SCVMM server and execute the following PowerShell commands to set the DNS Cache to a minimum and restart the DNS Cache services

New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" -Name "MaxCacheTtl" -Value 5 -PropertyType "DWORD" -Force New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters" -Name "MaxNegativeCacheTtl" -Value 5 -PropertyType "DWORD" -Force Restart-Service -Name Dnscache -Force -Verbose


Categories: MDT

PowerShell is King – Testing OS Deployment Web Services using PowerShell

Sun, 11/02/2014 - 17:27

Recently I was setting up Maik Kosters OS Deployment Web Services for a customer and I need to test them, sure, you can do that interactively directly by running them, but I wanted the “PowerShell” way to do it.

You can get the Web Services from Maik Koster here:

Testing a Web Services the Non PowerShell Way.

Browsing to the Web Services

Select the DoesComputerExists

Type in a value and Invoke.

Testing a Web Services the PowerShell Way.

Since PowerShell has the function built-in it is very much a no-brainer.

To connect and get all members from the Web Services execute this:

$ADWebS = New-WebServiceProxy -Uri http://MDT01/OSD/ad.asmx?WSDL $ADWebS | Get-Member -Type Method

That will give you something like this back

To connect and get one member with some detail execute this:

$ADWebS = New-WebServiceProxy -Uri http://MDT01/OSD/ad.asmx?WSDL $ADWebS | Get-Member -Name DoesComputerExist -Type Method | Format-List

That will give you something like this back

So, to test the DoesComputerExists with a value you can now execute the following:

$CompuerNameToTest = "MDT01" $ADWebS = New-WebServiceProxy -Uri http://MDT01/OSD/ad.asmx?WSDL $ComputerExistsInAd = $ADWebS.DoesComputerExist("$CompuerNameToTest") Write-Host "The Computer $CompuerNameToTest exists in Active Directory: $ComputerExistsInAd"

So if the Computer Exists in Active Directory you should get something like this back


Categories: MDT

TechEd EU 2014 – WIN-B314

Sun, 11/02/2014 - 16:42

During the session I did demo some scripts and here they are:

Script to configure the Build LAB Deployment share: Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1" New-PSDrive -Name "DS001" -PSProvider MDTProvider -Root "E:\MDTBuildLab" #Set permisions correct net share E:\MDTBuildLab '/grant:EVERYONE,change' icacls E:\MDTBuildLab\Captures /grant '"MDT_BA":(OI)(CI)(M)' icacls E:\MDTBuildLab\Logs /grant '"MDT_BA":(OI)(CI)(M)' #Create the folder structure new-item -path "DS001:\Applications" -enable "True" -Name "Install" -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Applications" -enable "True" -Name "Action" -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Operating Systems" -enable "True" -Name "Windows 8.1 x64" -Comments "" -ItemType "folder" -Verbose new-item -path "DS001:\Task Sequences" -enable "True" -Name "Ref" -Comments "" -ItemType "folder" -Verbose #Import the OS import-mdtoperatingsystem ´ -path "DS001:\Operating Systems\Windows 8.1 x64" ´ -SourcePath "G:\Raw\Windows 8.1 x64" ´ -DestinationFolder "W81X64-001" ´ -Verbose #Create the Task Sequence import-mdttasksequence ´ -path "DS001:\Task Sequences\Ref" ´ -Name "Ref Windows 8.1 x64 Enterprise" ´ -Template "Client.xml" -Comments "" ´ -ID "RW81X64" -Version "1.0" ´ -OperatingSystemPath "DS001:\Operating Systems\Windows 8.1 x64\Windows 8.1 Enterprise in W81X64-001 install.wim" ´ -FullName "ViaMonstra" ´ -OrgName "ViaMonstra" ´ -HomePage "about:blank" ´ -Verbose Set-ItemProperty -Path DS001: -Name Boot.x86.LiteTouchWIMDescription -Value 'MDT Build Lab x86' Set-ItemProperty -Path DS001: -Name Boot.x86.LiteTouchISOName -Value 'MDT Build Lab x86.iso' Set-ItemProperty -Path DS001: -Name Boot.x64.LiteTouchWIMDescription -Value 'MDT Build Lab x64' Set-ItemProperty -Path DS001: -Name Boot.x64.LiteTouchISOName -Value 'MDT Build Lab x64.iso' Set-ItemProperty -Path DS001: -Name SupportX86 -Value 'False' Script to bulk import applications

Wrapper for C++

Script to download all C++

Sample Custom Settings.ini


Categories: MDT

TechDays Sweden 19-20/11 – Den nya generationens datacenter

Wed, 10/15/2014 - 20:11

(in Swedish)

Den 18 november, d.v.s. en dag INNAN TechDays öppnar portarna för årets Microsoft konferens I Sverige kommer jag och Markus Lassfolk att köra en hel dag kring frågan hur man bygger datacenter numera. Design kommer i huvudsak röra det som kallas converged och innehållet för dagen kommer att handla om

Hyper-V, design, best pratices, nätverk, VMQ, RSS, RDMA, CPU, Minne, IOPS, Storage Spaces, Scale-Out Files server, NVGRE networks, Gateway och mycket, mycket mer. Ska du bygga, håller du på att bygga, ska du kasta ut VMware och vill veta från oss som gör det på löpande band. Kom…


Categories: MDT

Nice to Know–Microsoft Virtual Machine Converter 3.0 released to web

Mon, 10/13/2014 - 15:27

Now with P2V, yes!

New Features in MVMC 3.0
The 3.0 release of MVMC adds the ability to convert a physical computer running Windows Server 2008 or above server operating systems or Windows Vista or above client operating systems to a virtual machine running on Hyper-V host.

Standard stuff is:

  • Converts virtual disks that are attached to a VMware virtual machine to virtual hard disks (VHDs) that can be uploaded to Microsoft Azure.
  • Provides native Windows PowerShell capability that enables scripting and integration into IT automation workflows.
    Note The command-line interface (CLI) in MVMC 1.0 has been replaced by Windows PowerShell in MVMC 2.0.
  • Supports conversion and provisioning of Linux-based guest operating systems from VMware hosts to Hyper-V hosts.
  • Supports conversion of offline virtual machines.
  • Supports the new virtual hard disk format (VHDX) when converting and provisioning in Hyper-V in Windows Server® 2012 R2 and Windows Server 2012.
  • Supports conversion of virtual machines from VMware vSphere 5.5, VMware vSphere 5.1, and VMware vSphere 4.1 hosts Hyper-V virtual machines.
  • Supports Windows Server® 2012 R2, Windows Server® 2012, and Windows® 8 as guest operating systems that you can select for conversion.
  • Converts and deploys virtual machines from VMware hosts to Hyper-V hosts on any of the following operating systems:
  • Windows Server® 2012 R2
  • Windows Server® 2012
  • Windows Server 2008 R2 SP1
  • Converts VMware virtual machines, virtual disks, and configurations for memory, virtual processor, and other virtual computing resources from the source to Hyper-V.
  • Adds virtual network interface cards (NICs) to the converted virtual machine on Hyper-V.
  • Supports conversion of virtual machines from VMware vSphere 5.5, VMware vSphere 5.0, and VMware vSphere 4.1 hosts to Hyper-V.
  • Has a wizard-driven GUI, which simplifies performing virtual machine conversions.
  • Uninstalls VMware Tools before online conversion (online only) to provide a clean way to migrate VMware-based virtual machines to Hyper-V.
    Important MVMC takes a snapshot of the virtual machine that you are converting before you uninstall VMware Tools, and then shuts down the source machine to preserve state during conversion. The virtual machine is restored to its previous state after the source disks that are attached to the virtual machine are successfully copied to the machine where the conversion process is run. At that point, the source machine in VMware can be turned on, if required.
    Important MVMC does not uninstall VMware Tools in an offline conversion. Instead, it disables VMware services, drivers, and programs only for Windows Server guest operating systems. For file conversions with Linux guest operating systems, VMware Tools are not disabled or uninstalled. We highly recommend that you manually uninstall VMware Tools when you convert an offline virtual machine.
  • Supports Windows Server and Linux guest operating system conversion. For more details, see the section “Supported Configurations for Virtual Machine Conversion” in this guide.
  • Includes Windows PowerShell capability for offline conversions of VMware-based virtual hard disks (VMDK) to a Hyper-V–based virtual hard disk file format (.vhd file).
    Note The offline disk conversion does not include driver fixes.

Categories: MDT

Nice to Know–Deploying Windows Server Technical Preview on HP Proliant Microserver Gen 8

Fri, 10/10/2014 - 18:49

I use the HP Microserver Gen 8’s at home, since they are quiet and act as a full-grown server with full iLO support, dual network adapters and then some. I can basically do all kinds of testing with new operating systems and system center management platforms without upsetting my family to much and that is very practical.

During the deployment of Windows Server Technical Preview everything worked as expected. After the installation I added the Hyper-V role to start testing to deploy VM’s. I booted up the MDT Boot image, selected the Task Sequence and the install was working great, but hey, the network performance???

According to ImageX it will take 45 minutes to lay down the image! That cannot be correct, there is something wrong here. That kind of slow performance over the network just have to be an issue.. and it is…

You need to update the network driver for the built-in network adapters in HP Proliant Microserver Gen 8.

The built in driver is a Broadcom Nextreme driver and that does not work correctly with Hyper-V

Download the HP Ethernet 1 GB 2-port 332i Adapter driver from HP and install that instead, the 45 minutes is now just 5 minutes…

Happy Deployment.

Categories: MDT

PowerShell is King – vNext Hyper-V gets support for Network Device Naming

Fri, 10/03/2014 - 21:34

And that my friends is GREAT. Basically that means you can create a a VM Network Adapter in Hyper-V while the VM is running (also a new feature), give it a name and enable Device Naming on the VM Network Adapter and then inside the VM find the Network Adapter using PowerShell and configure it without using the Mac Address as the identification.

Create the Network Adapter:
  • Create the NIC while the VM is running (just for the fun of it) using PowerShell
    • Add-VMNetworkAdapter -VMName SRV101 -SwitchName UplinkSwitch -Name MikesNIC01 -Verbose
  • Enable Device Naming
    • Set-VMNetworkAdapter -VMName SRV101 -Name MikesNIC01 -DeviceNaming On -Verbose
  • Verify Device Naming using PowerShell, or Settings, or directly in the Hyper-V Manager
    • Get-VMNetworkAdapter -VMName SRV101 | Format-List Name, DeviceNaming

Log in to the VM:

Using PowerShell you can now get the network adapter name in the VM with the name gave network adapter in the parent partition.

  • Get-NetAdapterAdvancedProperty -Name * | Where-Object -FilterScript {$_.DisplayValue -LIKE “Mike*”}

You can also see this as properties in the Network Adapter.


This gives us an easier way to automate the creation/configuration of VMs when it comes to handing over a task from the host to a VM when building solutions.


Categories: MDT

Nice to Know about vNext – Windows Update will take care of Integration Services, no more vmguest.iso

Fri, 10/03/2014 - 17:57

For various reasons this has been a major “challenge”, and it seems that someone listen to the right other one.

Thank youi, thank you.

Need more news?


Categories: MDT

Windows Server vNext – If you are in to Windows Server you should read this

Tue, 09/30/2014 - 17:18

Today Microsoft started to talk about Windows 10, but also the Server and System Center stuff. Want to know more?


Categories: MDT

Windows 10 – Get in the Windows Insider Program, and Get Windows 10

Tue, 09/30/2014 - 17:13

Today Microsoft start to talk about Windows 10, the next version of Windows and if you need to get your hands dirty you should read this:


Categories: MDT

Building Next Gen Datacenter – The Pelicase Portable Datacenter

Sat, 09/27/2014 - 20:11

The cloud is great, but sometimes you really need to have a portable solution and here it is. I call it the Pelicase Datacenter (someone used that name in a twitter feed and I think its kind of cool.)

The Pictures

The complete setup with my Laptop on the right side and the Pelicase Datacenter on the left. They are connected using a 1GB network cable.

A closer look at the Pelicase Datacenter.

In the front you can see the LED USB light used to light up the keyboard that is in front of the case.

The TINY Router, configured for routing using cable or 3/4G and support for Wireless access to the Datacenter.

The 6 PSU’s need for the 6 Intel NUC’s.

The GB Switch.

The 6 Intel NUC’s, 5 of them is running Hyper-V and the last one is running Windows 8.1

The Shopping list The Case:

The Router/Wireless/Firewall:

The Screen:

The Switch (current):

The Switch (previous):

The USB LED Lamp:

The Intel NUC’s:

Supported Memory:

Memory I use:

Disk drives:

The keyboard and mouse:


All NUC’s runs Windows Server 2012 R2 as Hyper-V hosts, but there is a whole lot more around the software and configuration, so this last part will be updated later this week(end)

Setup & Configuration:



Categories: MDT

Sample files and links from The Ultimate Event II roadshow

Wed, 09/24/2014 - 19:41

During the roadshow we have done a lot of demos and most of the demos are based of scripts (PowerShell mainly) and we promised make sure that all our attendees could download them, so here they are.

You will find the rest of the scripts here

First Session: Getting data from SCVMM and Active Directory

#Get the number of VM’s
Get-SCVirtualMachine | Measure-Object

#Get all MACaddresses, group them and it is very easy to see if you have more then one nic with the same mac twice
Get-SCVirtualMachine | Select-Object -ExpandProperty VirtualNetworkAdapters | Group-Object MACAddress

#Get all the OS you are running and the amount of each version
Get-SCVirtualMachine | Group-Object OperatingSystem | Sort Count -Descending | Select Name, Count

#Get the number of unknown OS running in your fabric
Get-SCVirtualMachine | Where-Object { $_.OperatingSystem -like "Unknown" } | Group-Object Cloud | Select-Object Name, COunt

#Get all VM’s that are running on a snapshot, including the name and the date of the snapshot
Get-SCVirtualMachine | Select -ExpandProperty VMCheckpoints | Select VM, AddedTime

#Get the number of VM’s using a dynamic MacAddress
Get-SCVirtualMachine | Select -ExpandProperty VirtualNetworkAdapters | Where { $_.MACAddressType -eq "Dynamic" } | Measure-Object

#Get all the VM’s that are using a dynamic MacAddress
Get-SCVirtualMachine | Select -ExpandProperty VirtualNetworkAdapters | Where { $_.MACAddressType -eq "Dynamic" } | Select Name

#Get All Servers from OU,s and then get the nams and IP’s 
$Servers = @(Get-ADComputer -Filter * -Properties ipv4Address, OperatingSystem -SearchBase "OU=Server,OU=Cloud,DC=cloud,DC=truesec,DC=com")
$Servers += @(Get-ADComputer -Filter * -Properties ipv4Address, OperatingSystem -SearchBase "OU=Domain Controllers,DC=cloud,DC=truesec,DC=com")
$Servers | Select-Object DNSHostName,ipv4Address | Out-GridView

Second Session: Ref Image and CustomSettings.ini

The sample files for customsettings.ini can be found here:






Categories: MDT

Nice to have–VB Script Wrapper for all VC++ installers to be used in MDT

Wed, 09/24/2014 - 19:23

During todays session at The Ultimate Event I did a demo of a VBscript Wrapper that install all VC++ runtimes. Mr “Someone” asked if it was published and I said yes, I was wrong so here it is.

The Script

The script will install all versions of VC++ on 32 and 64 bit machines as an application in a task sequence, that way you don’t need to have one application for each VC++ application.

Download the script from here

The Task Sequence

After you have added the application in the MDT workbench, add the application to the Workbench like this:

The Application

When importing the application it should look like this:

The folder

The folder needs to have all the VC++ files organized in a folder structure that looks like this:

You can use the script in the following folder to download all files in the correct folder structure. Check this blog post:


Categories: MDT

PowerShell is King–Enable remote command with network access using CredSSP

Mon, 09/22/2014 - 19:20

This all but new, but a friend of mine needed to install an update on a bunch of servers yesterday, he figured out how to execute the update but did not have the time to fix the needed configuration in active directory to setup Kerberos Delegation correctly. I told him that it can be done using CredSSP. It is possible to configure CredSSP using group policy, but there are some issues regarding certain software that does not like that configuration using policy’s and therefore I use PowerShell to set this up.

What is CredSSP?

Basically it allows you to store the credentials on the remote computer to allow you to take the double hop to the next computer, think of it as connecting using RDP and in the RDP session you connect to a file share. We all do that and we don’t think of that as anything strange, but it we should since we are doing a double-hop which is one of those long lasting issues with credentials in the Windows world. You can read about this any MANY locations, one of them is here:

The Script.

Download it from:

The script will configure your client (the machine you are using as your remote computer, in other words, the machine you are interactively logged on to) and the it will then configure the computers that needs to be able to store your credentials so that they can be used to access files from a network share, finally it will test and verify that it works by accessing a remote file share.

The script.


Categories: MDT

PowerShell is King – Bulk import applications I MDT

Wed, 09/03/2014 - 09:30

Often I need to import applications into the Deployment workbench and that is fine. The process is easy and fast, but it is boring and if you have more then 5 apps it is really boring. Based on the fact that almost all my apps in MDT is deployed using VB or PowerShell wrappers its is just one file in a folder and then there is a subfolder with the content. You don’t need to be a genius to figure out that 90% of all the apps pretty much have the same folder and file structure in the root of the application folder, so why don’t we use PowerShell to import all the apps based on some guessing?

The Logic:

This parts can be modified, edit, or you can add your own. Basically it reads the from the folder structure you specify and the script will then scan the folder structure for folders, assuming that every folder is an application. If it finds .msi, .msu, exe, .bat, .wsf, or .ps1 files it will then import them as applications. The important thing is that it will import the first “hit”. That means that you should store the real setup files in a subfolder, I usually use .\Source as the source folder. Here you can see the .WSF part logic

Part of the script.

The command line:

This is the tricky part, since there is no way to know that it will be a guessing game and the command line might need to be modified after import, but I rather modify 2-3 applications instead of importing all of them manually.

The default cmdline for all imported apps will be:

.EXE "$Install /q" .MSI "msiexec.exe /i $Install /qn" .MSU "wusa.exe $Install /Quiet /NoRestart" .PS1 "PowerShell.exe -ExecutionPolicy ByPass -File $Install" .WSF "cscript.exe $Install" The Script:

The script is rather easy, it takes 2 parameters. The folder from where to import and the deployment share. You need to have MDT installed since it is using PowerShell cmdlets from MDT. The syntax for the script looks like this:

.\Import-MDTApps.ps1 -ImportFolder C:\Script\AppFolder -MDTFolder C:\MDTBuildLab

you could also add –Verbose if you like lots of text on the screen.

Output when using –Verbose during import.

You can download the script here:


Categories: MDT

Issue – Emulex Nic in Windows Server 2012 R2 with VMQ still does not work

Wed, 09/03/2014 - 05:40

Today, working at a customer deploying Hyper-V hosts with Emulex CNA1100 we run into issues (did not surprise me, since the issue have been around for more than a year, but I still try and test to see if it ever gets better).

The issue is that VMQ still needs to be disabled on every Emulex NIC. That bad thing is that the issue has been around for a very, very long time. It took a very long time for the vendor to acknowledge the issue and now they state that there is a solution soon to be released. I really hope that, but I have heard it before…

Read more here:

My simple recommendation is to disable VMQ in all Emulex Network adapters if they are installed in Windows Server 2012 R2 or buy something that works and use VMQ.

When they release something that actually works I will remove this blog post.


Categories: MDT

Issue (Hyper-V/SCVMM) – VMM cannot complete the host operation on the HOST server because of error:Storage for virtual machine ‘HOSTNAME’ failed with error ‘The device is not ready.’ (0x80070015)

Thu, 08/28/2014 - 09:22
Issue: When trying to migrate a VM’s storage to a local device using SCVMM you could see this:

Error (12700)
VMM cannot complete the host operation on the HOST server because of the error: Storage migration for virtual machine ‘VM’ (GUID) failed with error ‘The device is not ready.’ (0x80070015).

Operation not allowed for virtual machine ‘VM’ because Hyper-V state is yet to be initialized from the virtual machine configuration. Try again in a few minutes.(Virtual machine ID )
Unknown error (0x800c)

When trying to migrate a VM’s storage to a local device using Hyper-V manager you could see this:

"Storage migration for virtual machine"HOST’ failed.
Operation not allowed because the replication state is not initialized.
Storage migration for virtual machine "HOST’ failed with error ‘The device is not ready’ (0x80070015)."


So far the only solution I have found, tried (and it did work) is to restart the Hyper-V management service.

Categories: MDT

My sessions at TechEd Europe 2014

Wed, 08/27/2014 - 10:00
TechEd Europa 2014

TechEd Europe is Microsoft’s premier technology conference for IT Professionals and Enterprise Developers, providing the technical education, product evaluation, and community resources to plan, architect, deploy, manage and secure a connected enterprise. TechEd Europe will be held October 28-31 at Fira Barcelona in Barcelona, Spain. For more information:

PRC05: Deploying and Managing Windows in the Real World

What does it take for organizations to deploy and manage Windows 8.1 and Windows Phone? During this all-day seminar, examine the requirements needed to execute the entire process. We ensure that you understand what has changed in Windows 8.1, how you prepare for a Windows 8.1 migration, how to create your Windows 8.1 image, how to deploy Windows 8.1, and how to deploy Windows Store apps to the already-deployed computers using an enterprise app store. Regardless of whether you are new to Windows deployment and management, new to Windows 8.1, or an existing Windows 7 or Windows XP expert, there will be benefits for all attendees, from “how-to’s” to best practices, to tips and tricks

WIN-B314: Deploying Windows 8.1 Using Microsoft Deployment Toolkit (MDT)

If your job contains the duty of deploying Windows 8/8.1 and you would like to do this using the free tools provided by Microsoft, this session is for you. During the session we cover the basic steps to install the solution and the configure it. We explain things like reference images, Windows Deployment Services, Microsoft Deployment Toolkit, Lite Touch, new computer scenario, refresh old computers and how to replace old computers while keeping the user data and re-installing applications.

A message from Mike:

You are invited and very much welcome to my sessions. If you do have the time to join the sessions, please don’t hesitate to swing by the podium before or after sessions, it’s ok to just say hi. I hope to see U.

Categories: MDT

PowerShell is King – Download all VC++ runtimes using a script

Tue, 08/05/2014 - 16:40

Yes, it is true, sine I create reference images for customers i always need the VC++ runtimes, and yes i need all of them. Microsoft actually has one page with all the latest versions, well the page points to all the separate downloads, anyway. Since automation is nice and PowerShell is a god workhorse to do the job i used one of my old download engine and modified it slightly.

How does it work?

The script reads 2 parameters from the command line, the XML file and the download folder. In the XML file each file has its settings (some of them not used here), basically the URL, name of file, where to store it and things like that. The script does a for each loop until all files has been downloaded, if one file could not be downloaded, just run the script once more and it will download the missing files, not touching the existing ones

Step-By-Step, kind of

Download the script and the XML file from this location

Remove the Windows Download Blocking (You know, right click on file, properties, unblock)

Execute the script from an elevated PowerShell prompt like this

.\Get-Downloads.ps1 -DownloadFile .\download.xml –DownloadFolder  ‘C:\Downloads’

Wait until done

In the C:\Downloads folder you should now have a separate folder for all VC++ runtimes.


Categories: MDT

PowerShell is King – Create the “missing” VM on all the lab machines

Wed, 07/09/2014 - 14:26

Lets assume that you are running a class and suddenly someone raise the hand and say “I’m missing one of the VMs…” That is far from god, but wait a minute, what about PowerShell to the rescue?, of course, so here it is:

Code snip below:

$servers = 1..21 | ForEach-Object {
“VIAMONSTRA{0:D3}” -f $_

foreach ($Server in $Servers)
    Invoke-Command -ComputerName $Server -ScriptBlock {
        #$VMName = "FS01"
        #$VMMemory = 2048MB
        #$VMDiskSize = 60GB
        #$VMNetwork = "Internal"
        #$VMLocation = "C:\VMs"
        #New-VM -Name $VMName -Generation 2 -MemoryStartupBytes $VMMemory -SwitchName $VMNetwork -Path $VMLocation -NoVHD | Out-Null
        #New-VHD -Path "$VMLocation\$VMName\Virtual Hard Disks\$VMName-Disk1.vhdx" -SizeBytes $VMDiskSize | Out-Null
        #Add-VMHardDiskDrive -VMName $VMName -Path "$VMLocation\$VMName\Virtual Hard Disks\$VMName-Disk1.vhdx" | Out-Null

Categories: MDT