Updated PowerShell from 1.0 to the latest 7.1 version.
Installed prerequisite Windows Management Framework (WMF) 5.1.
Installed .Net Framework 4.8 (minimum required 4.5 as indicated by MS).
System.Management.Automation.CommandNotFoundException: The term 'Get-Partition' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at PowershellRM.ParentMeasure.Reload() (#Test\Atest.ini - [MeasureGetDriveMedia])
What can be the problem?
You do not have the required permissions to view the files attached to this post.
Active Colors wrote: ↑July 14th, 2021, 10:27 pmMaybe this is the command problem not supported on Windows 7.
Get-Partition is supported in Windows 7 (and probably PS 2.0 as well). What's supported only from PS 3.0 and up is the Where-Object cmdlet.
However, since you installed everything needed, it should work, assuming the scripts execution is permitted, as jsmorley mentioned. Maybe a restart could help?
P.S. You probably know this already, but just in case you somehow missed something, these are the PS requirements.
Updated PowerShell from 1.0 to the latest 7.1 version.
Installed prerequisite Windows Management Framework (WMF) 5.1.
Installed .Net Framework 4.8 (minimum required 4.5 as indicated by MS).
System.Management.Automation.CommandNotFoundException: The term 'Get-Partition' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at PowershellRM.ParentMeasure.Reload() (#Test\Atest.ini - [MeasureGetDriveMedia])
What can be the problem?
Try running $PSVersionTable and see if Powershell 7 shows up. Because I am pretty sure, you can't make 7 the default PowerShell. Either it is 5.1 or 1.0. And I recommend you try this in PowerShell Console directly.