I have this one-liner:
get-WmiObject win32_logicaldisk -Computername remotecomputer
and the output is this:
DeviceID : A:
DriveType : 2
ProviderName :
FreeSpace :
Size :
VolumeName :
DeviceID : C:
DriveType : 3
ProviderName :
FreeSpace : 20116508672
Size : 42842714112
VolumeName :
DeviceID : D:
DriveType : 5
ProviderName :
FreeSpace :
Size :
VolumeName :
How do I get Freespace
and Size
of DeviceID
C:
? I need to extract just these two values with no other informations. I have tried it with Select
cmdlet, but with no effect.
Edit:
I need to extract the numerical values only and store them in variables.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…