🎴 Flashcard Mode
Windows PowerShell and System Center Operations Manager Quiz
Card1 / 19
Mastered0
Review0
QuestionClick to flip
Which of the below CmdLet will give the MAC and IP address of a Remote system?
AnswerClick to flip back
A
$strComputer ="Compuet name" $colItems = GWMI -cl "Win32_NetworkAdapterConfiguration" -name "root\CimV2"-comp $strComputer -filter "IpEnabled = TRUE" Write-Host "MAC Address: " $objItem.MacAddress Write-Ho
💡 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.