Question : Microsoft Exchange Management Shell script error - SBS2008

We have a single SBS2008 which were are trying to resolve a Microsoft Backup problem on, and have been advised to run the following script with the Microsoft Management Shell.  The file is called enable.PS1 and is stored in the c:\ location.

The script is :-


$WsbBinPath="c:\program files\microsoft\exchange server\bin\wsbexchange.exe"

if ((get-service wsbexchange* | where {$_.name -eq "wsbexchange"}))
{
if ((get-service wsbexchange).Status -eq "Running")
  {
  sc stop 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  
"010004806000000070000000000000001400000002004c0003000000000014001f000000010100000000000512000000000018001f0000000102000000000005200
00000200200000000180003000000010200000000000520000000270200000102000000000005200000002002000001020000000000052000000020020000" /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."

To run this we type c:\enable.PS1

Each time we run it, we get the foloowing error :-

You must provide a value expression on the right-hand side of the "/" operator. At C:\enable.PS1:18 char:129 + 00000200200000000180003000000010200000000000520000000270200000102000000000005200000002002000001020000000000052000000020020000" /f <<<<<<<<

Can anyone assist in explaining what we need to do to get this to complete?

Answer : Microsoft Exchange Management Shell script error - SBS2008

I suspect you might have something wrong with the CRLF try this instead
Random Solutions  
 
programming4us programming4us