Get-NetConnectionProfile how to use a piped where command?

Hi all


This lists multiple connections.

What command can I use to give me the results for just the below connection ie

if the InterfaceAlias is “Tunnel” and the Name is “” ?

Name :
InterfaceAlias : Tunnel
InterfaceIndex : 87
NetworkCategory : DomainAuthenticated
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic

I’ve tried a piped where -match - like -eq, I’m getting the syntax wrong somewhere.

Thanks for any info.


When you post code, error messages, sample data or console output format it as code, please.
In the “Text” view you can use the code tags “PRE”, in the “Visual” view you can use the format template “Preformatted”. You can go back edit your post and fix the formatting - you don’t have to create a new one.
Thanks in advance.

Please take a look at the cmdlet Where-Object. Please read the complete help including the examples to learn how to use it.

If you have problems with your code you should share this code here completely including the error messages you might get.

With “-and” you have to go the scriptblock form:

| where { $_.InterfaceAlias -eq 'Tunnel' -and $_.Name -eq '' }