ONTAP Discussions

Problem with Get-NcNetInterface

jhamoline
2,164 Views

Hi Everyone,

 

I'm using the Netapp powershell toolkit 4.6.0 (though the output looks like this from the Get-NaToolkitVersion command):

PS C:\Windows\system32> Get-NaToolkitVersion

Major Minor Build Revision
----- ----- ----- --------
4 4 0 0

 

On Windows 2016: 

Major Minor Build Revision
----- ----- ----- --------
10 0 14393 0

(Can someone explain why this happens?

PS C:\Windows\system32> (Get-NCNetInterface).address

OverloadDefinitions
-------------------
System.Object&, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Address(int )

 

I am expecting a list of all the IP addresses, one for each interface but I get this "error".  I can do other things without any issues like, a standard Get-NcInterface produces the expected result. For example, this works:

 

PS C:\Windows\system32> Get-NCNetInterface |fl address
Address : 169.254.60.248

Address : 169.254.1.195

1 REPLY 1

ChanceBingen
1,977 Views

I get the same output as you when I try to just direct call that property. I'm on Windows 10 with PSTK 4.7.

 

That said, if you need it now, you can get that data several ways.

 

In addition to the format list command you mentioned, here are a couple of options:

 

Get-NcNetInterface | Select -Property Address

Get-NcNetInterface | Select -ExpandProperty Address

 

Or start building like this:

$Addys = Get-NcNetInterface | Select -ExpandProperty Address

$Addys

 

 

Good luck, and let us know if you already resolved this issue.

Public