I had the same Problem and i just fixed it. Just add a "$" sign at the End for Example [DOMAIN]\gmsa$
that did the trick for me
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I am trying to setup a scheduled task that will run a script, and I want to use gMSA. I have followed this tutorial: https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/windows-server-2012-group-managed-service-accounts/ba-p/255910 and I search on all Microsoft social technet forum and other tech forums without success.
My powershell commands:
$TaskAction = New-ScheduledTaskAction -Execute C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -Argument 'powershell_script.ps1' -WorkingDirectory C:\User\username\Desktop
$TaskPrincipal = New-ScheduledTaskPrincipal -UserID LAB\gMSA_powershell$ -LogonType Password -RunLevel Highest
Register-ScheduledTask gmsaPowerShell -Action $TaskAction -Principal $TaskPrincipal
It result with error: "no mapping between account names and security ids was done"
What am I missing here ?
Thank you for your help !
I had the same Problem and i just fixed it. Just add a "$" sign at the End for Example [DOMAIN]\gmsa$
that did the trick for me
The only suggestion I can make (as I just ran into something similar myself) is to make sure your domain name is correct and valid when creating the $TaskPrincipal var. I encountered the same error while following a separate set of instructions for sMSA account creation and made the mistake of not changing the word "DOMAIN" in their script that I copy/pasted to my actual domain name. :P
Hello,
I tried your scheduled task it worked for me.
I think that your problem is about the creation of the gMSA. Could you paste here how you configure your gMSA?
Regards,
Riccardo