Windows XP perform remote Disk Management

So you get this error…

The Disk Management console failed to connect to the remote computer because the Disk Management remoting service is not in the Windows Firewall exception list. Add the Disk Management remoting service(dmremote.exe) to the Windows Firewall exception list and try again.

You then add dmremote.exe to your windows firewall exceptions list and it still doesn’t work!

What this error message fails to tell you is that there are several other exceptions you should add to your firewall list, you should set up the following firewall exceptions on client machines.

  • TCP Port 135 should be open (Add the Port)
  • %WINDIR%\System32\dmadmin.exe (Add the program)
  • %WINDIR%\System32\dmremote.exe (Add the program)

In an Active Directory network environment I would recommend doing this through Group Policy. Fire up the group policy management console and select your workstation configuration policy, then modify the following group policy sections.

Console Root\Local Computer Policy\Computer Configuration\Administrative Templates\Network\Network Conifiguration\Windows Firewall\Domain Profile

Enable the following:
Define Program Exceptions (Add)

  • %WINDIR%\System32\dmremote.exe:*:Enabled:Disk Management
  • %WINDIR%\System32\dmadmin.exe:*:Enabled:Disk Management

Allow Local Program Exceptions (Enabled)
Allow Remote Administration Exception (add * or ip of appropriate computer(s))
Define Port Exceptions (Add TCP Port 135)
Allow Local Port Exceptions (Enabled)

Now you should be able to connect to another computer and view disk management.

Create a bootable USB stick for installing Windows Vista, 7 or 2008

This will walk through the steps to create a bootable USB flash drive for the purpose of installing a Vista, Windows 7 or Windows 2008 OS. The instructions can be applied to a physical DVD or an ISO image that has been downloaded. Treat an ISO file the same as a DVD, just mount it in a virtual drive. These instructions assume that you have a computer with Windows Vista installed on it. Most steps can be completed from Windows XP, but mileage may vary.

Required:

  • USB Flash Drive (4GB+)
  • Microsoft OS Disk (Vista / Windows 7 / Windows 2008)
  • A computer running Vista / Windows 7 / Windows 2008

Step 1: Format the USB Stick
The steps here are to use the command line to format the disk properly using the diskpart utility. Be warned: this will erase everything on your USB drive or Hard Drive if you select the wrong disk ID.

  1. Plug in your USB Flash Drive
  2. Open a command prompt as administrator (Right click on Start > All Programs > Accessories > Command Prompt and select Run as administrator
  3. Find the drive number of your USB Drive by typing the following into the Command Prompt window:
    diskpart
    list disk

    The number of your USB drive will listed. You’ll need this for the next step.  I’ll assume that the USB flash drive is disk 1.
  4. Format the drive by typing the next instructions into the same window. Replace the number 1 with the number of your disk below.
    select disk 1
    clean
    create partition primary
    select partition 1
    active
    format fs=NTFS
    assign
    exit
    When that is done you’ll have a formatted USB flash drive ready to be made bootable.

Step 2: Make the Drive Bootable 
Next we’ll use the bootsect utility that comes on the Vista, Windows 7 or Windows 2008 disk to make the flash drive bootable. In the same command window that you were using in Step 1:

  1. Insert your Windows DVD into your drive or Mount an ISO image in a virtual drive.
  2. Change directory to the DVDs boot directory where bootsect lives:
    d:
    cd d:\boot
  3. Use bootsect to set the USB as a bootable NTFS drive prepared for a Vista image. I’m assuming that your USB flash drive has been labeled disk G:\ by the computer:
    bootsect /nt60 g:
  4. You can now close the command prompt window, we’re done here.

Step 3: Copy the installation DVD to the USB drive
The easiest way is to use Windows explorer to copy all of the files on your DVD on to the formatted flash drive. After you’ve copied all of the files the disk you are ready to go. Alternatively extract all the files from the ISO image to the bootable USB stick.

EDIT:

I have recently been pointed in the direction of a tool from Microsoft to do the above steps all in one go. Take a look here:

http://store.microsoft.com/Help/ISO-Tool

Create Bootable USB Stick

The information about on this topic is rather scratchy, so here is the short steps to complete this.

This works under Windows Vista or Later. Although I have had success under Windows XP, I could not activate the active partition on the USB drive.

This uses the Diskpart command. Ensure that your usb key is the correct Disk id before continuing. This this example I assume the USB drive is Disk 1.

Start a CMD prompt then type

diskpart

Use list disk to display your different disks.

list disk

Then use the following commands to wipe the current usb key and set up a parition and make it active.

select disk 1
clean
create partition primary size=
select partition 1
active
format fs=NTFS
assign
exit
Note in this example I have set the format type to NTFS, if you wish a FAT or FAT32 drive then change the format accordingly.

Mount Virtual Hard Disks

Something I have found useful lately, so I though it best to share.

Mounting and editing the Microsoft Virtual Hard disks can acutally be quite easy. Rather than going into the Disk Management service in Windows you can use scripting to access the virtual disk management layer.

Anyways, the code you need is:

Option Explicit
Dim WMIService
Dim VHDService
Dim VHD
'Specify the VHD to be mounted
VHD = "C:\Users\Public\Documents\Hyper-V\Virtual hard disks\New.vhd"
'Get instance of 'virtualization' WMI service on the local computer
Set WMIService = GetObject("winmgmts:\\.\root\virtualization")
'Get the MSVM_ImageManagementService
Set VHDService = WMIService.ExecQuery("SELECT * FROM Msvm_ImageManagementService").ItemIndex(0)
'Mount the VHD or use UnMount to unount the VHD
VHDService.Mount(VHD)