I upgraded the PowerShell 3.0 from 2.0 and installed PowerShell CLI from here: https://communities.vmware.com/community/vmtn/automationtools/powercli and following this url: http://windowsitpro.com/virtualization/vmware-vsphere-powercli but unable to add the modules, please find the below screen shot.
After adding modules I can only connect with vSphere and run the script like : > Connect-VIServer –Server IP
I tried even to resolve the issue: https://blogs.vmware.com/PowerCLI/2015/03/powercli-6-0-introducing-powercli-modules.html
Can some one please suggest asap.
Can some one please share a script for Standard Clone Automation from vSphere Client in PowerShell or Python.
As of PowerCLI 6.5R1 there are no PSSnapin anymore, only modules.
Which PowerCLI version are you running?
Do a Get-PowerCLIVersion
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
PowerCLI C:\> Get-PowerCLIVersion
PowerCLI Version
----------------
VMware PowerCLI 6.5 Release 1 build 4624819
---------------
Component Versions
---------------
VMware Cis Core PowerCLI Component 6.5 build 4624453
VMware VimAutomation Core PowerCLI Component 6.5 build 4624450
VMWare ImageBuilder PowerCLI Component 6.5 build 4561891
VMWare AutoDeploy PowerCLI Component 6.5 build 4561891
VMware Vds PowerCLI Component 6.5 build 4624695
VMware Cloud PowerCLI Component 6.5 build 4624821
VMware HA PowerCLI Component 6.0 build 4525225
VMware HorizonView PowerCLI Component 7.0.2 build 4596620
VMware Licensing PowerCLI Component 6.5 build 4624822
VMware PCloud PowerCLI Component 6.5 build 4624825
VMware Storage PowerCLI Component 6.5 build 4624820
VMware vROps PowerCLI Component 6.5 build 4624824
VMware vSphere Update Manager PowerCLI 6.5 build 4540462
PowerCLI C:\>
To load all modules you can do
Get-Module -Name VMware* -ListAvailable | Import-Module
You will now be able to use all PowerCLI cmdlets.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks it worked but I want to connect my vSphere Client so that i can do automation.
PowerCLI C:\> Get-Module -Name VMware* -ListAvailable | Import-Module
PowerCLI C:\> Connect-VIServer -Server IP
Connect-VIServer : 3/22/2017 12:42:55 PM Connect-VIServer Could not
resolve the requested VC server.
Additional Information: There was no endpoint listening at
https://<IP>/sdk that could accept the message. This is often caused
by an incorrect address or SOAP action. See InnerException, if present, for
more details.
At line:1 char:1
+ Connect-VIServer -Server <IP>
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Connect-VIServer], ViServer
ConnectionException
+ FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_NameR
esolutionFailure,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVISer
ver
PowerCLI C:\>
It looks like the name of your vSphere server can not be resolved, or that the server can not be reached (if you used an IP address).
Can you connect with a Web Client to that IP?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks a lot Now i am able to connect via PowerShell CLI to that IP.
Will connect you if any more help would be required.
Can you please ping me your mail id.
Can some one please share a script for Standard Clone Automation from vSphere Client in PowerShell or Python.
Do you mean cloning a VM to another VM?
That you can do as follows (note that you have to give the target ESXi node)
$esx = Get-VMHost | Select -First 1
New-VM -Name TestVMClone -VM TestVM -VMHost $esx
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I was talking for this one.
You use the same New-VM cmdlet, for a clone from a template, you use the Template parameter.
Have a look at Example 10
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Can you please help me to get the script as per mentioned under this url i.e for Creating VMWare from Template.
any update ?