Identify Internet connected NIC

This topic contains 2 replies, has 2 voices, and was last updated by  Vern Anderson 5 years ago.

  • Author
  • #8532

    Vern Anderson

    Does anyone know of a 2012 NIC property that is the equivalent of GUI ncpa.cpl Network Connections "Internet Access"? I'm trying to use that property in a PowerShell script to identify the NIC that I want to make changes to.


    When you look at Network Neighborhood (ncpa.cpl) (yes I still call it that) and change the view to detailed view there's a column that displays "Connectivity" and the NIC I call public has Internet access. Thanks in advance!


  • #8536

    Richard Siddaway

    Check the Get-NetConnectionProfile cmdlet in the NetConnection module. It will show data like this:

    Name : NetworkName
    InterfaceAlias : AdapterName
    InterfaceIndex : 12
    NetworkCategory : Private
    IPv4Connectivity : Internet
    IPv6Connectivity : LocalNetwork

    Please let me know if you need any more help with this

  • #8538

    Vern Anderson

    This is perfect!

    Thank you very much Richard!!!

    Here's the final script:

    $PublicInterface = Get-NetConnectionProfile -IPv4Connectivity Internet | Select-Object -ExpandProperty InterfaceAlias

    Rename-NetAdapter -Name $PublicInterface -NewName "Public"


You must be logged in to reply to this topic.