Discussion:
How do I upgrade Power Shell
(too old to reply)
T
2023-12-15 20:20:52 UTC
Permalink
Hi All,

Windows 7 Pro Sp1 32 bit

I need at least Power Shell 5 to run a script. Everything
I have found on the web does not work.

How do I upgrade Power Shell?

Many thanks,
-T
Brian Gregory
2023-12-15 20:51:30 UTC
Permalink
Post by T
Hi All,
Windows 7 Pro Sp1 32 bit
I need at least Power Shell 5 to run a script.  Everything
I have found on the web does not work.
How do I upgrade Power Shell?
Many thanks,
-T
I think I did it with this:
https://www.microsoft.com/en-us/download/details.aspx?id=54616
--
Brian Gregory (in England).
T
2023-12-15 21:50:04 UTC
Permalink
Post by Brian Gregory
Post by T
Hi All,
Windows 7 Pro Sp1 32 bit
I need at least Power Shell 5 to run a script.  Everything
I have found on the web does not work.
How do I upgrade Power Shell?
Many thanks,
-T
https://www.microsoft.com/en-us/download/details.aspx?id=54616
Hi Brian,

Tried that.

When running the MSU (Win7-KB3191566-x86.msu), I get

The update is not applicable to your computer

And it requires that the Windows Update Service be
running. (I typically have it disabled on all my
windows machines.)


The script won't run as administrator from a network
drive. Raspberries!

When running the script (Install-WMF5.1.ps1), I get

PS C:\Drivers\PowerShell\Win7-KB3191566-x86> ./Install-WMF5.1.ps1
Resolve-Path : Cannot find path
'C:\Drivers\PowerShell\Win7-KB3191566-x86\Win7AndW2K8R2-KB3191566-x64.msu'
because it does not exist.
At C:\Drivers\PowerShell\Win7-KB3191566-x86\Install-WMF5.1.ps1:140 char:28
+ $packagePath = Resolve-Path <<<< (Join-Path $scriptPath $packageName)
+ CategoryInfo : ObjectNotFound:
(C:\Drivers\Powe...3191566-x64.msu:String) [Resolve-Path], ItemNotFoundE
xception
+ FullyQualifiedErrorId :
PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand

Interesting that it can not find Win7AndW2K8R2-KB3191566-x64.msu,
which I did not download.



So be that way, I downloaded Win7AndW2K8R2-KB3191566-x64.zip
and Win7AndW2K8R2-KB3191566-x64.msu is now installing.

And now I have:

PS> $PSVersionTable

Name Value
---- -----
PSVersion 5.1.14409.1005
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1005
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1



Thank you!

Loading...