Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251313

Re: Unable to get the ServiceTag Info

$
0
0

Can you give it a try like this?

 

$user='userid@company.net'

$pswd='password'


Import-Csv-Path .\Host.csv -UseCulture -PipelineVariable row |

ForEach-Object-Process {

    $esx=Get-VMHost$row.host-ErrorAction SilentlyContinue

    $result=''

    if($esx){

        $result=$esx.ExtensionData.Summary.Hardware.OtherIdentifyingInfo[0].IdentifierValue

    }

    $row|Add-Member-MemberType NoteProperty -Name 'result'-Value $result-PassThru

}|Export-Csv-Path .\servicetags-result.csv -NoTypeInformation


Viewing all articles
Browse latest Browse all 251313

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>