I would like to have the current volume name as part of a filename, e.g. bsps-on-c.txt for files in volume C:, bsp-on-d.txt for files in volume d and so on.
code is:
$v=volume
$col=@{expression="driveletter";label=""}
$v | where {$_.drivetype -like "Fixed" -and $_.driveletter -notlike "" } | format-table $col
output is:
-
C
question is: How to get rid off empty lines and line with -
Expectation was:
only letter C and nothing more, no white spaces, no empty lines