Hello there everyone,
I have a test computer that I’ve been using to test powershell on for a while now. No configurations have been made to any of the powershell files. Just now for some reason I have found myself unable to enter a pssession into it or invoke commands. I have been able to do this just fine but now I am unable to do so. When I try to invoke this is what is returned.
PS C:\WINDOWS\system32> Invoke-Command -ComputerName ws1095 -ScriptBlock {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.
+ CategoryInfo : ObjectNotFound: (Get-Service:String) , CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
+ PSComputerName : ws1095
writeErrorStream : True
PSMessageDetails :
OriginInfo : ws1095
Exception : System.Management.Automation.RemoteException: 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.
TargetObject : Get-Service
CategoryInfo : ObjectNotFound: (Get-Service:String) , CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
When I try to enter a pssession this is what is returned:
PS C:\WINDOWS\system32> Enter-PSSession -ComputerName ws1095
Enter-PSSession : The term ‘Measure-Object’ 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
- Enter-PSSession -ComputerName ws1095
-
+ CategoryInfo : ObjectNotFound: (Measure-Object:String) [Enter-PSSession], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException</strong>
Any suggestions? I am able to do this fine to other client on the network except now for this one.
My env:psmodule path is still set to default.
Thank you in advance for the help!