Challenge - 5 Problems
CIM/WMI Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Output of Get-CimInstance for Win32_OperatingSystem
What is the output type of the following PowerShell command?
Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -Property Caption, Version
PowerShell
Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -Property Caption, Version
Attempts:
2 left
💡 Hint
Think about what Win32_OperatingSystem class represents in WMI.
✗ Incorrect
The Get-CimInstance cmdlet retrieves instances of WMI classes. Win32_OperatingSystem contains OS info. Selecting Caption and Version shows OS name and version.
📝 Syntax
intermediate2:00remaining
Correct syntax to query CIM instances remotely
Which option shows the correct syntax to get the list of services from a remote computer named 'Server01' using CIM cmdlets?
Attempts:
2 left
💡 Hint
The parameter to specify a remote computer is -ComputerName.
✗ Incorrect
The correct parameter to specify a remote computer in Get-CimInstance is -ComputerName. Other options are invalid parameters.
🔧 Debug
advanced2:00remaining
Identify the error in this CIM query
What error will this command produce?
Get-CimInstance -ClassName Win32_Process -Filter "Name = 'notepad.exe'"
PowerShell
Get-CimInstance -ClassName Win32_Process -Filter "Name = 'notepad.exe'"Attempts:
2 left
💡 Hint
Check the filter syntax and property name carefully.
✗ Incorrect
The filter syntax is correct with double quotes outside and single quotes inside. 'Name' is a valid property of Win32_Process. The command returns all notepad.exe processes if any exist.
🚀 Application
advanced2:00remaining
Using CIM cmdlets to restart a service
Which command correctly restarts the 'Spooler' service on the local computer using CIM cmdlets?
Attempts:
2 left
💡 Hint
You need to get the service instance first, then invoke methods on it.
✗ Incorrect
Option A correctly gets the service instance and calls StopService and StartService methods on it. Option A incorrectly tries to pass service name as argument to methods. Option A uses a different cmdlet. Option A uses a non-existent cmdlet.
🧠 Conceptual
expert2:00remaining
Difference between Get-CimInstance and Get-WmiObject
Which statement best describes the difference between Get-CimInstance and Get-WmiObject cmdlets?
Attempts:
2 left
💡 Hint
Think about the communication protocols used by each cmdlet.
✗ Incorrect
Get-CimInstance uses the newer WS-Management protocol which is firewall-friendly and more efficient. Get-WmiObject uses older DCOM protocol and is deprecated in newer PowerShell versions.