Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

PowerShell Explicit Remoting Step Permissions

AdamRich
Tera Expert

Hello all,

 

I recently started diving into PowerShell Explicit Remoting Steps however I am struggling to find documentation on exactly what is needed for a process to run.

 

The PowerShell script I am trying to run is very simple however I keep getting the messages "Access Denied", when I sign into the Mid Server and open PowerShell ISE with the credentials and emulate ServiceNow triggering it using the Invoke-Command I get a "Success" response. 

 

 

try
{
$result = Start-ADSyncSyncCycle -PolicyType Delta
$status = "Success"
}
catch
{
$result = $_.Exception.Message
$status = "Error"
}


$response = @{
status = $status
body = $result
} | convertTo-Json

Write-Output $response

 

 

 

 

7 REPLIES 7

SanjivMeher
Mega Patron
Mega Patron

Can you confirm, the mid server service running on your mid server is using the service account which has access to powershell?


Please mark this response as correct or helpful if it assisted you with your question.

Yes, that is correct.

Hmm...Can you also check the ECC queue, if there is a detailed error? 


Please mark this response as correct or helpful if it assisted you with your question.

How would I find that?