Multiple choice technology

Which of the below CmdLet will give the MAC and IP address of a Remote system?

  1. $strComputer ="Compuet name" $colItems = GWMI -cl "Win32_NetworkAdapterConfiguration" -name "root\CimV2"-comp $strComputer -filter "IpEnabled = TRUE" Write-Host "MAC Address: " $objItem.MacAddress Write-Ho
  2. $strComputer ="Compuet name" $colItems = GWMI -cl "Win32_NetworkAdapterDetails" -name "root\CimV2"-comp $strComputer -filter "IpEnabled = TRUE" Write-Host "MAC Address: " $objItem.MacAddress Write-Host &qu
  3. $strComputer ="Compuet name" $colItems = GWMI -cl "Win32_NetworkAdapterConfiguration" -name "root\CimV2"-comp $strComputer -filter "IpEnabled = FALSE" Write-Host "MAC Address: " $objItem.MacAddress Write-H
  4. $strComputer ="Compuet name" $colItems = GWMI -cl "Win32_ NetworkAdapterDetails " -name "root\CimV2"-comp $strComputer -filter "IpEnabled = FALSE" Write-Host "MAC Address: " $objItem.MacAddress Write-Host
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Win32_NetworkAdapterConfiguration WMI class contains MACAddress and IPAddress properties for network adapters. The filter IpEnabled=TRUE selects only adapters with active IP configurations. Option B and D incorrectly use Win32_NetworkAdapterDetails which is not a valid WMI class. Option C uses IpEnabled=FALSE which would return adapters without IP configuration.