0

Is Get-VM native PowerShell cmdlet? I used Get-Command in PS, but could not able to find the cmdlet Get-VM.

Is this cmdlet specific to VMware? Is there some PowerShell command I am missing to get these hidden cmdlets?

TylerH
  • 20,799
  • 66
  • 75
  • 101
user1659498
  • 11
  • 1
  • 2

3 Answers3

3
  1. No. On Windows Server 2008 R2, you can use http://pshyperv.codeplex.com to manage Hyper-V using PowerShell cmdlets. On Windows Server 2012, when you enable Hyper-V role or on Windows 8, when you install Remote Server Administration Tools (RSAT for Windows Server 2012), you get Hyper-V PowerShell cmdlets from Microsoft. Get-VM is a part of that.

  2. Get-VM comes as a part of PowerCLI install for ESX management.

ravikanth
  • 24,922
  • 4
  • 60
  • 60
0

If you have VMware PowerCLI installed, you can load the module/snapin:

Add-PSSnapin vmware.vimautomation.core
KERR
  • 1,312
  • 18
  • 13
0

If you have internet connection on your machine then you can install modules from online as and when needed.

I.e for Powercli which is where Get-VM comes from, instructions are here https://blogs.vmware.com/PowerCLI/2017/04/powercli-install-process-powershell-gallery.html

Find-Module -Name VMware.PowerCLI
Install-Module -Name VMware.PowerCLI 

Once done then use to allow access to the commands:

Import-Module VMware.PowerCLI 

Regards SQL:

https://learn.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-powershell

SQL Server Setup automatically configures PowerShell components.

If you are not on the server then

Install-Module -Name SqlServer

and repeat steps the same as PowerCli, you can choose a specific version of sql by using additional attribute of: -Version 21.0.17178

user3520245
  • 1,016
  • 1
  • 8
  • 18