VMware Cloud Community
esxi1979
Expert
Expert

Get-OSCustomizationSpec xxx

Hi All,

Get-OSCustomizationSpec xxx

gives me the name but also throw err like below, any idea why is that ?

Get-OSCustomizationSpec xxx

Name                                         Description Type          OSType  LastUpdate           Server

----                                         ----------- ----          ------  ----------           ------

xxx                                              Persistent    Linux   1/8/2018 4:16:06 PM  xxx..

Get-OSCustomizationSpec : 1/8/2018 4:17:27 PM   Get-OSCustomizationSpec         Could not find Customization Specification with

name 'xxx'.

At line:1 char:2

+  Get-OSCustomizationSpec xxx

+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (xxx:String) [Get-OSCustomizationSpec], VimException

    + FullyQualifiedErrorId : Common_CommonUtil_FilterCollection_ObjectNotFound,VMware.VimAutomation.ViCore.Cmdlets.Co

   mmands.GetOSCustomizationSpec

Get-OSCustomizationSpec : 1/8/2018 4:17:28 PM   Get-OSCustomizationSpec         Could not find Customization Specification with

name 'xxx'.

At line:1 char:2

+  Get-OSCustomizationSpec xxx

+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (xxx:String) [Get-OSCustomizationSpec], VimException

    + FullyQualifiedErrorId : Common_CommonUtil_FilterCollection_ObjectNotFound,VMware.VimAutomation.ViCore.Cmdlets.Co

   mmands.GetOSCustomizationSpec

i am using the same in vm creation

thanks

3 Replies
LucD
Leadership
Leadership

Could it be that you have 2 connections open?

What is in $global:defaultviservers?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
esxi1979
Expert
Expert

Yes i have connected to 3 vcenters. so let me try this with 1 vcenter

0 Kudos
BjornJohansson
Enthusiast
Enthusiast

You also need to connect with an account with enough privilegies.

/B

0 Kudos