Test-MtAdManagedServiceAccountCount
SYNOPSIS
Counts managed service accounts (MSAs) in the domain.
SYNTAX
Test-MtAdManagedServiceAccountCount [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Managed Service Accounts (MSAs) and Group Managed Service Accounts (gMSAs) provide automatic password management and simplified service principal name (SPN) management for services running on domain-joined computers. This test counts the number of MSAs and gMSAs in the domain.
Security Benefits of MSAs:
- Automatic password rotation (every 30 days for gMSAs)
- Eliminates manual password management for service accounts
- Cannot be used for interactive logons
- Reduces risk of credential theft and reuse
- Should be used instead of traditional service accounts where possible
EXAMPLES
EXAMPLE 1
Test-MtAdManagedServiceAccountCount
Returns $true if service account data is accessible.
PARAMETERS
-ProgressAction
Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
System.Boolean
NOTES
RELATED LINKS
https://maester.dev/docs/commands/Test-MtAdManagedServiceAccountCount