how to set windows service username and password through commandline

前端 未结 2 970
余生分开走
余生分开走 2020-12-24 01:29

Using sc command we can query, start , stop windows services.
For ex:

sc query \"windows service name\"

The

2条回答
  •  情歌与酒
    2020-12-24 02:09

    In PowerShell, the "sc" command is an alias for the Set-Content cmdlet. You can workaround this using the following syntax:

    sc.exe config Service obj= user password= pass
    

    Specyfying the .exe extension, PowerShell bypasses the alias lookup.

    HTH

提交回复
热议问题