Accepted Solution

Powershell fails to gather IPbindinginfo

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: (Smiley Happy [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?

Re: Powershell fails to gather IPbindinginfo

Forgot  potentially important info:  Running Ontap 8.0.2P4 7-mode

Re: Powershell fails to gather IPbindinginfo

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, -Interface e0a -Netmask

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.