0

I am in dire need of some scripting help. Due to an unfortunate mistake I made when trying to deploy PowerShell Remoting using GPO in our organization, the WinRM service on our client workstations (correctly) logs on using the "Network Service" local account , but unfortunately it uses a password (which should be blank by default).

Is there a script that changes the password to blank on the (WinRM) service?

This is what I would like to achieve on our client workstations

Service name: WinRM

Startup Type: Automatic

This account: Network Service

Password: Blank (No Password) Unfortunately right now it is set to use a password and the service will not start up.

I would like a script that could either be run as a startup script or run as a scheduled task to wipe out the password on the WinRM service on my workstations. I cannot use powershell as WinRM needs to run for PSRemoting. Any help will be appreciated.

zoltan69
  • 21
  • 2
  • 6
  • possible duplicate of [How to change user credentials of windows service from command line?](http://stackoverflow.com/questions/966389/how-to-change-user-credentials-of-windows-service-from-command-line) – Christopher Painter Jan 17 '14 at 19:18

1 Answers1

0

You should be able to use the SC.exe command to remotely reconfigure services.

An example (using an elevated command prompt if applicable) to test connectivity would be:

sc.exe \\SERVERNAME query dhcp

The rest of the options can be found here.

Community
  • 1
  • 1
Christopher Painter
  • 54,556
  • 6
  • 63
  • 100