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.
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
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
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
Hi Vitali
PowerCLI Version
-
VMware vSphere PowerCLI 4.1 build 264274
Cheers, Andy.
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