In my inventory understand there are some free (unused) LUNs which I would like to be make a list with any automation magic, I request please someone please help with my trick which would help me to find out all the Unused LUNs, equally I'm also looking for orphaned VMDKs in Datastore, please suggest on it. Thank you so much in Advance.
There were several issues in the script, most probably due to the copy/paste
Try with this version
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
For the LUN you can have a look at my LUN report – datastore, RDM and node visibility post.
For orphaned VMDK have a look at Orphaned files and folders – Spring cleaning
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Dear LucD, Can you help me with download of the scripts from your post, becuase copy & paste are becoming out of frame.
Thanks a lot with your post referances.
Which browser are you using?
And how did you download the scripts?
Hover over the script lines, double-click and then you can do a Ctrl-C
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I have able to copy the Script, thanks.
But when I run the script I'm getting below error, can you please suggest.
+ "@ $LunInfoDef = "public struct LunInfo" + $rndNum + "{`n" + $LunInfoDef
+ ~~~~~~~~~~~
Unexpected token '$LunInfoDef' in expression or statement.
At C:\temp\FreeLuns.ps1:13 char:17
+ $scsiTab = @{} $esxServers | %{
+ ~~~~~~~~~~~
Unexpected token '$esxServers' in expression or statement.
At C:\temp\FreeLuns.ps1:32 char:1
+ }
+ ~
Unexpected token '}' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : UnexpectedToken
Looks like something might have gone wrong in the copy/paste.
Can you attach your copy of the script as a file to this thread?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
There were several issues in the script, most probably due to the copy/paste
Try with this version
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference