Hello everyone, I Am trying to invoke the set-executionpolicy cmdlet on my test computer but for some reason its returning an error station that the cmdlet is not recognized as the name of a cmdlet. My test computer hostname is WS1095 and this is the command that I am using;
This is a little bizarre but trying Enter-pssession returns this:
PS C:\WINDOWS\system32> Enter-PSSession -ComputerName ws1095 -Credential $creds
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
Not sure where its picking up measure-object from. It was working fine till recently. I am able to remote to other clients with no issues without getting the same error that this one is producing. Also when I run get-command -verb, the set-executionpolicy exist as well as the Enter-pssession cmdlet.
Thank you so much for taking your time and helping me.
Not odd - that’s a locked-down endpoint. Run Get-PSSessionConfiguration on the box and see what’s what. I’m guessing either the default endpoint was changed, or a new locked down endpoint was made the default. You may have to create a wide open endpoint and connect to it by name.
aaaahhh I see now. After staring hard at it I get whats going on. I was able to run the command using local admin creds. Not sure how this ended up being changed but like you stated, it was indeed locked down to only the local admin!
Even after those long 90 LONG videos on CBT nuggets you continue to be one of the most amazing help out there.
Thank you for taking your time to help me figure this issue out!!
Now I just need to figure out how to change this to the correct permissions =D lol