Get-MtADDomainState
SYNOPSIS
Section titled “SYNOPSIS”Collects Active Directory domain state information.
SYNTAX
Section titled “SYNTAX”Get-MtADDomainState [-Refresh] [[-ComputerName] <String>] [[-DnsTimeoutSeconds] <Int32>] [[-MaxZoneCount] <Int32>] [[-MaxRecordCount] <Int32>] [[-Categories] <String[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]DESCRIPTION
Section titled “DESCRIPTION”Collects comprehensive domain state including domain info, forest info, computers, users, groups, domain controllers, replication sites, etc. Results are cached for the session to avoid repeated queries. Connect-Maester -Service ActiveDirectory must complete successfully before this command can collect or return data.
EXAMPLES
Section titled “EXAMPLES”EXAMPLE 1
Section titled “EXAMPLE 1”Get-MtADDomainStateReturns cached domain state or collects if not already cached. Returns no data unless Active Directory was explicitly connected through Connect-Maester.
EXAMPLE 2
Section titled “EXAMPLE 2”Get-MtADDomainState -RefreshForces a fresh collection of domain state data from Active Directory.
EXAMPLE 3
Section titled “EXAMPLE 3”Get-MtADDomainState -ComputerName dc01.contoso.comCollects domain state data by targeting dc01.contoso.com for supported Active Directory and DNS queries.
EXAMPLE 4
Section titled “EXAMPLE 4”Get-MtADDomainState -Categories Domain,UsersCollects only the Domain and Users categories (plus any dependencies).
PARAMETERS
Section titled “PARAMETERS”-Refresh
Section titled “-Refresh”Forces a refresh of the data from Active Directory, bypassing the cache.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-ComputerName
Section titled “-ComputerName”Specifies an Active Directory domain controller or AD DS server to target for data collection. When provided, LDAP and DNS queries are directed to this server. If not specified, the target selected by Connect-Maester is used.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-DnsTimeoutSeconds
Section titled “-DnsTimeoutSeconds”Specifies the timeout, in seconds, for remote DNS inventory collection.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 2Default value: 60Accept pipeline input: FalseAccept wildcard characters: False-MaxZoneCount
Section titled “-MaxZoneCount”Specifies the maximum number of DNS zones that may be normalized. Collection fails explicitly if the remote inventory exceeds this value.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 3Default value: 500Accept pipeline input: FalseAccept wildcard characters: False-MaxRecordCount
Section titled “-MaxRecordCount”Specifies the maximum number of DNS records that may be normalized. Collection fails explicitly if the remote inventory exceeds this value.
Type: Int32Parameter Sets: (All)Aliases:
Required: FalsePosition: 4Default value: 10000Accept pipeline input: FalseAccept wildcard characters: False-Categories
Section titled “-Categories”Specifies one or more category names to collect. When omitted, all categories are collected (legacy behavior). Dependencies are automatically resolved and collected first. Valid values: Domain, FineGrainedPasswordPolicies, Forest, Computers, Users, Groups, ServiceAccounts, DomainControllers, ReplicationSites, Subnets, OptionalFeatures, ReplicationConnections, DfsrSubscriptions, Trusts, OrganizationalUnits, SmbConfigurations, DNS, Configuration, Schema, Printers, DaclEntries.
Type: String[]Parameter Sets: (All)Aliases:
Required: FalsePosition: 5Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-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: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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.