Move CD-ROM to Certain Drive Letter

1 04 2011

Here is a one line script that will query your computer for the CR-ROM and change the drive letter to G.  Of course you can change the script to use any drive letter, just change g: to whatever letter you’d like.

(gwmi Win32_cdromdrive).drive | %{$a = mountvol $_ /l;mountvol $_ /d;$a = $a.Trim();mountvol g: $a}

Here is a link to a really nice script that can help with standardizing disks in a server deployment and is where I got the one liner from.



2 responses

18 07 2011
Arthur Woodrow

Do you acept blog usbmissions?

18 07 2011

Yes, go ahead and subscribe to my blog.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: