Multiple choice technology

Which of the bellow command will list out all the Win32 classes available in PowerShell WMI in a tabular format and sorted by Name?

  1. Get-WMIObject -List| Where{$_.name -match "^Win32_"} | Sort Name | Format-Table Name
  2. Get-WMIObject -Table| Where{$_.name -match "^Win32_"} | Sort Class | Format-Table Name
  3. Get-WMIObject -List| Where{$_.name -notlike "^Win32_"} | Sort Name | Format-Table Name
  4. Get-WMIObject -List| Where{$_.name -like "^Win32_*"} | Sort Name | Format-Table Name
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Option A correctly uses Get-WmiObject -List to retrieve all WMI classes, then filters with -match ^Win32_ (regex for strings starting with Win32_), sorts by the Name property, and formats the output as a table. Option B uses the invalid -Table parameter, Option C uses -notlike which excludes Win32 classes, and Option D has an incorrect regex pattern with an extra asterisk.