MP Backup
Here is a script that I wrote last night to demonstrate how you can implement a simple MP backup process. The goal is to allow you to backup unsealed MPs so that if you make a mistake you can go back to the good copy. You can also schedule this script to run on a daily basis using Task Scheduler.
Here is how you can run the script from the command line:
powershell.exe C:\BackupMPs.ps1 -rmsName:'rms.contoso.com' -folderName:'c:\Backups'
Comments
- Anonymous
May 07, 2008
Hi,Great script, but I have one issue. It seems if I try to run it on a computer other than the actual RMS, it fails with the message:Add-PSSnapin : No Windows PowerShell Snap-ins are available for version 1.At D:BackupMPs.ps1:10 char:13add-pssnapin <<<< "Microsoft.EnterpriseManagement.OperationsManager.ClieSet-Location : Cannot find a provider with name 'OperationsManagerMonitorinAt D:BackupMPs.ps1:11 char:13Set-Location <<<< "OperationsManagerMonitoring::";The term 'New-ManagementGroupConnection' is not recognized as a cmdlet, funn, operable program, or script file. Verify the term and try again.At D:BackupMPs.ps1:12 char:40$mgConn = New-ManagementGroupConnection <<<< -connectionString:$rmsName;The non-RMS server I am trying this on is the Datawarehouse server, which has the capacity to hold all my backup files, ie. sql db backups.Any ideas?Thanks,Sven - Anonymous
June 04, 2008
The script is written such that it will run on computers other than the RMS. However, the computer on which you are running the script needs to have the Console and the OpsMgr Command Shell installed. - Anonymous
July 12, 2008
Check out Boris Yanushpolsky's blog ( http://blogs.msdn.com/boris_yanushpolsky ). Boris is an SCOM - Anonymous
February 17, 2009
The comment has been removed