I don't have any finished code that does exactly that but by combining 
Win32_LogicalDisk and Win32_Volume it should be rather easy to come up with a 
script that solves your problem

If you use Win32_LogicalDisk to look for DriveType 3 (local disk) and no 
Filesystem you should be able to find the blank drives. Win32_Volume can be 
used to change a drive letter (I have used to move the optical drive to Z)

Best regards
Mats

From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On 
Behalf Of Kehl Reto
Sent: den 23 augusti 2016 14:12
To: 'mssms@lists.myitforum.com' <mssms@lists.myitforum.com>
Subject: [mssms] diskpart script

Hello

I'm looking for a script that will remove a drive letter D: if it is a RAW 
partition and then change the other existing partition from E: to D:

anyone have something similar available?


Thanks
Reto





Reply via email to