Scorpion_Veer
Scorpion_Veer

Reputation: 89

The Get-VM is not recognized as a command after taking a session

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.

Upvotes: 2

Views: 27383

Answers (2)

aaspnas
aaspnas

Reputation: 65

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

Upvotes: 1

Andrey Marchuk
Andrey Marchuk

Reputation: 13483

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?

Upvotes: 0

Related Questions