how to get only info about hdd name and type without another info
if i put this into variable
$testt= Get-PhysicalDisk | Select FriendlyName, MediaType
and echo it, how to get rid of this FriendlyName and MediaType, i only want to see my hdd and type, without this grep fields
FriendlyName MediaType
------------ ---------
WDC WD10PURX-64D85Y0 HDD
GIGABYTE GP-GSTFS31240GNTD SSD
TOSHIBA DT01ACA100 HDD
But i want output to be
WDC WD10PURX-64D85Y0 HDD
GIGABYTE GP-GSTFS31240GNTD SSD
TOSHIBA DT01ACA100 HDD
Solution 1:
You can achieve this by running the Powershell command with the format table option included e.g.
Get-PhysicalDisk | Select FriendlyName, MediaType | Format-Table -HideTableHeaders
See here for more details on the Format-Table
cmdlet.