Share via

Execute PowerShell Script from Scheduled Task with GMSA

Chetan Dev 26 Reputation points
2020-05-01T15:22:49.133+00:00

Hello Everyone,

We have number of PowerShell scripts running with scheduled task in our environment and these tasks are running with different service as per required Privilegs.

We want to take the advantage of GMSA accounts to execute these scheduled task and good news, scheduled tasks are configured with GMSA account and tasks are being launched by GMSA account.

Here comes the issue, BUT GMSA credentials are not being delegated to the PowerShell script, we have Invoke-command and Get-WMI Object command in Powershell Script.

Thanks in advance... Happy Weekend...Be Safe

Regards
Chetan

"it always seems impossible until it is done"

Community Center | Not monitored
0 comments No comments

Answer accepted by question author

Leon Laude 86,201 Reputation points
2020-05-01T15:46:32.793+00:00

Hi,

Q&A currently supports the products listed in right-hand pane (more to be added later on).

You can reach the experts in the dedicated PowerShell forum over here:
https://social.technet.microsoft.com/Forums/en-US/home?forum=winserverpowershell

(please don't forget to mark helpful replies as answer)

Best regards,
Leon

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Suman Bhowmik 76 Reputation points
    2020-11-26T14:36:15.2+00:00

    Hi,
    You need to make sure that the gMSA account has sufficient permission on the destination to execute required commands.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.