Subscribe
Accepted Solution

get-nanetinterface always shows the interface enabled, even when it's disabled

Anyone else having this issue?

I've tested on different filers, same results. get-nanetinterface shows every interface enabled. I can't get it to display the disabled interfaces as disabled.

Re: get-nanetinterface always shows the interface enabled, even when it's disabled

Are you trying to determine which interfaces are connected/active?  That's subtly different from "enabled".  Unfortunately the API doesn't make that abundantly clear, but you can look at the mediatype property which will end with "up" or "down" depending on its connection state:

PS C:\> get-nanetinterface | ft Interface, Enabled, Mediatype -AutoSize

Interface Enabled Mediatype

--------- ------- ---------

e0a          True auto-1000t-fd-up

e0b         False auto-1000t-fd-up

e0c         False auto-unknown-down

e0d         False auto-unknown-down

e0P          True auto-unknown-down

lo           True VIA Provider

losk         True

vh          False

Re: get-nanetinterface always shows the interface enabled, even when it's disabled

Yes. That's what I was trying to get at. In filerview or oncommand it's either enabled or disabled. That was confusing me. Thank you.