I have the following chain of commands:
Get-WmiObject win32_logicaldisk | Where-Object VolumeName -eq “DDRIVE” | Select-Object -property DeviceID
When executed, it produces 3 lines of output (actually 4, including the first line of blanks):
What cmdlet, function, or ??? can I use to extract just the value of the DeviceID property, which in this case is D: ?
This is so I can assign it to a variable which will be concatenated to a specific folder to form a complete path name.
Get-ItemPropertyValue can’t seem to do the job.
Any advice, tips or pointers would be highly appreciated.