Remote Execution of Scheduled Tasks...
-
- Forum Administrator
- Posts: 22136
- Joined: 14 Jun 2004, 02:00
- Processor: Ryzen 1700K
- Motherboard: Asus X370
- Graphics card: Asus 1060 Strix
- Memory: 16GB RAM
- Location: Where Google says
Remote Execution of Scheduled Tasks...
Greetings All,
Not sure how to word this so bear with me .
Here at our company we use a Windows PC to do all our announcements eg: for when its tea&lunch, delivery cycles and quite a few other announcements. Now we have been tasked to change quite a few of these announcements and have the ability for the Receiving department to change the announcements based on the overtime requirement. So the idea is to have three batch files: normal, 1HR overtime & 2HR overtime and for the member in another office in the Factory to be able to execute these batch files that will change the Scheduled Tasks on our announcement box. So the question is, can this be done? What am I looking at when doing this?
Thanks for any help, and if any, different suggestions .
Not sure how to word this so bear with me .
Here at our company we use a Windows PC to do all our announcements eg: for when its tea&lunch, delivery cycles and quite a few other announcements. Now we have been tasked to change quite a few of these announcements and have the ability for the Receiving department to change the announcements based on the overtime requirement. So the idea is to have three batch files: normal, 1HR overtime & 2HR overtime and for the member in another office in the Factory to be able to execute these batch files that will change the Scheduled Tasks on our announcement box. So the question is, can this be done? What am I looking at when doing this?
Thanks for any help, and if any, different suggestions .
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
- rustypup
- Registered User
- Posts: 8872
- Joined: 13 Dec 2004, 02:00
- Location: nullus pixius demonica
- Contact:
Re: Remote Execution of Scheduled Tasks...
there's this handy little tool called stuxnet....
what, exactly, do these tasks achieve? (i'm guessing change some form of displayed message elsewhere?)
<edit to elaborate>
are the tasks simply feeding into another event system or changing the messages directly
</edit>
what, exactly, do these tasks achieve? (i'm guessing change some form of displayed message elsewhere?)
<edit to elaborate>
are the tasks simply feeding into another event system or changing the messages directly
</edit>
Most people would sooner die than think; in fact, they do so - Bertrand Russel
-
- Forum Administrator
- Posts: 22136
- Joined: 14 Jun 2004, 02:00
- Processor: Ryzen 1700K
- Motherboard: Asus X370
- Graphics card: Asus 1060 Strix
- Memory: 16GB RAM
- Location: Where Google says
Re: Remote Execution of Scheduled Tasks...
The tasks play audio files that are launched at timed intervals.
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
- rustypup
- Registered User
- Posts: 8872
- Joined: 13 Dec 2004, 02:00
- Location: nullus pixius demonica
- Contact:
Re: Remote Execution of Scheduled Tasks...
2003 included a simple "remote" command which would allow you to manipulate a running batch file but it was.. dinky and fiddly and not very secure...
schtasks is probably what you're after though...
schtasks is probably what you're after though...
Most people would sooner die than think; in fact, they do so - Bertrand Russel
-
- Forum Administrator
- Posts: 22136
- Joined: 14 Jun 2004, 02:00
- Processor: Ryzen 1700K
- Motherboard: Asus X370
- Graphics card: Asus 1060 Strix
- Memory: 16GB RAM
- Location: Where Google says
Re: Remote Execution of Scheduled Tasks...
Thanks will look into it .
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
-
- Forum Administrator
- Posts: 22136
- Joined: 14 Jun 2004, 02:00
- Processor: Ryzen 1700K
- Motherboard: Asus X370
- Graphics card: Asus 1060 Strix
- Memory: 16GB RAM
- Location: Where Google says
Re: Remote Execution of Scheduled Tasks...
rusty need to pick your juicy brain over this...
From what I have researched you would need to use a combination of winrs & schtasks. So I have setup winrs using this guide: http://blog.hviidnet.com/category/code- ... line-tips/ . The system I am running this all on is a Windows 7 Professional PC so it should work. Near as I can tell my command should go something like this:
However I keep getting "Access Denied" messages. I have disabled the UAC and even tried this: http://social.technet.microsoft.com/For ... 8a67d9316/ but still cant get any further. Can you see anything wrong in my command?
From what I have researched you would need to use a combination of winrs & schtasks. So I have setup winrs using this guide: http://blog.hviidnet.com/category/code- ... line-tips/ . The system I am running this all on is a Windows 7 Professional PC so it should work. Near as I can tell my command should go something like this:
Code: Select all
winrs -r:<insert PC name> schtasks.exe /Change /S "<specify the system>" /U "<user>" /P "<password>"]]]] /TN <task name> /ENABLE
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
-
- Forum Administrator
- Posts: 22136
- Joined: 14 Jun 2004, 02:00
- Processor: Ryzen 1700K
- Motherboard: Asus X370
- Graphics card: Asus 1060 Strix
- Memory: 16GB RAM
- Location: Where Google says
Re: Remote Execution of Scheduled Tasks...
Seem to have worked out why the execution is failing, my account is not a domain admin. Making a change in the Group Policy for just that one machine to allow for remote management did not solve the issue either. Need to figure out what level of rights I can get away with without using domain admin, any ideas?
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
- hamin_aus
- Forum Moderator
- Posts: 18363
- Joined: 28 Aug 2003, 02:00
- Processor: Intel i7 3770K
- Motherboard: GA-Z77X-UP4 TH
- Graphics card: Galax GTX1080
- Memory: 32GB G.Skill Ripjaws
- Location: Where beer does flow and men chunder
- Contact:
Re: Remote Execution of Scheduled Tasks...
Use your domain admin accountAnakha56 wrote:Need to figure out what level of rights I can get away with without using domain admin, any ideas?
You could try making the account you want to use a local admin on the remote machine?
-
- Forum Administrator
- Posts: 22136
- Joined: 14 Jun 2004, 02:00
- Processor: Ryzen 1700K
- Motherboard: Asus X370
- Graphics card: Asus 1060 Strix
- Memory: 16GB RAM
- Location: Where Google says
Re: Remote Execution of Scheduled Tasks...
Local admin does not work as well.
Today will be about making my account be a member of just about everything and seeing what works and what does not work. Going to be a long day...
Today will be about making my account be a member of just about everything and seeing what works and what does not work. Going to be a long day...
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
- hamin_aus
- Forum Moderator
- Posts: 18363
- Joined: 28 Aug 2003, 02:00
- Processor: Intel i7 3770K
- Motherboard: GA-Z77X-UP4 TH
- Graphics card: Galax GTX1080
- Memory: 32GB G.Skill Ripjaws
- Location: Where beer does flow and men chunder
- Contact:
Re: Remote Execution of Scheduled Tasks...
Anakha56 wrote:Local admin does not work as well
-
- Forum Administrator
- Posts: 22136
- Joined: 14 Jun 2004, 02:00
- Processor: Ryzen 1700K
- Motherboard: Asus X370
- Graphics card: Asus 1060 Strix
- Memory: 16GB RAM
- Location: Where Google says
Re: Remote Execution of Scheduled Tasks...
I am making slight headway. Some Googling revealed this nugget:
http://social.technet.microsoft.com/For ... 683678a2f/
http://social.technet.microsoft.com/For ... 683678a2f/
I am hoping that this will work with winrs so I dont have to touch powershell but I am currently busy on something else right now. Will only find out if it works at about 10am...How does your command look like? Do you use winrm, winrs, or PowerShell Remoting?
The non-admin user needs to either be added to the default SDDL (winrm\Config\Service\RootSDDL), or to the SDDL for the resource URI in question. The SDDL for that resource URI is stored as a part of the plugin-specific configuration (e.g. Microsoft.PowerShell plugin).
Set-PSSessionConfiguration Microsoft.Powershell -ShowSecurityDescriptorUI command is modifying the SDDL for Microsoft.PowerShell plugin, but not the RootSDDL.
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
-
- Forum Administrator
- Posts: 22136
- Joined: 14 Jun 2004, 02:00
- Processor: Ryzen 1700K
- Motherboard: Asus X370
- Graphics card: Asus 1060 Strix
- Memory: 16GB RAM
- Location: Where Google says
Re: Remote Execution of Scheduled Tasks...
My apologies hamin! I misread your post completely, I owe you a beer or 5 . Adding the user to the local admin group solves the issue, going to try demote the account to Power User and see if that still works. Also needed to change my command structure since my one kept on returning the error:jamin_za wrote:Use your domain admin accountAnakha56 wrote:Need to figure out what level of rights I can get away with without using domain admin, any ideas?
You could try making the account you want to use a local admin on the remote machine?
Change the command to look like this:ERROR: User credentials are not allowed on the local machine.
Worked. Now to create 6 batch files each containing 12 commands to either disable or enable tasks. Hard part over, tedious part begins...winrs -r:<insert computer name> schtasks.exe /Change /TN "<insert task name>" /Enable /ru ""
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
-
- Forum Administrator
- Posts: 22136
- Joined: 14 Jun 2004, 02:00
- Processor: Ryzen 1700K
- Motherboard: Asus X370
- Graphics card: Asus 1060 Strix
- Memory: 16GB RAM
- Location: Where Google says
Re: Remote Execution of Scheduled Tasks...
Bugger new problem... :/
When running the batch file I get this error now:
*edit*
Fixed, added a & at the end of each line and its running .
When running the batch file I get this error now:
Anyone know of a way to add a pause in between each line so it treats each command as a separate one?ERROR: Invalid syntax. '/Change' option is not allowed more than '1' time(s).
*edit*
Fixed, added a & at the end of each line and its running .
JUSTICE, n A commodity which is a more or less adulterated condition the State sells to the citizen as a reward for his allegiance, taxes and personal service.
-
- Registered Pervert
- Posts: 6879
- Joined: 30 Jul 2004, 02:00
- Processor: Intel i7 4790k
- Motherboard: MSI Z97 Gaming 7
- Graphics card: MSI GTX780Ti Gaming
- Memory: G.Skill Sniper 1866mhz 16GB
- Location: The Greater Unknown
- Contact:
Re: Remote Execution of Scheduled Tasks...
So remote execution has nothing to do with killing someone in china from sa?
/walks away disappointed
/walks away disappointed