If you’re working in a big environment having the System Center Configuration Manager (SCCM) to make sure that you have installed the required versions of the software on your systems which include PowerShell, you must be tracking the software versions. The knowledge of PowerShell version is a safeguard in avoiding incompatible scripts and modules. This blog will show how to take advantage of SQL and WQL inquiries in order to ascertain the PowerShell version across all your SCCM managed devices.
Why Circuit PowerShell Versions?
PowerShell is a persuasive instrument used for automation and configuration management. The differences of the versions might be in terms of certain uses and cmdlets, so this may be a cause of your scripts’ inefficiency.
Making sure that the versions of the software are the same and that the system is updated and correctly set up is a good thing for making the system work right.

Making use of SQL Inquiries to Find PowerShell Version
Through SCCM, it is possible to use SQL inquiries to provide broad data of all the software installed. The prototype SQL question given below shows the process that retrieves the PowerShell version from the SCCM database
SELECT sysName
Explanation of the Challenge

Version AS ‘OS Version’, (SELECTValueFROMv_GS_INSTALLED_SOFTWAREWHEREProductNameLIKE
- SELECT Statement: This is a inquiry that gets the computer name, resource ID, the last connection time, os version, and PowerShell version.
- JOIN Clause: Uses a inquiry with the v_GS_COMPUTER_SYSTEM and v_GS_INSTALLED_SOFTWARE views to connect the software with the correct systems.
- WHERE Clause: Filters out all computers except those where PowerShell is installed.
Applying WQL Concerns in SCCM
WQL is an alternative way to question the data in SCCM that is equally strong as it is WMI Interrogation Language. While WQL is less all-around than SQL, it can still be a useful solution to clear-cut data retrieval instances. The PowerShell version can be found below:
SELECT Name, Version FROM Win32_Product WHERE Name LIKE '%PowerShell%'Explanation of the W
- SELECT Statement: Returns the name and version of the installed products.
- FROM Clause: Specifies the Win32_Product class which will represent the installed products in a Windows system.
- WHERE Clause: Filters results to show only those products, where actually the name of the product has PowerShell in it.

Outcome
The running PowerShell version on your devices can be quickly unyielding by exploiting SQL and WQL concerns in SCCM. The knowledge is a imperative tool to keep your systems working with the operating system and to avoid underperformance. Constantly checking the versions of software, incorporating PowerShell, can be a great time saver and also a big reliever for future problems.
Besides these, the concerns mentioned above can be modified to your environment and the systems will continue to perform as expected with the best version of PowerShell.
Queries
- The SCCM SQL command to pull the PowerShell version
- SCCM PowerShell WQL doubt
- WQL PowerShell SCCM
If you have any questions or need more hand with SCCM concerns, feel free to leave a comment below!