VMware Cloud Community
a4ivmware
Contributor
Contributor

[Solved] PowerCLI - Set-OSCustomiztionSpec : strange problem...

Hi,

I'm currently meeting a strange problem with a very basic powershell script (here-under).

The Set-OSCustomizationSpec cmdlet send the following error message:

Set-OSCustomizationSpec : 03/03/2010 17:09:32 Set-OSCustomizationSpec 383D9D2F-8436-477F-9B12-C99CB96F7CA6 Error occured while executing cmdlet: Set-OSCustomizationSpec. Check Inner exception for more details. At C:\DOCUME1\XPBE3\LOCALS~1\Temp\8af09788-b57e-4c65-85f4-fc6b39aaf092.ps1: 12 char:24 Set-OSCustomizationSpec <<<< -Spec testcusto -Description "It is a test"

I've checked the synthax the cmdlet in the "vSphere PowerCLI cmdlets

reference", I've also browsed the vmware KB and the communities without success.

Here is my environment :

  • PowerCli 4.0 U1

  • ESX 3.5.0 (build 153875)

  • Virtual Center 2.5.0 U5 (build 174768)

  • Windows XP SP3 fully updated

Script:

#Test Script to modify OsCustomization

$vc_user="username"

$vc_password="password"

$codevc="192.168.0.84"

Connect-VIServer -Server $codevc -Us

Set-OSCustomizationSpec -Spec testcusto -Description "It is a test"

Have you an idea ?

Thanks for your help,

Dom

0 Kudos
1 Reply
a4ivmware
Contributor
Contributor

This problem is a bug when you try to modify a OSCustomization based on a Custom Sysprep File.

So, there is no way to use a cmdlet to create or to modify an OSCustomization based on Custom Sysprep File with PowerCLI 4.0 U1.

The only way to create a such OSCustomization is to use the .Net API.

0 Kudos