Hello I have a problem deploying VMs from Content Library using PowerCLI. If I don't use the Content Library item it works. Here's the command:
and attached is the error:
You are using parameters from different parameter sets.
You can't use ContentLibraryItem and OSCustomizationSpec together on the New-VM cmdlet.
See the different parameter sets for the cmdlet at the top of the Help page
As a bypass use the New-VM with ContentLibraryItem to create the VM.
Then use Set-VM -OSCustomizationSpec to assign the correct customization spec.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Are you sure the Get-ContentLibraryItem cmdlet is returning a Template object?
Which PowerCLI version are you using?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Luc
here is what the Get-ContentLibraryItem returns:
Name ContentLibrary ItemType SizeGB
---- -------------- -------- ------
TPL_WIN_2019_1120A GV CL ovf 28.987
and here my powercli version
PowerCLI Version
----------------
VMware PowerCLI 12.1.0 build 17009493
---------------
Component Versions
---------------
VMware Common PowerCLI Component 12.1 build 16997174
VMware Cis Core PowerCLI Component PowerCLI Component 12.1 build 16997582
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 12.1 build 16997984
VMware VimAutomation Storage PowerCLI Component PowerCLI Component 12.1 build 17001270
VMware VimAutomation Vds Commands PowerCLI Component PowerCLI Component 12.1 build 17001377
my apologies, I should have said that the Content Library in question has subscribed to another Library in the main site.
You are using parameters from different parameter sets.
You can't use ContentLibraryItem and OSCustomizationSpec together on the New-VM cmdlet.
See the different parameter sets for the cmdlet at the top of the Help page
As a bypass use the New-VM with ContentLibraryItem to create the VM.
Then use Set-VM -OSCustomizationSpec to assign the correct customization spec.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
many thanks!