Reputation: 131
Excused me for a newbie to ask a newbie's question:) simple code:
gwmi win32_logicaldisk -filter "DeviceType=3"
Why invalid query? I think it's because I'm not famaliar with this -filter, is there any good pages about this -filter that I can read?
Upvotes: 1
Views: 2304
Reputation: 24585
It's not DeviceType but DriveType (or possibly DeviceID). You can look at the documentation to see what properties are available, or simply pipe to get-member:
PS C:\> $drive = get-wmiobject Win32_LogicalDisk
PS C:\> $drive | get-member
...
Bill
Upvotes: 1