Reputation: 636
I have to check whether a given node contains any dynamic disk or not and get the list of dynamic disk using Power Shell script. I am not supposed to use diskpart command. Any other solutions other than diskpart will be appreciated.
Upvotes: 1
Views: 2750
Reputation: 107
you may use also diskpart utility, which is easily scriptable (I worked with it in Python) the idea is that when you perform diskpart and then list disk, output will be like:
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 476 GB 0 B *
So you'll see all dynamic disks marked with asterisk under "Dyn"
Upvotes: 0
Reputation: 341
Get-WmiObject Win32_DiskPartition -filter "Type='Logical Disk Manager'" | Select-Object *
Upvotes: 2