Introduction:
You may be in a scenario where you would need to document your Exchange Server before upgrading to a newer version or migrating to a new server machine. This process can be easily done using PowerShell. Let's see how you can document your Exchange Server's configurations.
Documenting Exchange Server configuration using PowerShell
To get details of your Exchange server, you can use the Get-ExchangeServer cmdlet. For example, if you want to know the attributes of a particular Exchange Server, you can use the following script which allows you to search through domains and domain controllers:
- Get-ExchangeServer
- -Domain <Fqdn>
- [-DomainController <Fqdn>]
- [-Status]
- [<CommonParameters>]
Where,
Domain: The fully qualified domain name (FQDN) of the domain where you want to search.
DomainController: The FQDN of the domain controller from which PowerShell will read the data.
Status: Specifies whether to provide additional value to the enquiry.
Alternatively, you can also use this code to search the Exchange server specifically:
- Get-ExchangeServer
- [[-Identity] <ServerIdParameter>]
- [-DomainController <Fqdn>]
- [-Status]
- [<CommonParameters>]
Where,
Identity: Name, GUID, or Distinguished Name of the Exchange Server for which you want to view information.