Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 179681

Get-QADComputer fails workflow if launched in PowerShell script through Orchestrator

$
0
0

I am using the cmdlet "Get-QADComputer" in my .ps1 script that is scheduled to execute via Orchestrator.  I have several PowerShell scripts launched by Orchestrator and executed on a windows host without any issues.  For this one script, I have these 2 commands and it always errors out.  The script does not error when run locally.

 

Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue

$Computer = Get-QADComputer -Identity "server01" | where {$_.name -eq "server01"}

 

In troubleshooting, I have ran Get-PSSnapin and can see the Snapin for AD is successfully loaded.  I have tried Connect-QADService and that also gives the same error even though it works fine locally.

 

I am using the vCO 5.1.1. appliance.   On the Windows hosts where the PowerShell scripts are, the AD Snapin is version 1.6.0.2683.

 

Here is the error in the Orchestrator logs...

PowerShellInvocationError: Errors found while executing script

System.Runtime.InteropServices.COMException (0x8007054B): The specified domain either does not exist or could not be contacted.

 

 

   at Interop.ActiveDs.IADsOpenDSObject.OpenDSObject(String lpszDNName, String lpszUserName, String lpszPassword, Int32 lnReserved)

   at Quest.ActiveRoles.ArsPowerShellSnapIn.DirectoryAccess.AdsiDirectory.NativeBind(String adsPath, AuthenticationTypes bindFlags)

   at Quest.ActiveRoles.ArsPowerShellSnapIn.DirectoryAccess.AdsiDirectory.BindToObject(String dn)

   at Quest.ActiveRoles.ArsPowerShellSnapIn.DirectoryAccess.ConnectorFactory.Create(String serverName, String user, SecureString password, ConnectorType type)

   at Quest.ActiveRoles.ArsPowerShellSnapIn.Powershell.Cmdlets.ConnectionAwareCmdlet.EstablishConnection(ConnectionProperties connectionProperties)

   at Quest.ActiveRoles.ArsPowerShellSnapIn.Powershell.Cmdlets.ConnectionAwareCmdlet.GetContainer()

   at Quest.ActiveRoles.ArsPowerShellSnapIn.Powershell.Cmdlets.GetUserCmdlet.BeginProcessing()

   at System.Management.Automation.Cmdlet.DoBeginProcessing()

   at System.Management.Automation.CommandProcessorBase.DoBegin()

(Dynamic Script Module name : invokeScript#14)


Viewing all articles
Browse latest Browse all 179681

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>