Upgrade powershell from Version 2 to version 5.1 on windows server 2008 R2 and Server 2012.
Question
Dear All,
Need you support in remotely upgrading powershell from version 2 to version 5.1 on all windows 2008R2 and Serve 2012 R2.
Please share procedure.
Answers ( 5 )
No Dear, I don’t have a script. I cannot run Psexec because it is blocked in my environment. I learned that powershell 5.1 has a dependency of .net version 4.5 or above. So basically I am looking for a script which will check the dependencies and if required it will install the supplied .net package and then proceed with powershell upgrade. Any suggestions ?
This will get you started. I used it last year to upgrade PS to 5.0.
https://www.andersrodland.com/deploy-windows-management-framework-51-with-sccm/
You can deploy the script through sccm ..isn’t it?
Do you already have a script?
Thanks for your response Anoop. I am looking for a procedure to upgrade ps through SCCM.
But what is the trouble you are getting here?
Can you try the following on the test machine using PsExec or do you want to try this using SCCM?
You can try this forum
https://powershell.org/forums/topic/remote-deploy-update-powershell-version/
or
PsExec.exe \\computername -u domain\username -p password cmd /c “echo . | powershell Set-ExecutionPolicy RemoteSigned
PsExec.exe \\computername -u queensbury\username -p password cmd /c “echo . | powershell \\yourcomputer\b$\temp\powershell_Deployment.ps1″
You can try the following script http://newdelhipowershellusergroup.blogspot.com/2012/02/automate-server-administration-tools.html