0

Is there a method how I can remove the License title?

This is part of my command in my script:

Get-VMHost -Name test.test.local | Select LicenseKey

Output:

LicenseKey

----------  

M023J-ZYH06-88Y88-078RK-CR47M

I want to remove the "LicenseKey" title

Vivek Kumar Singh
  • 3,223
  • 1
  • 14
  • 27
Matt_Tede
  • 5
  • 1
  • 4

1 Answers1

1

Use -ExpandProperty -

Get-VMHost -Name test.test.local | Select -ExpandProperty LicenseKey

OR

(Get-VMHost -Name test.test.local).LicenseKey
Vivek Kumar Singh
  • 3,223
  • 1
  • 14
  • 27