Start or Stop Workstation service from command line (CMD)

by admin on July 25, 2009

Workstation service enables access to network shares. If this service is not running we can’t access any SMB shares from the machine. We can start the service from services management console(Services.msc). We can start workstation service from command prompt also using the below command. On Vista and Windows 7 you need to run this command from elevated administrator command prompt. Otherwise you will get access denied error like below.

C:\>net start workstation
System error 5 has occurred.
Access is denied.

In case if you get error as in the example below you need to first enable the service on the machine.

C:\Documents and Settings\administrator>net start workstation
System error 1058 has occurred.
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

To Enable workstation service:

sc config lanmanworkstation start= demand

In the above command you can use any of the options {boot, system, auto or demand} to enable the service.

To disable the service you need to run the following command.

sc config lanmanworkstation start= disabled

To stop workstation service:

net stop workstation

{ 4 comments… read them below or add one }

Anonymous August 22, 2010 at 2:12 am

I am getting the error "service name is invalid"
when I run the above command. What could be the issue?

Reply

Techblogger August 22, 2010 at 2:15 am

Then try "net start lanmanworkstation".

Reply

Kyler October 4, 2010 at 5:22 pm

workstation and lanmanworkstation are not configured and are not installed services, what windows option needs to be installed?

Reply

Techblogger October 5, 2010 at 5:19 am

Kyler,
You can install workstation service in the following way.

Run ncpa.cpl from Run window.
Right click on the network connection you are using
Select properties
Under General tab click on install button
Select client and click on add
Select client for microsoft networks
Select OK and close the windows..

Reply

Leave a Comment

HTML tags are not allowed.

Previous post:

Next post: