VMware vSphere

 View Only
  • 1.  Powershell new virtual machine

    Posted Nov 07, 2018 05:37 PM

    Were on Vsphere 6.7.0, seeing if anyone has a sufficient script to run that will go through and create one virtual machine with 2 cpu, 8gb of ram, 75gb disk and to select "datastore Default", select vm guest os = Microsoft windows server 2012 (64bit), specify destination, specify target and name server,



  • 2.  RE: Powershell new virtual machine

    Posted Nov 08, 2018 08:53 PM

    Something like this ....

    New-VM -Name [server name] -Datastore [datastore name] -DiskGB [size] -DiskStorageFormat [disk format thin\thick] -MemoryGB [size] -CD -GuestId [guestos] -NumCpu [number]



  • 3.  RE: Powershell new virtual machine
    Best Answer



  • 4.  RE: Powershell new virtual machine

    Posted Mar 24, 2023 12:12 AM

    Can you update with functioning links?



  • 5.  RE: Powershell new virtual machine

    Posted Nov 09, 2018 08:18 AM

    Hello,

    Kindly find the following:

    In PowerCLI, the New-VM cmdlet is used to create a new virtual machine. A few important things that can be set with New-VM are the following:

    Run New-VM while specifying the VM name, VMHost, datastore, number of CPU's, hard disk size and the network name.

    Example:

    New-VM -Name 'TestVM' –VMHost 'VMHost-1' -Datastore 'TestDatastore' -DiskGB 40 -MemoryGB 8 -NumCpu 2 -NetworkName 'Virtual Machine Network'

    Please consider marking this answer "CORRECT" or "Helpful" if you think your question have been answered correctly.

    Cheers,

    VCIX6-NV|VCP-NV|VCP-DC|

    @KakHassan

    linkedin.com/in/hassanalkak