Discussion:
Using WMI/WQL to partition unpartitioned disks on x64 Windows
(too old to reply)
Drew K.
2009-05-20 17:57:07 UTC
Permalink
I'm trying to automate a very redundant, manual process of partitioning and
formatting new network disks attached to a remote server via iSCSI. As these
disks are attached, I need to partition the entire space, convert to gpt,
mount in an NTFS folder, and format the partition. The person currently in
charge of the manual process does all of this via diskpart. Ideally, I'm
looking to do this on-demand remotely via WMI/WQL in C#, but I'm open to
other options. Can someone point me in the right direction here?
Drew K.
2009-05-20 18:38:06 UTC
Permalink
Just as an update:

I've figured out that you can determine the disks that contain no partitions
by running the WQL query: "select * from Win32_DiskDrive where partitions=0".

Now, I just need to figure out how to partition with align=64, convert to
gpt, mount, and format them.

Loading...