Difference between revisions of "PowerCLI Powerhsell"
Jump to navigation
Jump to search
Michael.mast (talk | contribs) |
Michael.mast (talk | contribs) |
||
Line 1: | Line 1: | ||
+ | ==Installation== | ||
Allow powershell to run powercli cmdlets | Allow powershell to run powercli cmdlets | ||
<pre> | <pre> | ||
Set-ExecutionPolicy RemoteSigned | Set-ExecutionPolicy RemoteSigned | ||
+ | Install-Module -Name VMware.PowerCLI | ||
</pre> | </pre> | ||
Log into the server and start using commands | Log into the server and start using commands |
Revision as of 09:32, 31 May 2017
Installation
Allow powershell to run powercli cmdlets
Set-ExecutionPolicy RemoteSigned Install-Module -Name VMware.PowerCLI
Log into the server and start using commands
$cred=get-credential connect-viserver -server localhost -credential $cred get-vm
Clone VM
new-vm -name <new_machine_name> -vm <source_machine_name> -vmhost <ip or host name of the physical host, not the controller>
Delete VM
remote-vm -vm <namme_of_vm> -deletepermanently -confirm $false