VMware Cloud Community
avarcher
Commander
Commander
Jump to solution

new-customizationspec on 64 bit PowerCLI

When I use new-customizationspec on 64 bit PowerCLI (Windows Server 2003 Enterprise x64) with the parameter '-adminpassword' I get an error (see attached gif) ...

New-OSCustomizationSpec : 29/08/2010 07:07:11 New-OSCustomizationSpec is not a valid Win32 application. (Exception from HRESULT: x800700C1) At line:1 char:24

.... when I remove the '-adminpassword' parameter it works OK, also if I try it in 32 bit PowerCLI it works OK.

The best workaround for now would be - how can I force the command 'powershell file.ps1' with the add-pssnapin in the script to use 32 bit PowerCLI?

Thanks, Andy.

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Hi Andy,

Yes, I already managed to reproduce it and as Robert said, you can workaround it by starting PowerCLI in 32 bit mode.

Thanks again.

Vitali

View solution in original post

0 Kudos
4 Replies
RvdNieuwendijk
Leadership
Leadership
Jump to solution

Hi Andy,

If you start C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe you will use the 32 bit version of PowerShell on a 64 bit machine.

Regards, Robert

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
admin
Immortal
Immortal
Jump to solution

Hi Andy,

I will file a bug for this issue.

Can you see which version of PowerCLI you have? PowerCL 4.1 264274 ?

Use Get-PowerCLIVersion to check the version.

Vitali

PowerCLI team

0 Kudos
avarcher
Commander
Commander
Jump to solution

Hi Vitali

PowerCLI Version

-


VMware vSphere PowerCLI 4.1 build 264274

Cheers, Andy.

0 Kudos
admin
Immortal
Immortal
Jump to solution

Hi Andy,

Yes, I already managed to reproduce it and as Robert said, you can workaround it by starting PowerCLI in 32 bit mode.

Thanks again.

Vitali

0 Kudos