VMware Cloud Community
ekuzmack
Contributor
Contributor
Jump to solution

Script to get ID of new LUN to create datastore

Pardon the question from a newbie - I'm not a developer at all.

I'm trying to write a script that will create a datastore on a new iSCSI LUN - The problem is that I already have several other LUNS with datastores on them, so after I refresh the HBA, I basically need to figure out what the new LUN is and create a datastore on it.

I've done all sorts of googling, and found scripts to create a new datastore, but only as the first datastore on a new iSCSI target.

Any help would be appreciated.

thanks!

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You could try Arnim's first script in List HBA WWPNs and LUNs using Powershell


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

You could try Arnim's first script in List HBA WWPNs and LUNs using Powershell


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ekuzmack
Contributor
Contributor
Jump to solution

That worked! I wish that showed up in my earlier searches.

thanks!

0 Kudos