The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Archive for the ‘Uncategorized’ Category

Nice to Know – Microsoft Live Writer has been forked and you should use Open Live Writer instead

Posted by Mikael Nystrom on February 29, 2016

I have been using Microsoft Live Writer for as long as I can remember, but someone decided it should slide away. But a group of people forked the source code and started to develop “Open Live Writer”, currently the look and feel is about the same, works great, no issues so far.

You can get more info from



Posted in Uncategorized | 1 Comment »

Connecting VMM and Operations Manager

Posted by Mikael Nystrom on December 5, 2014

System Center Ramblings

When building a fabric domain most want to connect Virtual Machine Manager and Operations Manager to get alerts and information. However many seem to fail with this due to not using the correct credentials.

First off you need to download and import the SQL MP for OpsMgr. They have been removed from the catalog and can now be found here: Download, extract and import them into OpsMgr.

Next we need a service account with Admin privileges in OpsMgr. Create the account and add the account to an AD group and add the AD group to the OpsMgr Admins. While you are in the process of creating accounts we will need another account that OpsMgr will use to connect to VMM. This account does NOT need any privileges at all.

Now go to the VMM console on the VMM server. Go to Settings and then System Center Settings and click…

View original post 157 more words

Posted in Uncategorized | Leave a Comment »

2013 in review

Posted by Mikael Nystrom on January 20, 2014

The stats helper monkeys prepared a 2013 annual report for this blog.

Here’s an excerpt:

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 180,000 times in 2013. If it were an exhibit at the Louvre Museum, it would take about 8 days for that many people to see it.

Click here to see the complete report.

Posted in Fun, Uncategorized | Leave a Comment »

My Sessions on MMS 2013

Posted by Mikael Nystrom on April 6, 2013

This year I have the following sessions on Microsoft Management Summit 2013 at Mandala Bay.

DC-B309 Choosing the Right OS Deployment Tool Johan Arwidmark, Mikael Nystrom In this session, you will learn how to use the right tools to deploy Windows, how to decide which solution is right for you, and when to tweak – or stop tweaking and choose a different path. We will also cover tools and solutions like ADK, MDT Update 1, and Configuration Manager 2012 SP1.
DC-B303 Advanced Microsoft Deployment Toolkit 2012 Update 1 Customizations Johan Arwidmark, Mikael Nystrom In this session, you will learn about the new features in Microsoft Deployment Toolkit 2012 Update 1 and how to customize it to fit your organization’s needs. This session will explore two competing perspectives on MDT enhancements, with live demos, tips, and tricks.
DC-B308 Deploying Windows 8 Using Lite Touch Mikael Nystrom Is it your job to deploy Windows 8? Would you like to use the free tools provided by Microsoft to do it? During this session, we will cover the basic steps needed to install the solution and how to configure it. You will learn 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 user data and re–installing applications.
BOF02 Microsoft Desktop Deployment Toolkit Roundtable Johan Arwidmark, Mikael Nystrom During this session, share your tips, tricks and ask your hardest questions about the MDT Toolkit.
DC-B317 Deploying Windows To Go in the Real World Mikael Nystrom Windows To Go is a new and very useful feature in Windows 8, and creating a Windows To Go drive is pretty straight forward. In this session you learn how to make the needed customizations for the enterprise network, so when the end user plugs the device into a computer, it will be domain joined, customized to fit the organization and include all applications.
DC-B306 Building the Perfect Windows 8 Image Johan Arwidmark, Mikael Nystrom In this session, you will learn how to create a production–ready master image of Windows 8, automate builds of thin, hybrid, and thick images, and more. This session also discusses how Sysprep and the Unattend.xml work in Windows 8.


If you do attend the session, please swing by the podium before or after the session and say hi.


Posted in Uncategorized | Leave a Comment »

Fast and Easy: Build a more or less complete Windows Server 2012 environment using PowerShell and Hyper-V

Posted by Mikael Nystrom on August 21, 2012

I promised to post this long time ago, so here it is. The script I use to build more or less complete quick and dirty demo environments. I did have another script before that did create all the VMs’, but then I still needed to configure things like name, IP, domain join and all that so I decided to do pretty much like a normal deployment solution do, use a template unattend.xml file that I then modify on the fly. It is possible to add even more parameters if needed.

How does it work?

