In this article I am going to show you how you can check the sccm client health and version via powershell.
I use the scripts in the article every few months to health my sccm clients.
How To Check SCCM Version With PowerShell
It is possible to get the sccm client version via a wmi query.
To check the sccm client version with powershell follow these steps
- Log on to the client
- open powershell ise via the start menu
- Paste the below code in to powershell ise
$ClientVersion = (Get-WMIObject -Namespace root\ccm -Class SMS_Client).ClientVersion
cls
write-host””
write-host “Client Version is $ClientVersion”
write-host”” - run the script
- The output will show as in the screenshot below
- You can see that version 5.00.8853.1006 is installed
Bulk Check SCCM Client Health and Version Via Powershell
Follow these steps
- Open notepad and enter all the client names you want to check, save the file as a .txt file
- Open System Center Configuration Manager
- Click on the down facing arrow then Connect via Windows Powershell
- To output the client health result in a powershell window type in Get-Content -path C:\Temp\server_list.txt | foreach { “{0} – {1}” -f $_, (Get-WMIObject -ComputerName $_ -Namespace root\ccm -Class SMS_Client).ClientVersion} in the powershell window, replace C:\Temp\server_list.txt with the file that you created in step 1. The output from this command will look like
- If you want to output the result to a .txt file run the following command in the powershell window Get-Content -path C:\Temp\server_list.txt | foreach { “{0} – {1}” -f $_, (Get-WMIObject -ComputerName $_ -Namespace root\ccm -Class SMS_Client).ClientVersion} > C:\Temp\result.txt
If you have any questions about this process please ask about it by posting in a comment below.
Hello, I am the owner of this site. I have 25+ years experience of IT. Check us out on the below social platforms.
Thank you