The first Public Folder Database in Exchange 2010 gets assigned a random name and installed at the default location. This may be okay for many customers, but not most. So a bit of tidy up work is required. Fortunately Captain Powershell has it under control.
Get-PublicFolderDatabase -Server SERVER1 | Set-PublicFolderDatabase -Name PFDB01 ; Dismount-Database PFDB01 -Confirm:$false ; Move-DatabasePath PFDB01 -edbFilePath M:\ExchangeData\PFDB01\PFDB01.edb -LogFolderPath L:\ExchangeData\PFDB01LOGS -Confirm:$false ; Mount-DataBase PFDB01
(where SERVER1 is the name of the first mailbox server built into the environment)
Here’s my job log:
[PS] C:\Windows\system32>Get-PublicFolderDatabase
Name Server
---- ------
Public Folder Database 1399... SERVER1
[PS] C:\Windows\system32>Get-PublicFolderDatabase -Server SERVER1 | Set-PublicFolderDatabase -Name PFDB01 ; Dismount-Database PFDB01 -Confirm:$false ; Move-DatabasePath PFDB01 -edbFilePath M:\ExchangeData\PFDB01\PFDB01.edb -LogFolderPath L:\ExchangeData\PFDB01LOGS -Confirm:$false; Mount-DataBase PFDB01
[PS] C:\Windows\system32>Get-PublicFolderDatabase
Name Server
---- ------
PFDB01 SERVER1
I think the only way to improve on it would be to tidy up the empty folder left behind, but I’m not going to lose sleep over that.