cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ntoupin
Engaged Sweeper
If you are receiving the either of the errors:
Errors found during scanning
Cannot connect to DCOM port 135 : Firewalled?
The RPC server is unavailable 0x800706BA


These actions will help fix them by using some steps from the troubleshooting guide.

Please ensure you follow the steps to creating the files for the action to use.




Step 1:
Go to your server's Actions folder and create a new file (text file works fine (notepad), you are going to change the extension after when saving) and copy and paste the following into the text file and save it as "fw.cmd"

call netsh firewall set service RemoteAdmin enable
call netsh firewall add portopening protocol=tcp port=135 name=DCOM_TCP135
call netsh firewall add allowedprogram program=%windir%\system32\wbem\unsecapp.exe name=WMI
call netsh firewall add allowedprogram program=%windir%\system32\dllhost.exe name=Dllhost


Step 2:
Create another new file (textfile in notepad) and again copy and paste the following into it, saving this one as "wmifix.cmd"


@ECHO OFF

NET STOP SharedAccess

NET STOP winmgmt

CD %WINDIR%\System32\Wbem\Repository
DEL /F /Q /S %WINDIR%\System32\Wbem\Repository\*.*
CD %WINDIR%\system32\wbem

REGSVR32 /s %WINDIR%\system32\scecli.dll
REGSVR32 /s %WINDIR%\system32\userenv.dll

MOFCOMP cimwin32.mof
MOFCOMP cimwin32.mfl
MOFCOMP rsop.mof
MOFCOMP rsop.mfl
FOR /f %%s IN ('DIR /b /s *.dll') DO REGSVR32 /s %%s
FOR /f %%s IN ('DIR /b *.mof') DO MOFCOMP %%s
FOR /f %%s IN ('DIR /b *.mfl') DO MOFCOMP %%s
MOFCOMP exwmi.mof
MOFCOMP -n:root\cimv2\applications\exchange wbemcons.mof
MOFCOMP -n:root\cimv2\applications\exchange smtpcons.mof
MOFCOMP exmgmt.mof

rundll32 wbemupgd, UpgradeRepository


NET STOP Cryptsvc
DEL /F /Q /S %WINDIR%\System32\catroot2\*.*
DEL /F /Q C:\WINDOWS\security\logs\*.log
NET START Cryptsvc


msiexec /unregister
msiexec /regserver
REGSVR32 /s msi.dll

NET START winmgmt
NET START SharedAccess



(Both of the .cmd's information can be found from lansweeper's troubleshooting guide http://www.lansweeper.com/kb/troubleshooting-guide.aspx)




Once you have the two .cmd files in your Actions folder the next thing you need is Psexec.exe (this can be found HERE (you only need the psexec.exe from the zip).

Once downloaded and extracted copy the psexec.exe into your Actions folder.

Next you can add the two following custom actions:


cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f {actionpath}fw.cmd



cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f {actionpath}wmifix.cmd



2 REPLIES 2
Hemoco
Lansweeper Alumni
The problem is:

if the computer's firewall is on you won't be able to run these scripts remotely (because of the firewall)
faccount
Engaged Sweeper
Hi,

Thank you for the great post, it works if i run the cmd's from the physical computer by walking over to it but if i try and do it using the lansweeper web console i get one of two error messages: 'The network path was not found' or 'Access denied'.

Please let me know what to do.

Thanks.

ntoupin wrote:
If you are receiving the either of the errors:
Errors found during scanning
Cannot connect to DCOM port 135 : Firewalled?
The RPC server is unavailable 0x800706BA


These actions will help fix them by using some steps from the troubleshooting guide.

Please ensure you follow the steps to creating the files for the action to use.




Step 1:
Go to your server's Actions folder and create a new file (text file works fine (notepad), you are going to change the extension after when saving) and copy and paste the following into the text file and save it as "fw.cmd"

call netsh firewall set service RemoteAdmin enable
call netsh firewall add portopening protocol=tcp port=135 name=DCOM_TCP135
call netsh firewall add allowedprogram program=%windir%\system32\wbem\unsecapp.exe name=WMI
call netsh firewall add allowedprogram program=%windir%\system32\dllhost.exe name=Dllhost


Step 2:
Create another new file (textfile in notepad) and again copy and paste the following into it, saving this one as "wmifix.cmd"


@ECHO OFF

NET STOP SharedAccess

NET STOP winmgmt

CD %WINDIR%\System32\Wbem\Repository
DEL /F /Q /S %WINDIR%\System32\Wbem\Repository\*.*
CD %WINDIR%\system32\wbem

REGSVR32 /s %WINDIR%\system32\scecli.dll
REGSVR32 /s %WINDIR%\system32\userenv.dll

MOFCOMP cimwin32.mof
MOFCOMP cimwin32.mfl
MOFCOMP rsop.mof
MOFCOMP rsop.mfl
FOR /f %%s IN ('DIR /b /s *.dll') DO REGSVR32 /s %%s
FOR /f %%s IN ('DIR /b *.mof') DO MOFCOMP %%s
FOR /f %%s IN ('DIR /b *.mfl') DO MOFCOMP %%s
MOFCOMP exwmi.mof
MOFCOMP -n:root\cimv2\applications\exchange wbemcons.mof
MOFCOMP -n:root\cimv2\applications\exchange smtpcons.mof
MOFCOMP exmgmt.mof

rundll32 wbemupgd, UpgradeRepository


NET STOP Cryptsvc
DEL /F /Q /S %WINDIR%\System32\catroot2\*.*
DEL /F /Q C:\WINDOWS\security\logs\*.log
NET START Cryptsvc


msiexec /unregister
msiexec /regserver
REGSVR32 /s msi.dll

NET START winmgmt
NET START SharedAccess



(Both of the .cmd's information can be found from lansweeper's troubleshooting guide http://www.lansweeper.com/kb/troubleshooting-guide.aspx)




Once you have the two .cmd files in your Actions folder the next thing you need is Psexec.exe (this can be found HERE (you only need the psexec.exe from the zip).

Once downloaded and extracted copy the psexec.exe into your Actions folder.

Next you can add the two following custom actions:


cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f {actionpath}fw.cmd



cmd.exe /k {actionpath}psexec.exe \\{computer} -c -f {actionpath}wmifix.cmd