2012-08-14 01:38 PM
I am working with the vfiler creation script I found here on the NetApp communities, and for the most part the script runs perfectly until it comes to binding the vfiler IP to an if (or a vif in this case). The issue appears to be that the script is failing to pull any data at all from the filer regarding interfaces. Here is the script line:
$b = New-Object NetApp.Ontapi.Filer.Vfiler73.IpbindingInfo
And here is the error:
New-Object : Cannot find type [NetApp.Ontapi.Filer.Vfiler73.IpbindingInfo]: make sure the assembly containing this type is loaded.
At line:1 char:16
+ $b = New-Object <<<< NetApp.Ontapi.Filer.Vfiler73.IpbindingInfo
+ CategoryInfo : InvalidType: (:) [New-Object], PSArgumentException
+ FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
The rest of the script runs like a charm, just not this one. What am I missing?
Solved! See The Solution
2 REPLIES 2
2012-08-14 01:55 PM
I'm guessing that you downloaded the latest version of the toolkit? Prior to 2.1 we had different object types for different versions of ONTAP. In 2.1 we normalized the object types to eliminate this potential problem, but the flip side is it broke some scripts. The new syntax is:
$b = New-Object DataONTAP.Types.Vfiler.IpbindingInfo
Additionaly we also simplified that cmdlet entierly you can now add an IP address without the need to create an object.
Set-NaVfilerAddress vfiler1 -AddAddresses 192.168.1.115,192.168.1.116 -Interface e0a -Netmask 255.255.255.0
I think you hit one of maybe three cmdlets that were effected by the change. In the future I would check the built in help, because that is always up to date.
Get-Help Set-NaVfilerAddress -full
Sorry for the confusion, hope that helps.