HOW-TO Install Windows 7 Ultimate onto a VHD drive

Virtualization of your desktop


  1. Purchased copy of Windows 7 Ultimate “install.wim” d:\source\install.wim
  2. Windows Automated Installation Kit (imagex tool)
  3. Diskpart Utility

Known Limitations:

  1. BitLocker cannot be used on the Hard Disk containing the VHD file.
  2. Hibernate function is not supported

Step by Step

  1. Open the command prompt CMD with elevated permissions.

    You can have a type expandable (dynamic) or fixed, this option is your choice, I would however look over the Disk I/O stats I have attached at the end of this article. I have opted to have a 100 gb disk file for modifications that I will do, I would normally set it for 25g it is more than enough space.

  2. Select your new virtual disk .
  3. Attach your virtual disk.
  4. View of disks currently on the system. Select the correct disk in this example it is disk 3
  5. Make a primary partition.
  6. Select the partition you have just created.
  7. Mark the partition as active
  8. Format your new partition, NTFS and quick format.
  9. Lets assign it a drive letter.
  10. Exit DiskPart to continue
  11. Have a look at our install.wim of course you could customize the xml yourself but for sake of this Step by Step article, I am using the default Windows 7 provided by Microsoft MSDN. On a side note, I have moved my Windows Automated Installation Kit tools into my system32 directory for convenience and extracted the install.wim from my cd:\source directory and moved it to the same directory storing my Virtual Hard drive File (VHD).
  12. Now lets install the install.wim on to the new virtual disk drive that was created, for me that drive is E:\ and I want to use Index 4 from above the Windows 7 Ultimate
  13. Now lets change the boot order. For this step lets return to diskpart and select our VHD
  14. Then detach the Virtual Hard Disk (VHD)
  15. Next step we need to use BCDEDIT I think BCD stands for binary-coded decimalif I remeber correctly. First off lets have a look at bcdedit as it stands right now.
  16. Our next step is to copy our current setup to a new entry called “Windows 7 Ultimate VHD”
  17. Copy the {GUID} displayed on your screen from the last step and run set the device to the vhd file.
  18. Now lets set the osdevice to the vhd file.
  19. Lets turn Detect HAL on. “Insert HAL 9000 joke here.”
  20. Enter a description.
  21. Restart you computer

HOW-TO Enable PowerShell Scripts in Windows 7

The execution of scripts is disabled on this system

PowerShell Script cannot be loaded because the execution of scripts is disabled on this system. Please see “get-
help about_signing” for more details.

If you launch the command Get-ExecutionPolicy you will see that the default policy is set to Restricted and this is by design.
 There are 5 values to choose from:
1. Restricted: no scripts will be executed
2. Unrestricted: all scripts will be executed
3. RemoteSigned: all scripts you created yourself will be run, all scripts downloaded from the internet will need to be signed by a trusted publisher
4. AllSigned: all scripts, including your own, will need to be signed by a trusted publisher
5. Default: = Restricted (unless you change the default value to something else)

Simply type in this command in a Administrator enabled PowerShell window. 

And that’s it! Your scripts can be run. I’ll be posting soon about how to set up your own “trusted publisher” so that we can secure our PowerShell environment as much as possible.

HOW-TO Give a user Local Administrator Rights on a Domain Workstation

There are times with older applications when you need to give users local administrator rights, or you feel like the user is competent enough to install his own applications in a small work environment.
In a elevated command line run 

let’s say you need to add everyone, I wouldnt recomend adding everyone so you could use the authenticated users group

again, security gurus will probably yell at me for this; but I live in a real world where security is a two edge sword. When it comes to aging equipment; I had to use the above command on a system to allow a wide format printer dating back to the 80s to connected via a special ISA card so it could run its proprietary dlls files each time a user would connect remotely.  A twisted situation.