sjtmal
Contributor
Contributor

power cli to get naa id of datastore

Is there any command to get naa id of single or multiple datastore through power cli.

Datastore name can be provided in a text file. Please suggest.

0 Kudos
2 Replies
tedg_vCrumbs
Enthusiast
Enthusiast

Connect to your vCenter or host with PowerCli.

Get-VMHost | Get-ScsiLun -CanonicalName "naa.*" | Export-Csv c:\tempt\export.csv

Or whatever filename you want.

Check out this book.

http://www.amazon.com/Learning-PowerCLI-Robert-van-Nieuwendijk/dp/1782170162

Documentation here.

vSphere 5.5 Documentation Center

New Poster here.

powercli poster | VMware PowerCLI Blog - VMware Blogs

Good luck and have fun!

------ tedg Don't forget to mark posts as helpful or correct if they deserve it!
sjtmal
Contributor
Contributor

Thanks Ted.

But, I want to pass datastore name as input and get naa........ id as output, I can get this from VI client. Hope the same can be done from cli as well.

0 Kudos