I moved to SWODNIW.se!

Last week the domain swodniw.se was made available so I claimed it :D
[Yes SWODNIW is WINDOWS backwards, I thought it was awesome]
I migrated the old blog posts to the new page and I hope to see you there!
I wish you a wonderful administration day!


Print Management in Windows Server 2012 and Windows 8

It was an early sunny Saturday, when I sat down in the basement and configured a Windows Server 2012 print server!
A print server, the root of all evil, the misunderstood configuration medusa that makes every IT admin/user shed a tear of hatred/joy/sadness/anger every.... year? Week? Day? Second?

Why is this? Well, the drivers and the hardware have never been fully understood (configured right in the first place) which leaves a misconfigured Print Server and unsatisfied people, so I thought I’d let you know

What’s new in Windows 2012 Print Services and Print management!
The old print driver is a Version 3 which can lead to x86/x64 conflicts, oversized drivers, unneeded services, incompatibility with applications to mention a few things.

Starting with Windows 8 and Server 2012 – here comes the Version 4 drivers (class driver or model specific driver) which changes a couple of things…

But if you look in the “What’s new in Windows Server 2012” list on Technet, Print Services is not one of the key points.
So three of the main key points of a Windows Server 2012 Print server are 1. There is no v3 driver support for Windows on ARM
2. The print server is no longer a software distribution mechanism
3. Group Policy Preference TCP/IP printers do not support Type 4 print drivers
4. The LPR/LPD protocol is deprecated and will eventually be removed

So how do I deploy a print server?
Micke Nyström promised he will write a blogpost on how to deploy printer drivers to the clients (MDT, SCCM) so I'll leave that subject for now, but in short:

1. Install and share a printer on the server and select “List in the directory” so users can search for the printer.
2. Configure your print queues, separator pages etc. 
3. Do not install additional printer drivers on the server for clients to install. The clients will use the Microsoft enhanced Point and Print compatibility driver if it’s a Vista or Windows 7 client, and yepp, you guessed it, Windows 8 will have the V4 drivers available.

The point of all this is that printers were made for printing, if you want to configure the size of the paper, type of color and so on you shouldn’t have to package that into a separate print driver which needs to remain on the print server.

IF, however, you do have an old printer that only has a Version 3 driver and lots of fancy stuff which can’t be configured with the Microsoft enhanced Point and Print compatibility driver you can install a version 3 driver for the printer on the client, either with Windows Update or imaging (pre staging drivers in deployment).

If I may try to act ahead of administrators out there Theoretically and Technically In the Future our hardware printers will support all operating systems and application configurations of printers on the client side, so the question is if we need a print server at all…? You walk nearby the hardware, automatically the printer shows up, you configure the printer settings for the document or picture in your Windows 8 application and print the document to network printer.
…So the print server becomes a distribution point where you manage permissions…? I have no idea, but it seems logical to me.

So what I did on Saturday was:
1. Install a Windows Server 2012 printer
2. Installed all of the “old” printers with their IP addresses and picked the V4 driver (class driver) for the printer. Here I noticed that if I searched for drivers with Windows Update it removed some of the printers from the list…?
3. Configured the printer settings and clicked List in the Directory
4…. That’s it...

More information/considerations on this subject

The best page to find out more is the

Print and Documents Services Overview page, below are some notes that I found extra interesting and copied from the TechNet page:

Print and Document Services Architecture
One new aspect of the v4 print driver model is a focus on providing print class drivers. These special v4 print drivers, which implement only functionality that is common across a broad class of devices, are shipped with Windows and are marked as generic. As a result, Windows can automatically replace the driver with a better option from Windows Update, providing the end user with a better experience as soon as it is available.

There are several things you must consider when managing migrations using v3 print drivers. The first is that a print queue cannot function without the native printer driver for the server architecture (x86 or x64) on which it exists. Since Windows Server 2012 is a 64-bit only operating system, it is important that you have 64-bit drivers installed for all of your printers if you are migrating from a 32-bit system.