It works like this, it will create a VM in Hyper-V for Windows Server 2012 based on a differencing disk, add some more disks, mount the VHDx file, copy a unattend.xml to the virtual hard disk, edit the file by doing a simple search and replace on some keywords, save the file, close the disk, dismount everything and start the VM. The VM will go through mini setup and read the unattend.xml file and apply those settings. That way I can add things like IP, DNS, Name and so on. The script will accept a bunch of parameters which will be used both as parameters for the VM, but also for settings inside the VM. There for, the name on the VM will also be the name inside the VM. For me it takes less than 6 minutes to build 2-3 servers with the correct names and IPs and more.

What’s next?

Well, easy. First you need to create a reference image the VHDx format and that should be created using Microsoft Deployment Toolkit 2012 Update 1. But if you are lazy you can use WIM2VHD.PS1. You might also need WIMINFO.PS1 to find out the index number of the WIM. So now you have a reference image for Windows Server 2012 in the VHDx format. Next is to download this script pack, unpack it and the run it.

Here is an example that will create a VM based on a difference disk:

.\MakeVM-DiffwUA.ps1 -VMBaseLocation D:\VMs -VMMemory 1024mb -VMRefDisk C:\Ref\WS2012.vhdx -VMNetwork External -UAtpl .\uafor2012wg.tpl -PW P@ssw0rd -GW -DNS -VMName DEMO -IP

There are two template files, one is called uafor2012wg.tpl and the wg stands for WorkGroup, the other one is called uafor2012dj.tpl and in that case dj stands for Domain Join. I did not specify the domain name to join as a parameter, so you need to modify that manually or extend the script with parameters for that to.



Posted in Uncategorized | Leave a Comment »

Nice to know: Microsoft Deployment Toolkit (MDT) 2012 Update 1 is released

Posted by Mikael Nystrom on August 17, 2012

So, the day after Windows 8 was released to customers the deployment tools are also released. You can download it from here and you also need either the “old” WAIK or the new ADK, which you can download here. Upgrading are supported and it works, kind of. Any kind of wizard customization will be lost and you need to create that once more but there is one thing that you should have in mind and that is the Task Sequences them self, they are not upgraded, they are kept and that’s ok, but it might be a better idea to re-create them since they the will take benefit of all the new features, otherwise that step will missing. So, I suggest that you re-create the task sequences to gain full benefit from the update. So What’s new?, easy, there is a list here (not all but most important things)

  • Added support for Windows 8 and Windows Server 2012.
  • Support for System Center 2012 Configuration Manager SP1 CTP: Added support in MDT for deploying Windows 8 and Windows Server 2012 with Configuration Manager 2012 SP1 CTP, while supporting all new Configuration Manager functionality (offline BitLocker, UEFI, and Assessment and Deployment Kit).
  • Support for DaRT 8 Beta: Updated MDT to support DaRT 8 for Windows 8 deployments, while continuing to support DaRT 7 for Windows 7 deployments. Added DaRT support for Configuration Manager scenarios.
  • New “Build Your Own Pages” User-Driven Installation (UDI) feature: Enhanced the UDI wizard and designer to enable IT pros to design their own wizard pages with little effort.
  • New System Center 2012 – Orchestrator support: Provided the ability to add steps into an OS deployment task sequence to execute Orchestrator runbooks as part of the deployment process.
  • Other improvements: Added support for Windows PowerShell 3.0, reworked Roles and Features installation logic for Windows 8, improved “boot from VHD” deployment scenarios, and added support for Configuration Manager monitoring

There is a nice blog post on Springboard you should read, it also has the links to ADK and MDT plus ACT 7.0

And by the way, Deployment Fundamentals Volume 4 is getting closer, the last two weeks Johan and I have been working on the book, now we just need to replace all the pictures in the book to match the current release of software…


Posted in Uncategorized | Leave a Comment »

Windows Deployment Roadshow–September 2012, Sweden

Posted by Mikael Nystrom on August 13, 2012


Nu är det dags igen, Johan Arwidmark och jag (Mikael Nystrom) åker ut på turne för att prata OS deployment, för att visa Windows 8, Windows Server 2012, System Center 2012 SP1 och en stor portition MDT 2012 Update 1 och för att ha skoj och för att få träffa dej så klart. Vi har under drygt ett år hållt på med Windows 8, Server 2012, System Center och MDT 2012 (nu senast med Update 1).

Det antal dagar, nätter, kvällar och mornar när vi två har suttit på hotelrum, tillsammans eller var för sej för att klura ut hur det egentligen är tänkt och vad man egentligen kan använda alla dessa nya funktioner till vill jag inte veta. Inte heller det antalet frustrerande mail som har bollats mellan oss och diverse addresser, men äntligen ser vi ljuset i tunneln, vissa saker är bättre än vad vi trodde från början, vissa saker kanske borde ha gjorts annorlunda.

