1) Launch Exchange command shell
2) Type the below command, amending, database name, server name etc as required and press enter.
Get-MailboxDatabase -Identity “<server name>\<storage group name>\<database name>” | Format-Table Name, GUID
3) If you experience issues with the above command such as error domain controller not found, another way to locate the guid is by typing the below command. This will list all mailstores along with the guid.
Get-MailboxDatabase | Format-List