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

Re: Need a script to get Datastore with naa identifier

$
0
0

Not as sophisticated as Luc's, but easy to run nonethless and you can pass a datacetner or cluster.

 

Get-cluster cluster | get-vmhost | foreach {Write-Host; $_.Name; $_ | Get-Datastore | Select Name,@{N='Naa';E={($_ | Get-View).Info.Vmfs.Extent.Diskname}} }

 

 

Luc, I was having issues on this and was hoping you could help caus I'd like to actually use this myself.  For this command how could I have it put the hostname lined up with each datastore?

 

Right now it looks like this:

 

hostname

 

Name                    NAA

datastore               naa.12313123123123123

 

 

How could I have it look like this:

 

Hostname      Name                    NAA

Hostname      datastore               naa.12313123123123123


Viewing all articles
Browse latest Browse all 197835

Trending Articles



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