Updated: January 22, 2009
Applies To: Virtual Machine Manager 2008, Virtual Machine Manager 2008 R2, Virtual Machine Manager 2008 R2 SP1
The following script backs up the System Center Virtual Machine Manager (VMM) database to a local drive. You can back up the database to a network share by substituting the Universal Naming Convention (UNC) path for the drive path in the script. In either case, the folder you specify must not be a root folder, and the account under which Microsoft SQL Server is running must have write access to the folder. For more information about how to back up your VMM database using a script, see How to Back Up the VMM Database Using a Script. For information about how to restore a VMM database, see Backing Up and Restoring the VMM Database (http://go.microsoft.com/fwlink/?LinkId=162661).
# Filename: BackupVMMDatabase.ps1 # Description: Backs up the VMM database. # Specify the VMM server and domain. $VMMServer = Get-VMMServer -ComputerName "VMMServer1.Contoso.com" # Specify the backup folder path and name. To back # up a database to a network share, specify the UNC # path, for example, \\SQLServer01\VMMBackups. Backup-VMMServer –Path "C:\VMMBackups" -VMMServer $VMMServer