0

I have been trying different command in Powershell but all of them are not working. Where might be the problem ?

Screenshot of the commands I have tried

I am unable to run even the command to check the version :

C:\Users\ams.ssh>$PSversionTable '$PSversionTable' is not recognized as an internal or external command, operable program or batch file.

C:\Users\ams.ssh>$PSversionTable.PSVersion '$PSversionTable.PSVersion' is not recognized as an internal or external command, operable program or batch file.

C:\Users\ams.ssh>Get-Host | Select-Object Version 'Get-Host' is not recognized as an internal or external command, operable program or batch file.

1
  • 2
    What version of PowerShell do you have installed? Do you have PowerShell Core installed? If you do indicate which version of PowerShell Core you have installed. You should edit your question, to include this vital information that is absolutely necessary in order to answer your question. – Ramhound Jun 27 '19 at 16:24
3

Those are command prompt errors. You're trying to run PowerShell commands from cmd.exe. A PowerShell error looks like this:

PS C:\...\keith>get-bob
get-bob : The term 'get-bob' 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-bob
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (get-bob:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Keith

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.