VMware Cloud Community
Sirry
Enthusiast
Enthusiast
Jump to solution

vCO with Powershell and VMware.VimAutomation.Extensions causing workflow to hang

Environment:

vSphere Version: 5.5

vCO Version: 5.5.0 build 1281930

PowerShell Plugin: PowerShell 1.0.3.304


I have successfully instantiated multiple Powershell commands through vCO in the past, including PowerCLI commands. However, when I use the

"import-module VMware.VimAutomation.Extensions"

command, the workflow appears to hang. I need this module in order to acquire vSAN information.


I know that the module is supposed to be implicitly imported without needing the declaration when running in a PowerShell prompt, but I also have experienced instances where I know the line is required, especially when a Powershell script requiring the module is called from the command line.


It appears to be the case here since removing the line causes an "unknown cmdlet" error when it tries to parse the "Get-VsanDiskGroup" command.




Any help would be greatly appreciated! Thank you.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Sirry
Enthusiast
Enthusiast
Jump to solution

Solution:

Add: "Get-childitem <importdirectory> | unblock-file " before:

import-module VMware.VimAutomation.Extensions

View solution in original post

0 Kudos
2 Replies
Sirry
Enthusiast
Enthusiast
Jump to solution

A small update - I attempted to change the script containing that problem line of code from being instantiated from vCO to being instantiated from a scheduled task and noticed it does not work there while it still does from the command line.... perhaps this sheds some light on what the issue may be?

0 Kudos
Sirry
Enthusiast
Enthusiast
Jump to solution

Solution:

Add: "Get-childitem <importdirectory> | unblock-file " before:

import-module VMware.VimAutomation.Extensions

0 Kudos