-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include hidden adapters by default? #499
Comments
I tend to lean towards Option 2 as well - but good point regarding |
Also keen to get community input on this one as there might be some reasons that we need to make this optional that I'm not aware of. |
Adapter names must already be unique, so whenever the adapter name is specified explicitly the -IncludeHidden switch should never change which adapter is actually targeted. For NetAdapterName, it supports wildcards: get-netadapter -InterfaceDescription "*"
Name InterfaceDescription ifIndex Status MacAddress LinkSpeed
---- -------------------- ------- ------ ---------- ---------
EPN Miniport LogMeIn Hamachi Virtual Ethernet Ada... 3 Up 7A-79-19-05-B3-38 10 Gbps
Ethernet Microsoft Hyper-V Network Adapter 4 Up 00-15-5D-CC-F0-02 1 Gbps versus get-netadapter -InterfaceDescription "*" -IncludeHidden
Name InterfaceDescription ifIndex Status MacAddress LinkSpeed
---- -------------------- ------- ------ ---------- ---------
Teredo Tunneling Pseud... 7 Disabled 00-00-00-00-00... 100 Kbps
EPN Miniport LogMeIn Hamachi Virtual Ethernet Ada... 3 Up 7A-79-19-05-B3-38 10 Gbps
Microsoft IP-HTTPS Pla... 6 Not Present 0 bps
Ethernet (Kernel Debug... Microsoft Kernel Debug Network Adapter 5 Not Present 0 bps
Ethernet Microsoft Hyper-V Network Adapter 4 Up 00-15-5D-CC-F0-02 1 Gbps
6to4 Adapter 2 Not Present 0 bps |
Details of the scenario you tried and the problem that is occurring
We have a need to configure a setting on a hidden network adapter, easily enough handled by adding -IncludeHidden to *-NetAdapter et al.
Verbose logs showing the problem
Suggested solution to the issue
Options:
1: add IncludeHidden parameter to most of the resources in NetworkingDsc, which in turn passes -IncludeHidden to the appropriate cmdlets. I started #495 on this already, but then @PlagueHO suggested a much simpler solution:
2. Add -IncludeHidden to all the cmdlets, anyways.
My vote is for option 2 with one exception: add IncludeHidden parameter to NetAdapterName resource. All other resources key off of Name/InterfaceAlias so including hidden adapters when searching seems like it wouldn't break anything: the unique name is already specified. But, for NetAdapterName the key is Description so adding -IncludeHidden could potentially increase the search space unexpectedly if wildcards are used.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
# insert configuration here
The operating system the target node is running
OsName : Microsoft Windows 10 Pro for Workstations
OsOperatingSystemSKU : 161
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage : en-US
OsMuiLanguages : {en-US}
Version and build of PowerShell the target node is running
Name Value
PSVersion 5.1.19041.906
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.906
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version of the DSC module that was used ('dev' if using current dev branch)
8.2.0 NetworkingDsc
The text was updated successfully, but these errors were encountered: