DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 317142 - Last Review: November 1, 2006 - Revision: 1.2

This article was previously published under Q317142

On This Page

SUMMARY

This article explains how to change a computer's service account password by using a batch file.

In some cases, you may want to change a service account remotely or for numerous computers. You can use the sc.exe command to create a batch file for this purpose. Sc.exe is a command-line utility that allows you to communicate with the Windows NT Service Controller and services. This utility is available on the Microsoft Windows NT Server 4.0 Resource Kit CD-ROM.

MORE INFORMATION

Change the Password on a Service Account

The following is an example of how you can use the sc.exe command-line utility in a batch file to change a service account password
net view | find "\" >server.txt

for /F %%i in (server.txt) do sc %%i config service_name password= new_password
				
where service_name is the name of the service account and new_password is the new password that you want to assign to the service account.

For information about how to obtain the Windows NT Server 4.0 Resource Kit (and the Windows NT Workstation 4.0 Resource Guide), browse to the following Microsoft Web site:
http://www.microsoft.com/technet/archive/downloads/winnt.mspx (http://www.microsoft.com/technet/archive/downloads/winnt.mspx)

APPLIES TO
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
Keywords: 
kbinfo ocsso KB317142
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support