Using the new-VM and OSCustomizationSpec

I wrote this PowerCLI line to create a new virtual machine from a template, and use the OSCustomizationSpec option.

New-VM-name $VMName - Template "Svr_2k3_std" - VMHost $VMHost DiskStorageFormat - slim - OSCustomizationSpec $OSCust - ResourcePool 'Test' - data store "OS2".

Everything works fine until the end where I get this msg:

New - VM: 2011-04-27 15:24:02 new-VM the functioning of the entity V
irtualMachine-vm-10790 failed with the following message is displayed: "a specified parameter.
r was not correct.

I think it's because I entered the name of the server in the customization of the OS. Is there a way to provide these data in this command PowerCLI?

THX,

Scott

Interesting.

You can use something like the following to define OSCustomization and then use them when creating the VM.

Game-OSCustomizationSpec $OSCust - NamingScheme VM

New-VM-name $VMName - Template "Svr_2k3_std" - VMHost $VMHost DiskStorageFormat - slim - OSCustomizationSpec $OSCust - ResourcePool 'Test' - data store "OS2".

Let me know how you go.

Grant

Tags: VMware

Similar Questions

Maybe you are looking for

  • Display problem on my A60 Pro Sat

    The display on my satellite A60 pro features a strip of wide pixelated of 6-7cm at the bottom that hides my mouse cursor and the taskbar. The mouse is still active behind it. Mode full screen using an external monitor is seen. The group changes with

  • New HP Pavilion Slimline, does not recognize mic in the webcam.

    It recognizes the webcam as a Visual device, but does not have a microphone. What is the problem/how fix this?

  • How can I retreve programs on Start menu avirus deleted xp pro

    XP pro I lost access to a large number of example of quick files I go to Accessories and system tools and I don't get Internet explore some ad ons. If I run to do a frag of disc is * trying to find. I got 65 and a limited budget. is the a free progra

  • Windows 10 - cancel installation

    How can I get the upgrade of Windows to abandon the installation - I don't want 10 Windows on my computer and something must have taken place that made my computer wants to install when the computer reboots.  Please help to cancel this process.  Than

  • Windwos updates does not work

    Hello guys,. I can't active my windwos updates, suggestions please?