2012-05-31 12:12 PM
Having trouble calling value of initiators in a script. I seem to only be able to produce "NetApp.Ontapi.Filer.Lun.InitiatorInfo" as the value.
If I enter the same commands into the shell, I received the correct results.
In the shell --
> $myigroup = get-naigroup VMWare
But if I use the same in a script and execute, the value of $myigroup.Initiators becomes "NetApp.Ontapi.Filer.Lun.InitiatorInfo".
Any ideas why?
Solved! SEE THE SOLUTION
2012-06-01 05:47 AM
Figured it out. The value of $myigroup.Initiators is an array. I needed to change it to a string in order to use it as "one value".
To do that I used the string join method:
Which resulted in:
Which I could then use as a value in my Export-CSV file.