Use the below to find the SAMAccountName of the AD GMSA
Get-ADServiceAccount -Filter * -Properties Name, SAMAccountName, DistinguishedName | Format-Table Name, SAMAccountName, DistinguishedName -AutoSize
$gmsa = Get-ADServiceAccount -Identity SAMAccountName$
Set-ADAccountControl -Identity $gmsa -AccountNotDelegated $true
