After upgrading PowerShell from 4.0 to 5.1 on my Windows 7 laptop I’m unable to run most cmdlets. For example, if I open a new PS window and try to run Get-Service I get the following error:
get-service : The term ‘get-service’ 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 line:1 char:1
- get-service
-
+ CategoryInfo : ObjectNotFound: (get-service:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
I get that for any cmdlet I try to run. Tab complete is also not working. However, something really weird happens when I try to tab complete. If I start typing the cmdlet and try to tab complete, the tab complete doesn’t work. However after I try to tab complete, then end up just typing the rest of the command, it works. Here is an example:
PS C:\Users\mcelreathm> get-service
get-service : The term ‘get-service’ 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 line:1 char:1
- get-service
-
+ CategoryInfo : ObjectNotFound: (get-service:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\mcelreathm> get-serv
get-serv : The term ‘get-serv’ 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 line:1 char:1
- get-serv
-
+ CategoryInfo : ObjectNotFound: (get-serv:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\mcelreathm> get-service
Status Name DisplayName
Running AdaptivaClient AdaptivaClient
Running AdminHelper.exe AdminHelper.exe
Running AdobeARMservice Adobe Acrobat Update Service
…
This seems to only make built in cmdlets available. But still no tab complete.
Has anyone seen this before/know if there is something I can do to fix this. I’m due for a new laptop at work but I’m not sure how long I have to wait for it.