i have many ESX hosts servers which i can connect to using the following commnad:-
>>Connect-VIServer
and i can retrieve their info and their VMs info using the following commands without any problem:-
>>Get-VMHost
>>Get-VM
but when i try to execute the Connect-VIServer on a "Microsoft Hyper-V Server 2012" server, i got the following error:-
>>Connect-VIServer | Network connectivity error occured. Please verify that the network address and port are correct. |
here is the screen shot :-
so can anyone adivce why i am unable to connect to MS hyper-v server in the same way i do for the ESX ? and if i manage to connect to it will i be able to run Get-VMHost & Get-VM power cli scripts on "MS hyper-v" ?
Thanks
Connect-viserver
This cmdlet establishes a connection to a vCenter Server system.
vSphere 6.0 Documentation Center
So you can connect to a vCenter or to an ESXi host with this command.
It means no hyperV
However i guess that you will find command to do similar things in the hyper-V world...but you will need to go to a microsoft forum to get more information.
thanks for the info . but you mean i can find PowerCli commands for the hyper-v servers ? or i will be running the commands from outside the powercli command line ?
Thanks
Yes. PowerCLI is specific to VMware. In order to connect to Hyper V, I believe, you can use PowerShell (By MS)
PowerCLI "just extends" PowerShell to provide a way to manage VMware products.
There are others modules specifically for hyper-V that will "extend" Powershell to manage microsoft products.
https://technet.microsoft.com/en-us/library/hh848559.aspx
And you have there a "get-vm" specifically for Hyper-V
It is always possible to load any modules from a PowerShell session.
So instead of starting "PowerCLI" you can start PowerShell and load all Modules and SnapIn associated to PowerCLI
From the same session you can also load all "hyper-V" modules or snapin associated to Hyper-V
However, i will not recommend it.
I don't know how PowerShell will react with two commands with the exact same name. (Get-VM in both case)
To keep it simple use PowerCLI when managing VMware
Use PowerShell + Hyper-V modules when managing Hyper-V