AnoopGeorge.com

Here are the steps that i followed to create a bootable USB drive.  Also if you have a USB drive that has U3 installed on it you may want to uninstall it prior to continuing.  Here are the instructions on how to uninstall U3 http://www.u3.com/uninstall

Format the Flash Drive

Run CMD.EXE and type the following.  Note: This set of commands assumes that the USB flash drive is addressed as ”disk 1″.  you should double check that by doing a list of the disks (type “list disk”) before cleaning it. 

  1. diskpart
  2. select disk 1 (assuming disk 1 was your thumb drive in the above list disk command)
  3. clean
  4. create partition primary
  5. select partition 1
  6. active
  7. format fs=fat32
  8. assign
  9. exit

Copy the Contents of the DVD to the USB Drive

Simply issue the following command to start copying all the content from the Windows 7 DVD to your newly formatted high speed flash drive.

  • xcopy d:\*.* /s/e/f e:\

And that’s it.  Boot up the machine, have it boot off the USB drive, and watch how fast the installation completes.

here is a script to rename the local administrator password using powershell… it renames the administrator account to the “!computerName”…

Remember to run powershell as administrator.

$Bang = “!”
$NewComputerName = gc env:computername
$NewAdminAccount = $Bang+$NewComputerName $admin = [ADSI]“WinNT://./Administrator,user” $admin.psbase.Rename(“$NewAdminAccount”)

A way to test to see if the server is pingable

PS > # Using .NET method to ping test the servers
PS > $ping = new-object System.Net.NetworkInformation.Ping
PS > $ping.send($strComputer)

Status        : Success
Address       : 192.168.1.1
RoundtripTime : 0
Options       : System.Net.NetworkInformation.PingOptions
Buffer        : {97, 98, 99, 100…}

 

# Using .NET method to ping test the servers
$ping = new-object System.Net.NetworkInformation.Ping

$Reply = $ping.send($strComputer)
if($Reply.status -eq “success”)
{
#Do something here …
}