I'd like to write some scripts (run on my linux computer) to help automatically restart some windows services.
While I've found many answers that suggest using net rpc service, they all involve specifying my password on the command line (-U user%password). Doing that isn't very secure, but if I don't, net will prompt for a password on every command, thus breaking the scriptability.
I don't mind if I have to enter my password once, but I have several commands to run against several servers, so can't enter it for every invocation.
I found a --stdin flag, but can't seem to get it to work.
Is there some bash magic or net invocation I can do to do this?
برچسب:
نویسنده: استخدام کار