Server service

Published January 23, 2005

Reading time: 0 minutes.

The Windows Server service allows a computer to share printers and files with other computers. It’s a resource hog that you may want to shut down and disable if you don’t plan to share files or printers with others.

However, you may want to enable this service temporarily to share some files. Here’s a quick script I wrote to let you do just that.

@echo off
sc.exe config lanmanserver start= auto
sc.exe start lanmanserver 
ipconfig
echo Server service is ready to go.
pause
sc.exe stop lanmanserver 
sc.exe config lanmanserver start= disabled


I don't have comments enabled on this site, but I'd love to talk with you about this article on Twitter. Follow me and say hi.