Hi SAGA,
How is your issue going? Has it been resolved yet? If it has, please consider accepting the answer as it helps others sharing the same problem benefit too. Thank you :)
VP
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi Team,
We would like to setup the gMSA to enhance the security for service accounts.
Root key is already setup , want to know if we have to configure the task scheduler, services or any other windows related requirement do we need to use powershell only , wont it possible to use gui to update the account. when we try to update n task scheduler gui with serviceaccountname$ and save it says task scheduler cannot apply your changes.
Also in the target server is it mandatory to enable the ad powershell module to install the gmsa and to configure? could you give some insight and command to configure schedule tasks and services etc
Hi SAGA,
To use a Group Managed Service Account on a target server, you must first provision it locally so the operating system knows how to automatically retrieve the password from Active Directory. Doing this does require the Active Directory PowerShell module to be present on the target host. You can easily add this by running the Install-WindowsFeature RSAT-AD-PowerShell command in an elevated prompt. Once the module is available, executing Install-ADServiceAccount -Identity "Domain\YourgMSA$" registers the account with the local Netlogon service.
Configuring the account for standard Windows services is straightforward and fully supported in the graphical interface. You can open the services.msc console, locate your specific service, and enter your account in the DOMAIN\AccountName$ format on the Log On tab. The system will automatically pre-fill placeholder dots in the password fields, which you must completely highlight and delete so both boxes are entirely empty before applying the changes.
Task Scheduler handles Group Managed Service Accounts differently and frequently rejects them through the graphical interface with the exact application error you encountered. Microsoft highly recommends using PowerShell to assign a managed service account to a scheduled task to bypass these legacy credential checks. You will need to use the New-ScheduledTaskPrincipal cmdlet, defining the -UserId as your managed account and specifically setting the -LogonType to Password. While selecting a password logon type seems counterintuitive for an account where you do not know the password, it is the required operational parameter to instruct the task to fetch the credentials dynamically from Netlogon. You then pass this principal object into the Register-ScheduledTask cmdlet to finalize the configuration without being prompted for manual credentials.
Hope this answer brought you some useful information. If it did, please hit “accept answer”. Should you have any questions, feel free to leave a comment.
VP
AI answer
gMSAs can be configured using both PowerShell and GUI, but PowerShell is required for creating and installing the gMSA itself. GUI can then be used to assign the gMSA to services, IIS app pools, and scheduled tasks.
Add-KdsRootKey -EffectiveImmediately
New-ADServiceAccount -Name "MyGmsa$" `
-DNSHostName "MyGmsa.domain.com" `
-PrincipalsAllowedToRetrieveManagedPassword "MyGmsaHostsGroup"
Test-ADServiceAccount -Identity "MyGmsa$"
Get-ADServiceAccount -Identity "MyGmsa$" | Select-Object *
New-ADServiceAccount, Set-ADServiceAccount, etc. Install-ADServiceAccount -Identity "MyGmsa$"
Services (Service Control Manager)
Install-ADServiceAccount has been run on the server, the service identity can be changed via GUI:
services.msc.DOMAIN\MyGmsa$.Scheduled tasks (Task Scheduler)
Install-ADServiceAccount on the server, a task can be configured via GUI:
DOMAIN\MyGmsa$.sc.exe config or Set-Service with the gMSA account name DOMAIN\MyGmsa$ and no password.Register-ScheduledTask with a principal that specifies the gMSA account.New-ADServiceAccount, Set-ADServiceAccount, etc.).Install-ADServiceAccount, Test-ADServiceAccount).$ in the account name and do not enter a password.References: