User details:

Whoami

hostname

Echo %username%

Net users

Net user USERNAME

Get Windows User and Domain Information

set

whoami /all

Get-ADTrust

Information on current domain:

Domain information:

[System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()

Domain Trusts:

([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).GetAllTrustRelationships()

Current forest info:

[System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()

Trust relationship:

([System.DirectoryServices.ActiveDirectory.Forest]::GetForest((New-Object System.DirectoryServices.ActiveDirectory.DirectoryContext('Forest', 'forest-of-interest.local')))).GetAllTrustRelationships()