Vi äntrar scenenen med buller och bång i Malmö den 10:e september för att sedan fortsätta till Göteborg den 11:e september, Umeå den 12:e September och Grand Finale i Stockholm den 13:e september.

Läs den något mer detaljerade agendan här och gör din anmälan här…

Vi syns.


Posted in Uncategorized | Leave a Comment »

Nice to know–New properties in MDT 2012

Posted by Mikael Nystrom on June 11, 2012

There are some new properties in MDT 2012 that can be useful.


In MDT 2012 there is a new function that will apply a local GPO during the deployment. In MDT 2012 there are four templates that will be applied automatically. If you open the templates folder in the deployment share you will see the following folders


If you don’t want them for some reason (not tested and verified) you can disable them using ApplyGPOPack=NO. I do however recommend you to download Security Compliance Manger 2.5 and import them and then verify that all security settings are correct according to your environment


HideShell means that the desktop (explorer) does not show up until the deployment process is done, this will make it bit more complicated to interfere with the computer while it is being deployment. If you are deploying Windows 8 you should set this to YES otherwise the Metro UI will cover the deployment process UI and it will very hard to see if a deployment process is running


This one works in conjunction with HideShell, since HideShell does not prohibit the user to press ctrl-del and start the task manager, but this one does. My recommendation is to use this after you have verified that your deployment process works since it will also make it a bit harder to troubleshot some scenarios


This one is very nice to use, the new version of the gather process will now expose if we are running on battery and as you understand it is not a good idea to deploy a new OS on a machine that runs on battery, so modifying your customsettings.ini file like the example below will block any attempt to deploy a OS on a machine that runs on battery.

Priority=ByIsOnBattery, Default

SubSection = ByIsOnBattery-%ByIsOnBattery%




Posted in Uncategorized | 1 Comment »

Setting ACL’s in the Hyper-V switch

Posted by Mikael Nystrom on June 6, 2012

Mr Adian Finn has done a very nice blog post on ACL’s in Hyper-V. Not so many know about this, trust me.

Here is an abstract….

There are many reasons why you might want to isolate virtual machines at the NIC level in Hyper-V. Maybe you have different tenants on a cloud. Maybe you have some stuff that has high security requirements. If so, then there’s a new feature in Windows Server 2012 Hyper-V that you’ll like: Port ACLs (access control lists).

Port ACLs allow you to set rules as follows:

  • Local MAC/IP address: what local address does this apply to?
  • Remote IP/MAC address: what remote address does this apply to? Can be a specific IP address or network address or a wildcard.
  • Action: Do you want to block, allow, or measure traffic that this rule applies to?
  • Direction: Are you apply this rule to inbound traffic, outbound traffic, or traffic in both directions?

It’s important to note that Port ACLs works at the address level and not at the port or protocol level. If you need that level of granularity, then check out one of the certified Hyper-V Switch extensions that MSFT partners such as Cisco and 5Nine are producing

the rest you can read here….

Posted in Uncategorized | Leave a Comment »

WIM2VHD using a PowerShell script (plus 2 more, WIMINFO and MakeVM-Diff scripts)

Posted by Mikael Nystrom on May 7, 2012

The Story

When using Hyper-V you need a VHD, so the correct way for creating a VHD is to use MDT 2012 (Lite Touch) and I do that for my production servers, but in some cases you do not have the deployment solution in a pocket, you just need the standard wim file converted into a bootable VHD file so you can use that as a template. Then when you have the template created you also need to be able to build new machines using that reference image and clicking in the UI is fun, for a while…

When Hyper-V was new Microsoft (a former MVP) created a VB script called WIM2VHD that I used all the time, a very nice script I think, but in Windows 8 we have all that stuff inside the OS and we do have a much stronger story in PowerShell

To be honest, I did create these script a while back, but today I was running a Windows Server 8 BETA Load fest and I used these scripts to build a bunch of demo machines, 2 minutes later our own staff was standing in line begging to get the scripts, so I gave them away but at the same time I thought you should also have access to them

The Solution

First of all, I’m not really a PowerShell “whiz kid”, I used to be the old “batch file” guy, but I’m converting (A nice thing is to have Niklas Goude that just happens to be an MVP in PowerShell in the organization).
Second, we need a couple of script. We need something to take a look inside a WIM, something that create a VHDX and applies the WIM to that VHDX and the last one, something that can build VMs using that ref image.

Script number 1: (wiminfo.ps1)

