Identify Internet connected NIC

Welcome Forums General PowerShell Q&A Identify Internet connected NIC

This topic contains 2 replies, has 2 voices, and was last updated by

5 years, 4 months ago.

  • Author
  • #8532

    Points: 1
    Rank: Member

    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

    Points: 0
    Rank: Member

    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

    Points: 1
    Rank: Member

    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"


The topic ‘Identify Internet connected NIC’ is closed to new replies.