The line printer daemon protocol (LPR/LPD) is deprecated.
When this feature is eventually removed, clients that print to a server using this protocol, such as UNIX clients, will not be able to connect or print. Instead, UNIX clients should use IPP. Windows clients can connect to UNIX shared printers using the Windows Standard Port Monitor (see http://support.microsoft.com/kb/246868for more information).

There is no v3 driver support for Windows on ARM.
Running Windows on an ARM processor changes the paradigm with regard to power utilization and driver behaviors. The v4 print driver model supports printers on ARM with print class drivers while still allowing rich end user experiences thanks to a decoupled UI development model

Prior Windows 8 then?
Operating systems prior to Windows 8 do not support the v4 driver model but can print to a v4 queue shared from a Windows Server 2012 print server by using the enhanced Point and Print Compatibility Driver which is hosted by any print server running Windows Server 2012.

Customized User Interfaces
V4 print drivers support customized user interfaces in both the Windows desktop and in the new Windows user interface. Due to the very different nature of these experiences, these UIs must be implemented as two different applications.
Printer extensions support v4 print drivers in the desktop and work with all existing applications. They also work in printer sharing scenarios with the enhanced Point and Print driver. Support is planned for all operating systems from Windows Vista through Windows 8.

V3 Printer Driver history
The prior model relied on both the server and the client computers using identical drivers; given the different supported architectures for Windows (x86, x64, and SoC systems) getting the right matching driver can be a difficult proposition. Incompatibilities between driver versions can cause client connection errors, and establishing connections can take a significant amount of time.
The overall goal of both the new v4 driver model and the sharing implementation that supports it is to make the end-user and administrative experience as easy as possible.

Features that define the changes that were made to printer sharing in Windows 8.
Clients can use enhanced Point and Print to generate print jobs that the server can use without using a device specific driver.

Servers can encapsulate the configuration and capabilities of the printer and communicate that data to a client computer in a way that the client computers can use without needing a device specific driver.

 The print server is no longer a software distribution mechanism.
Previous versions of Windows provided a mechanism by which print clients could obtain a driver from the print server. For reasons of security, compatibility, serviceability, and reliability, this functionality has been removed from the v4 driver model and enhanced Point and Print. Downlevel client computers will still be able to receive the enhanced Point and Print Compatibility driver from Windows Server 2012 servers to enable compatibility with v4 print shares. Client computers running Windows 8 have enhanced Point and Print support built into the operating system, and they can use standard point and print mechanisms to obtain matching v3 drivers if the administrator wants to continue using older drivers. Device specific v4 drivers can also be deployed to Windows 8clients, or downloaded from Windows Update/WSUS in order to provide additional features or capabilities, such as client side rendering when connecting to enhanced Point and Print shares.


Powershell cmdlets one-by-one or How to replace diskpart with powershell

Yes, yes I know... The Swedish Powershell MVP Niklas Goude will probably kick my ass if he ever found out I wrote this blog post...
But not all of us were born composing powershell scripts with our eyes closed, so here are some baby steps (one-by-one cmdlets) to help you get started with understanding how awesome powershell is :)
What I did was that I sat down and got-help in powershell and actually figured out how to create a virtual machine and a virtual disk a.k.a I'm trying to step away from diskpart (that we all know and love)
Creating a virtual machine, mounting an ISO and starting it, FTW
First of all, you need Powershell 3.0 to accomplish this, that either means you need a Windows Server 2012 or Windows 8 host with Hyper-V installed. (Yes Hyper-V is included in both the client and the server)
Create, start a virtual machine and mount an ISO with Powershell
Run Powershell as administrator and execute the following:
New-VM -Name VM01 -MemoryStartupBytes 1024MB
The command creates a new virtual machine named VM01 with 1024 MB memory.
Now you need to create a virtual disk for the machine:
New-VHD -Path C:\VM\VM01.vhdx -SizeBytes 30GB -Dynamic
After creating the disk you'd want to attach it to the virtual machine
Add-VMHardDiskDrive -VMName VM01 -Path C:\VM\VM01.vhdx
Then to mount an ISO you execute
Set-VMDvdDrive -VMName VM01 -ControllerNumber 1 -Path C:\ISO\windows.ISO
And then start the machine!
Start-vm –name VM01
Create, select, partition and format VHD in Powershell or...
"How to replace diskpart with powershell"
So diskpart, create vdisk and so on, how-to do the same thing in powershell...
Create a virtual disk
New-VHD -Path C:\VM\windows.vhdx -SizeBytes 30GB -Dynamic
Mount the VHD (instead of attaching it in diskpart)
Mount-VHD -Path C:\VM\windows.vhdx
Find out which disk number the mounted VHD got
Bring the disk online (and YES you specify 1 instead of 0 if you want to take it offline)
Set-Disk -Number 2 -IsOffline 0
Make the disk writable (and YES you specify it to be Read only with 1)
Set-Disk -Number 2 -isReadOnly 0
Initialize the disk
Initialize-Disk -Number 2 -PartitionStyle MBR
Create a partition on disk 2 and automatically assign a driveletter
New-Partition -Disknumber 2 -UseMaximumSize -AssignDriveLetter
Format the volume
Get-Partition -Disknumber 2 | Format-Volume -FileSystem FAT32