This script will mount the ISO image and read the content of the WIM file, this way we know what index we shall use.

[parameter(mandatory=$true,HelpMessage=”Please, I need the ISO image name, ok?”)][ValidateNotNullOrEmpty()]$ISO
Mount-DiskImage -ImagePath $ISO
$ISOImage = Get-DiskImage -ImagePath $ISO | Get-Volume
$ISODrive = [string]$ISOImage.DriveLetter+”:”
Get-WindowsImage -ImagePath $ISODrive\sources\install.wim
Dismount-DiskImage -ImagePath $ISO


Script number 2: (wim2vhd.ps1)

This script will mount an ISO image, create the VHDx file, applies the WIM file to the VHDx file and then creates the BCD and dismounts everything.



[parameter(mandatory=$true,HelpMessage=”Please, I need the ISO image name, ok?”)][ValidateNotNullOrEmpty()]$ISO,

[parameter(mandatory=$true,HelpMessage=”Please, I need the VHDx image name, ok?”)][ValidateNotNullOrEmpty()]$VHDx,

[parameter(mandatory=$true,HelpMessage=”Please, I need the Index number in the Wim, ok?”)][ValidateNotNullOrEmpty()]$Index,

[parameter(mandatory=$true,HelpMessage=”Please, I need the Size of your VHDx, ok?”)][ValidateNotNullOrEmpty()]$SizeGB



Mount-DiskImage -ImagePath $ISO

$ISOImage = Get-DiskImage -ImagePath $ISO | Get-Volume

$ISODrive = [string]$ISOImage.DriveLetter+”:”


$VMDisk01 = New-VHD –Path $VHDX -SizeBytes $SizeGB

Mount-DiskImage -ImagePath $VHDX

$VHDDisk = Get-DiskImage -ImagePath $VHDx | Get-Disk

$VHDDiskNumber = [string]$VHDDisk.Number


Initialize-Disk -Number $VHDDiskNumber -PartitionStyle MBR

$VHDDrive = New-Partition -DiskNumber $VHDDiskNumber -UseMaximumSize -AssignDriveLetter -IsActive | Format-Volume -Confirm:$false

$VHDVolume = [string]$VHDDrive.DriveLetter+”:”


dism.exe /apply-Image /ImageFile:$ISODrive\Sources\install.wim /index:$Index /ApplyDir:$VHDVolume\


BCDBoot.exe $VHDVolume\Windows /s $VHDVolume /f BIOS


Dismount-DiskImage -ImagePath $ISO

Dismount-DiskImage -ImagePath $VHDX


Script number 3: (MakeVM-Diff.ps1)

This script will create a VM in Hyper-V based on that VHDx file as a differencing file. It supports a bunch of command line parameters



[parameter(mandatory=$true,HelpMessage=”Please, provide a name.”)][ValidateNotNullOrEmpty()]$VMName,

[parameter(mandatory=$true,HelpMessage=”Please, provide a location.”)][ValidateNotNullOrEmpty()]$VMBaseLocation,

[parameter(mandatory=$true,HelpMessage=”Please, provide the amount of starting memory.”)][ValidateNotNullOrEmpty()]$VMMemory,

[parameter(mandatory=$true,HelpMessage=”Please, provide a RefDisk.”)][ValidateNotNullOrEmpty()]$VMRefDisk,

[parameter(mandatory=$true,HelpMessage=”Please, provide a Switch.”)][ValidateNotNullOrEmpty()]$VMNetwork



$VMLocation = New-Item -Path “$VMBaseLocation\$VMName” -ItemType Directory -Force

$VMDiskLocation = New-Item -Path “$VMLocation\Virtual Hard Disks” -ItemType Directory -Force

$VMDisk01 = New-VHD –Path $VMDiskLocation\$VMName-OSDisk.vhdx -Differencing –ParentPath $VMRefDisk

$VMDisk02 = New-VHD –Path $VMDiskLocation\$VMName-DataDisk01.vhdx -SizeBytes 60GB


$VM = New-VM –Name $VMname –MemoryStartupBytes $VMMemory –VHDPath $VMDisk01.path -SwitchName $VMNetwork -Path $VMBaseLocation

Add-VMHardDiskDrive -VM $VM -Path $VMDisk02.path –ControllerType SCSI -ControllerNumber 0

Set-VM -VM $VM -DynamicMemory



Now you have a solution that is capable of building a complete environment on a Windows Server 8 machine and a ISO image pretty fast.

Download Script


Posted in Uncategorized | 5 Comments »