VMware Cloud Community
caddo
Enthusiast
Enthusiast
Jump to solution

PowerCli 4.1.1 on Server 2008 R2

Hi everyone,

i am dealing with a server with PowerCli installed and i have a very simple problem: when i use "wait-tools" in a script it works fine if i run it on the 32-bit version of the console but if i run it on the regular console (64-bit) it returns an error stating that "VIX is not installed" which is not true of course.

Problem is that scripts are scheduled invoking the script from powershell.exe which seems to run natively on 64-bit so the script is not working.

Any workaround? Do i have to install and schedule on another server?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
RvdNieuwendijk
Leadership
Leadership
Jump to solution

All the cmdlets that use VIX don't work with the 64 bit version of PowerCLI. You have to use the 32 bit version of PowerCLI to use these cmdlets.

You can run the 32 bit version of PowerCLI with:

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -psc "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" -noe -c ". \"C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1\""

I looked in the VMware vSphere PowerCLI 4.1 Update 1 Release Notes and noticed that Wait-Tools was not mentioned in the list of cmdlets that only work in 32 bit PowerCLI.

Note however the following quote from the relase notes:

vSphere PowerCLI Compliance with WorkStation

    When vSphere PowerCLI is installed on a machine with Workstation already installed, the VIX API is not upgraded and the vSphere PowerCLI functionality that depends on VIX (for example, Invoke-VMScript) does not work.
    Workaround: Before installing vSphere PowerCLI, uninstall Workstation. After installing vSphere PowerCLI, install Workstation again.

Regards, Robert

Message was edited by: RvdNieuwendijk

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

View solution in original post

0 Kudos
1 Reply
RvdNieuwendijk
Leadership
Leadership
Jump to solution

All the cmdlets that use VIX don't work with the 64 bit version of PowerCLI. You have to use the 32 bit version of PowerCLI to use these cmdlets.

You can run the 32 bit version of PowerCLI with:

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -psc "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" -noe -c ". \"C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1\""

I looked in the VMware vSphere PowerCLI 4.1 Update 1 Release Notes and noticed that Wait-Tools was not mentioned in the list of cmdlets that only work in 32 bit PowerCLI.

Note however the following quote from the relase notes:

vSphere PowerCLI Compliance with WorkStation

    When vSphere PowerCLI is installed on a machine with Workstation already installed, the VIX API is not upgraded and the vSphere PowerCLI functionality that depends on VIX (for example, Invoke-VMScript) does not work.
    Workaround: Before installing vSphere PowerCLI, uninstall Workstation. After installing vSphere PowerCLI, install Workstation again.

Regards, Robert

Message was edited by: RvdNieuwendijk

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
0 Kudos