环境是Windows Server 2008 SP2和Exchange 2007 SP2的环境,无法使用Windows Server Backup备份Exchange 数据库,但是可以备份其他的磁盘。

最后发现系统没有了Microsoft Exchange Server Extension for Windows Server Backup 这个服务,但是在exchange的bin目录有WSBExchange.exe文件。那么怎么恢复这个服务了。

使用之前的脚本 做成一个wbs-install.ps1的文件,在powershell下执行就可以了。如果还是不行,卸载掉windows server backup服务,然后重新安装后,再执行这个脚本

$WsbBinPath="c:\program files\Windows Small Business Server\bin\wsbexchange.exe"

if ((get-service wsbexchange).Status -eq "Running")
 {
stop-service wsbexchange
 }
 sc.exe delete wsbexchange

reg add "HKCR\CLSID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}" /t REG_SZ /d "CExchangeHelper Class" /f
 reg add "HKCR\CLSID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}" /v AppId /t REG_SZ /d "{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}" /f
 reg add "HKCR\CLSID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}\LocalServer32″ /t REG_SZ /d "$WsbBinPath" /f
 reg add "HKCR\APPID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}" /t REG_SZ /d "CExchangeHelper Class" /f
 reg add "HKCR\APPID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}" /v LocalService /t REG_SZ /d "wsbexchange" /f
 reg add "HKCR\APPID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}" /v LaunchPermission /t REG_BINARY /d "010004806000000070000000000000001400000002004c0003000000000014001f000000010100000000000512000000000018001f000000010200000000000520000000200200000000180003000000010200000000000520000000270200000102000000000005200000002002000001020000000000052000000020020000″ /f
 reg add "HKCR\APPID\wsbexchange.exe" /v AppId /t REG_SZ /d "{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}" /f
 reg add "HKLM\Software\Microsoft\windows nt\currentversion\WindowsServerBackup\Application Support\{76fe1ac4-15f7-4bcd-987e-8e1acb462fb7}" /v "Application Identifier" /t REG_SZ /d Exchange /f
 reg add "HKLM\Software\Microsoft\windows nt\currentversion\WindowsServerBackup\Application Support\{76fe1ac4-15f7-4bcd-987e-8e1acb462fb7}" /v CLSID /t REG_SZ /d "{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}" /f
 reg add "HKLM\Software\Microsoft\windows nt\currentversion\WSBAppExchangeHelper" /v AutoMarkDbRecoverable /t REG_DWORD /d 1 /f
 reg add "HKLM\Software\Microsoft\windows nt\currentversion\WSBAppExchangeHelper" /v AutoMountOnPITRecovery /t REG_DWORD /d 1 /f
 sc.exe create wsbexchange binpath= $WsbBinPath type= own start= demand error= ignore obj= LocalSystem DisplayName= "Microsoft Exchange Server Extension for Windows Server Backup"
sc.exe description wsbexchange "Enables Windows Server Backup users to back up and recover application data for Microsoft Exchange Server."