Syntax
Move-DatabasePath -Identity DatabaseIdentity
[-ConfigurationOnly <$true | $false>] [-EdbFilePath EdbFilePath
]
[-DomainController DCName
] [-Force <$true | $false>]
[-LogFolderPath FolderPath
]
Usage
Move-DatabasePath -Identity "Sales Projects"
-EdbFilePath "K:\Databases\SalesProjects.edb"
Renaming Databases
To rename a database, follow these steps:
-
In the Exchange Management Console, right-click the database, and then select Properties.
-
In the Properties dialog box, type the new name for the database. Click OK.
Note
All objects in Active Directory are located by a unique identifier.
This identifier uses the directory namespace and works through each
element in the directory hierarchy to a particular object. When you
change the name of a database, you change the namespace for all the
objects in the database.
In the Exchange Management Shell, you can rename databases using the –Name parameter of the Set-MailboxDatabase and Set-PublicFolderDatabase cmdlets. Example 6 provides the syntax and usage.
Example 6. Renaming a database
Syntax
Set-MailboxDatabase -Identity DatabaseIdentity
-Name NewName
Set-PublicFolderDatabase -Identity DatabaseIdentity
-Name NewName
Usage
Set-MailboxDatabase -Identity "Eng DB"
-Name "Engineering Mail Database"
Before deleting
a mailbox database, you must delete or move the mailboxes it contains.
After you do this, you can delete the database. With public folders, public folder data is replicated between or among
the public folder databases automatically once you set up replicas. As
long as all data has been replicated and you've verified this, you can
remove a public folder database from a Mailbox server without losing
data. However, because each Mailbox server can have only one public
folder database, you need to create a new public folder database if you
want to ensure that users with mailboxes on the server can access the
local public folder replica.
After you've moved items that you might need, you can delete the database by completing the following steps:
-
In the Exchange Management Console, right-click the database you want to delete, and then select Remove from the shortcut menu.
-
When prompted, confirm the action by clicking Yes.
-
After removing the database, you need to delete any database and transaction log files from the server.
In the Exchange Management Shell, you can delete databases by using
the Remove-MailboxDatabase and Remove-PublicFolderDatabase cmdlets. Example 7 provides the syntax and usage.
Example 7. Removing databases
Syntax
Remove-MailboxDatabase -Identity DatabaseIdentity
[-DomainController FullyQualifiedName
]
Remove-PublicFolderDatabase -Identity DatabaseIdentity
[-DomainController FullyQualifiedName
]
[-RemoveLastAllowed <$true | $false>]
Usage
Remove-MailboxDatabase -Identity "Eng DB"