BartekPL
Contributor
Contributor

Get-OSCustomizationSpec returns an error

Hi!

I am trying to retrieve OS customization specification executing following command:  
Get-OSCustomizationSpec -Name "Wam" 

This customization exists 100% but I getting an error. 

Get-OSCustomizationSpec  Could not find Customization Specification with name 'Wam'. 

What am I doing wrong? 

Second question, how can I get a list of all existing OS customization specifications? 

Cheers

Bartek

0 Kudos
8 Replies
LucD
Leadership
Leadership

Just do a Get-OSCustomizationSpec without a parameter.

Is the 'Wam' one returned as well?

Are you connected to the correct vCenter?

What is in $global:defaultviservers


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

0 Kudos
BartekPL
Contributor
Contributor

A global server is fine. 

I checked it with Write-Host "global: $global:defaultviservers"

and it returns 10.217.242.77 

Both Get-OSCustomizationSpec -Server 10.217.242.77 

and 

 Get-OSCustomizationSpec returns nothing! 
I have a few OS customizations defined! Somehow they are not visible. 

 

Write-Host "global: $global:defaultviservers"
Get-OSCustomizationSpec -Server 10.217.242.77 
0 Kudos
LucD
Leadership
Leadership

Is that a vCenter or an ESXi node?

Can you show the OSCustomizationSpec entries in the Web Client?


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

0 Kudos
BartekPL
Contributor
Contributor

Hi! 

The problem was with permissions! 

You need to have access to the root folder (id 'Folder-group-d1') for this particular action!
Otherwise, it does not return anything!

0 Kudos
snandy
Contributor
Contributor

Hi All,

I  am trying to retrieve OS customization specification executing following command:

Get-OSCustomizationSpec $vmname #000_X92RETEST1NP
Get-OSCustomizationSpec Could not find Customization Specification with name '000_X92RETEST1NP '.

Is there any permission need to be given?

Tags (1)
0 Kudos
LucD
Leadership
Leadership

Is the name of the OSCustomizationSpec actually '000_X92RETEST1NP'?
Or is there a name (from $vmname) in front?


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

0 Kudos
snandy
Contributor
Contributor

It's the VM Name.

0 Kudos
LucD
Leadership
Leadership

So what is the name of the OSCustomizationSpec you are trying to retrieve?
Btw, do you see that OSCustomizationSpec in the Web Client when you connect with the same account?


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

0 Kudos