By the way, if you try to eject the virtual disk in windows explorer or disk management you will most likely get an error message, so if you want to

Dismount the VHD execute the following
Dismount-VHD -Path C:\vm\windows.vhdx

And then there are the rest of the Storage Cmdelts awesomeness


User data migration with USMT - where what how

I don't like long explanations, directory locations or long talks on the phone. I enjoy long walks in the forest or long concerts.
So if you want to use USMT version (while I am writing this) it's version 6.2.9200.16384 *version 5.0) there is a pretty Technet blog post that explain more about USMT 5.0 vs 4.0 etc... but wait, it says USMT 5.0 in the blog post title, but the post refers to USMT 4.0
Then there's always the User State Migration Tool (USMT) Technical Reference or 113000 hits on google containing the words USMT and Video.

So you don't really need this just-another-blog-post do you :)
I just want to tell you TWO THINGS about USMT that I wanted to know:
1. Where the hell is the commandline USMT located
2. How do I extract a .mig file (usmt.mig)

Well, the command line version of USMT is installed in the following folder when you download and install Microsoft ADK
USMT location after installing ADK (Assessment and Deployment Kit)
...and I don't won't to call usmtutils.exe from
C:\Program Files (x86)\Windows Kits\8.0\Assessment and deployment kit\User State Migration Tool\amd64... *phew* every time SO I copied the necessary files from C:\Program Files\Bla\Bla\Bla\User State Bla\amd64 to C:\USMT instead.
After doing that there will be a usmtutils.log file in C:\USMT when you run the command usmtutils.exe /? and a short explanation is displayed in the command prompt.
Needed dlls when copying usmtutils.exe to other locations
So now I can extract an usmt.mig file with usmtutils.exe by executing the following
msutils.exe /extract c:\usmt\mig\USMT.MIG C:\usmt\extract


Need to know shortcuts in Windows 8 and Windows Server 2012

Ok, so you don't want to scroll around forever looking for shortcut keys in Windows 8 and Windows Server 2012 - these are my top three:

1. Windows key + i to find the Power options
Windows key + i

2. Windows key + X to find the administrator shortcuts
Windows key + x
3. Right click CMD to find options such as Run as administrator
simply press CTRL + SHIFT and left click CMD to send Run as administrator to cmd,
OR with CMD selected just click CTRL + SHIFT + ENTER
Works with task bar pinned legacy applications as well....
Run, run, run as admin
....So, those are my Three favorites amongst many.


Windows Server 2012 and Internet Explorer 10

Feeling stressed lately, giving up, downloading Chrome on Windows Server 2012 to download tools in your Windows Server 2012 lab environment?
I know how you feel, it's a bit frustrating when you try to download files in Internet Explorer, you add the page to trusted websites, lower the security levels for the internet zone, turn off protected mode and still you are presented by The big white

Caution: When downloading files from Internet Explorer you need to ask yourself - what am I downloading and Why, am I only installing Chrome because I want to download Acrobat Reader, why am I installing Acrobat Reader on A SERVER?

The Solution is Knowledge!

If Internet Explorer Enchanced Security is Enabled - File downloads from the Internet Zone is turned off.
But for Lab/Testing/Iwillnotusethisinproduction you can turn off Internet Explorer Enchanded Security:
Open Server Manager, go to Dashboard, click Configure this local server, and in the properties section next to IE Enhanced Security Configuration click the ON and select OFF.

If you want to read more about enchanced security features in Windows Server 2012 and IE visit this webpage and read it.
BUT if you follow the instructions on the mentioned page and open IEs default page to find out more about Internet Explorer Enhanced Security Configuration by clicking the link, you will most likely be presented with "This page can't be displayed".
Solution: Note the url res://ieframe.dll/IESecHelp.htm - if you change it to iesetup instead of ieframe.dll...etc you will access the correct help page.


Create a virtual machine that mounts an ISO with powershell

Set-VMDvdDrive -VMName Windows8 -ControllerNumber 1 -Path C:\\ISO\7600.16385.090713-1255_x64fre_enterprise_en-us_VL-GRMCULXFRER_EN_DVD.iso