Difference between revisions of "PowerCLI Powerhsell"
Jump to navigation
Jump to search
Michael.mast (talk | contribs) |
Michael.mast (talk | contribs) |
||
Line 8: | Line 8: | ||
connect-viserver -server localhost -credential $cred | connect-viserver -server localhost -credential $cred | ||
get-vm | get-vm | ||
+ | </pre> | ||
+ | ==Clone VM== | ||
+ | <pre> | ||
+ | new-vm -name <new_machine_name> -vm <source_machine_name> -vmhost <ip or host name of the physical host, not the controller> | ||
</pre> | </pre> |
Revision as of 09:00, 31 May 2017
Allow powershell to run powercli cmdlets
Set-ExecutionPolicy RemoteSigned
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>