We help IT Professionals succeed at work.

Microsoft Exchange Management Shell script error - SBS2008

nigelbeatson
nigelbeatson asked
on
534 Views
Last Modified: 2013-02-02
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?
Comment
Watch Question

Solutions Architect
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Well, your rank as a genius is very much deserved! That worked a treat! What did you change?
Many thanks.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.