2
votes

The term 'Get-VM' 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-VM:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

enter image description here

The PowerShell does not take the command Get-VM after taking session of VM.

2

2 Answers

1
votes

Get-VM is from a module that is not loaded by default (Hyper-V or VMM(?)).

You need to import the module first by using Import-Module, like for example:

Import-Module Hyper-V

This require that you have the windows feature where the module is found installed

0
votes

As you enter PS session on a different computer, the Get-VM command should be known to that computer. Can you try if Get-VM works on the target computer?