Hi,
I'd need to trigger an update of Powershell to those pc's with Powershell V2.0.
What query would I need?
Technology Tips and News
Hi,
I'd need to trigger an update of Powershell to those pc's with Powershell V2.0.
What query would I need?
Looks like either software inventory or a custom mof.
Hi,
You can do it by using Compliance Settings:
First create an application installing new version of Powershell.
Then create a Configuration Item with the following Powershell script as discovery script:
Write-Output $PSVersionTable.PSVersion.Major
and a compliance rule as the following screenshot :
As a result, computer with older version of Powershell will be added by SCCM to a non-compliance collection on which Powershell V2 isntallation is deployed.
Reg
Thanks! Looks good indeed.
I'm trying now with a collection which has 2 pc's: one with PS2 and one with PS 3 doesn't work yet. Data type script is integer, right?
Can't make this work for now though I'm really sure I have Powershell V2 AND V3 pc's in the collection that I point it to.
Then I wonder if this is the correct setup. This is an overload (running the powershell command to every system) compared to just collect the powershell.exe in the client (as mentioned here: https://social.technet.microsoft.com/Forums/en-US/dea8851a-78b5-4682-966b-2f58bfdf222e/check-powershellexe-file-version?forum=configmanagergeneral)
See screenshot below for settings, will trigger inventory cycle and hope to get results soon then.
The script doesn't cause any load, it's just returning the value of PowerShell.
I am going to give it a go later, looks good and not done any compliance stuff yet. If you are not using software inventory for anything else have a read of this before you decided to go down that road.
http://be.enhansoft.com/post/2013/10/03/Slow-Software-Inventory-Cycle-in-SCCM-2012.aspx
Yes data is an integer.
Regards,
Rgis
The script doesn't cause any load, it's just returning the value of PowerShell.
I am going to give it a go later, looks good and not done any compliance stuff yet. If you are not using software inventory for anything else have a read of this before you decided to go down that road.
http://be.enhansoft.com/post/2013/10/03/Slow-Software-Inventory-Cycle-in-SCCM-2012.aspx
Awesome,
Finally got around to trying this. Couldn't get it to work at first. Had to change my client settings to allow PowerShell execution, from then on it was all down hill.