Hi there,
Get domain information from Active Directory
PS C:\> Get-ADDomain -Identity user.com
This command gets the domain information for the domain user.com.
Get domain information of the current local computer domain
PS C:\> Get-ADDomain -Current LocalComputer
This command gets the domain information of the current local computer domain.
This link might be helpful for you https://learn.microsoft.com/en-us/powershell/module/activedirectory/get-addomain?view=windowsserver2019-ps
Hope this answers all your queries, if not please do repost back.
If an Answer is helpful, please click "Accept Answer" and upvote it : )