1

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
    Commented Jun 27, 2019 at 16:24

1 Answer 1

4

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .