Question Locked

Running Segments of a batch file under an admin

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

What I'm looking for is how I can set parts of a batch file to run as say my account the admin....

In my script I have "net time \\server /set /yes" and that will sync the time with the network server but when logon to a restricted user they can run that part it gives them an error can I set that part to run as an admin account for certain parts and if so how can I do that?

3 replies

by seanferd

Runas probably won't provide the solution you are looking for.

What about delegating the right to perform that operation to the group the limited users belong to? Can you do that with the OS you are using? Or, can you run the script from from the server side with domain admin privileges?

by markp24

Hi , you try running the script as part of the GPO? or depending on the OS the time server service?

This discussion is closed to new replies.