I'm hoping someone can help me out here. Bing/Google aren't treating me too well on this.
I'm looking to mimic the Wired Network Check currently a part of the MDT UDI
wizard. PowerShell or .NET (that I can then plug into PowerShell) is
preferred. I'm basically building a small UI for a deployment and need the
system to be on the wired network and have AC Power plugged in. I have the AC
Power check done, but the Wired Network Check has me stumped.
Here's what I've tried thus far:
$WiredNICs = Get-WmiObject -Class Win32_NetworkAdapter -Filter
"PhysicalAdapter='true'" | Where-Object {($_.PNPDeviceID -notlike "ROOT*") -and
($_.Name -notlike "*Bluetooth*") -and ($_.Name -notlike "*Wireless*")}
This comes back with all wired network adapters and works great, but I can't
consistently match it up with Win32_NetworkAdapterConfiguration class.
$NetworkConnections = Get-WmiObject -Class Win32_NetworkAdapterConfiguration
-Filter IPEnabled=TRUE
This works well to find any connections that have a current IP, however on a
system that has Hyper-V enabled (like my Windows 8 system) my actual Wired
Intel NIC is taken over and so only the Hyper-V Virtual Ethernet Adapter shows
up. Hence my dilemma.
Any guidance would be much appreciated.
Dustin Hedges
Sr. Systems Engineer
GETOps - Global Client Engineering
eBay Inc.
[email protected] ebayinc.com
[cid:[email protected]]
<<inline: image003.jpg>>
