1
vote
3answers
217 views

How can I disable a scheduled task using Powershell?

I have a web application that runs on Windows Server 2008 R2, which has a large number of scheduled tasks which take care of all the backend stuff. When I do a software deployment which touches the ...
0
votes
1answer
277 views

Strange behavior from Invoke-WebRequest in scheduled task

I'm running a PowerShell script that posts data to an internal webserver over HTTPS. The SSL certificate is not valid. I'm using [System.Net.ServicePointManager]::ServerCertificateValidationCallback ...
0
votes
0answers
127 views

Parameterizing powershell parameters in scheduled tasks

I have a bunch of powershell scripts that are kicked off via scheduled tasks at various times. The script are run multiple times with different arguments. Also admins unfamiliar with scripting needed ...
0
votes
0answers
54 views

Scheduled task deleting itself

I am using PowerShell to create scheduled tasks on my local machine, the Scheduled Task runs a PowerShell script to PowerShell remote into a server and copy files. When I run the Scheduled task using ...
0
votes
0answers
70 views

Windows Task Scheduler Option “Do not start a new instance” runs a second instance of my script, known bug?

I am using a small powershell script which checks the ram and disk usage , just some metrics. This script sleeps for 15 seconds and then runs again. Only 1 script is triggered and this should kept ...
3
votes
1answer
612 views

Scheduled Task to run 32-bit PowerShell Script with 3 Arguments

TL;DR Version I need to run a 32-bit PowerShell script that takes three arguments as a scheduled task in Windows Server 2008 R2. The script starts a FileSystemWatcher, so I need to keep it alive so ...
2
votes
4answers
129 views

Windows client powershell reporting

I'm working on trying to find a way to get our windows machines to report to a webpage with information about it's MAC address, computer name, currently logged in user, and ip address. I wrote a ...
1
vote
1answer
85 views

Schedule Task 2008 R2 - cmd line requires unix utc time - how to get it dynamically?

These forums are great, and I'm hoping to get some help with a headache I have on doing a process manually that should be easier to automate than I've found it to be. I have a command line tool from ...
2
votes
1answer
133 views

MSSQL Server 2012 Scheduled PowerShell Job fails

I have a simple PowerShell script that runs fine from the console (PSVersion 2.0). $psftpPath = "C:\Program Files (x86)\PuTTY\psftp.exe" $sftpHost = "foo.baa.com" $userName = "myusername" ...
1
vote
1answer
777 views

SchTasks giving out error (0x1) on Windows 2008 R2

i have a powershell script which creates scheduled tasks as a part of automation process and my syntax is following; schtasks /create /s ServerName /u $username /p $password /ru $username /rp ...
0
votes
1answer
446 views

DPM 2012 running powershell script in task scheduler

I'm having a problem running a custom PS script I created to attach systems into the console. My PS script works when i'm running it interactively in the DPM Management Shell. I was referencing this ...
1
vote
1answer
198 views

Running SSH command within a scheduled task

I have simple powershell script which gets the offset of a Ubuntu server with the time of the NTP server. The command I run is $result = ssh -i C:\temp\privatekey domain\username@servername ...
1
vote
1answer
337 views

Access Denied when creating a scheduled task with powershell and the com schedule.service object

I have a powershell script that creates a scheduled task using a call to RegisterTask via the Schedule.Service com object. Essentially: $ts = new-object -com Schedule.Service $ts.Connect() ...
0
votes
6answers
818 views

Can I schedule machine boot via Dell iDRAC?

I have a Dell PowerEdge R410 with iDRAC 6 configured and accessible. I know we'll be losing power at some point this weekend and I have a time that I would like to power on the machine again. From ...
4
votes
1answer
1k views

Why do weekly tasks created via PowerShell using a different user fail with error 0x41306

We have some scripts that create scheduled jobs using PowerShell as part of our application. When testing them recently, I noticed that some of them always failed immediately, and no output is ever ...
2
votes
2answers
2k views

Powershell script not completing what it should do when scheduled with Windows Taskscheduler

I found a script that can delete files over X days old and changed it a bit so that i will scan different network folders to see if there are files that are older than X days. Now when i run the ...
2
votes
2answers
537 views

Exchange PowerShell in a Scheduled Task runs forever

I have a couple of Exchange 2010 PowerShell scripts that I'd like to run as Scheduled Tasks. If I launch PowerShell using "Run as different user" I can run the scripts and they execute correctly. If ...
1
vote
3answers
1k views

Why does powershell -command “Restart-Service Tomcat6” fail when run from a Scheduled Task?

I get the following error in the Scheduled Task history when I try to run a task: Task Scheduler successfully completed task "\Restart Tomcat" , instance "{264b4620-5f3b-6c5f-a6cb-1625a7fa57de}" , ...
2
votes
2answers
701 views

My powershell script wont save a file when run using Task Scheduler, do I need to specify a specific argument?

I have a script that downloads a temporary Excel file, copies parts of it to a new file, and saves it to a specific location on the network. The problem I'm having is that the new file is never ...
2
votes
1answer
339 views

How does the “Last Result” column of Scheduled Tasks in Windows Server 2003 get set from a process or script?

The Last Result column of the Scheduled Tasks Window on Windows Server 2003, displays the result of the execution of the .exe, .vbs, .ps1, .bat, .cmd, etc... that has been run at the scheduled time. ...
0
votes
1answer
425 views

Powershell Script Scheduled Task Stopped Running (Could not Start)

I'm running a scheduled task (for Powershell Script) on Windows 2003 Server. I believe the script works fine. The task is scheduled to run every 10 minutes from 7:00am to 11:50pm everyday. However, it ...
1
vote
2answers
402 views

pass paramter to Schtasks

how can i run schtasks from command line such that i can pass in parameters during run time. i have a batch job which expects parameters during run-time that is created in scheduled task. i cannot ...
0
votes
2answers
2k views

Powershell script works from command line, not from task scheduler. Why?

This is driving me crazy! My powershell script works from the command line, but not from task scheduler. This is Powershell v1 on Server 2008 R2 Enterprise. From the command line, I type: c:\> ...
0
votes
1answer
512 views

Use Powershell to read XML comments

So I'm working on a way to use Powershell to get a list of scheduled tasks. Through my research, I determined that the only way to get "most" tasks is to use SCHTASKS. This command does allow for XML ...
2
votes
3answers
692 views

Rename file in folder whenever it's created?

I need to find a way to automatically rename all files that are created within a specific directory on a Windows 2008r2 file server. This needs to be done more or less instantanously, so I can't have ...
0
votes
1answer
146 views

Remote EMS Script as Scheduled Task Without Credentials

I have an Exchange script that I want to schedule to run once a month. In our environment we have a server which runs all scripts and scheduled tasks, so for policy reasons I need to run this script ...
1
vote
2answers
1k views

Windows 2008 R2 Scheduled Task Not Running With Admin Privileges even if granted?

I have a scheduled task that is running as USER. I have checked the box "Run with highest privileges" in the scheduled task properties. The task is a powershell script that, among other things, ...
0
votes
2answers
3k views

When ran as a scheduled task, cannot save an Excel workbook when using Excel.Application COM object in PowerShell

I'm having an issue where I've automated creating an Excel.Application COM object, add some data into a workbook, and then saving the document as an xlsx. This works fine if: I'm already in ...
2
votes
2answers
3k views

How to run powershell script as Logon/logoff script on Windows 2003?

I've installed PowerShell Version 1.0 on my Windows 2003 server. How do I run a PowerShell script during logon or logoff event? I tried this through Local Computer policy>User ...
6
votes
4answers
4k views

Query schtasks using Powershell

On a Windows7 machine I am trying I can run a query to view all the scheduled tasks using schtasks.exe This is fine but I would also like to filter the result set using something like schtasks ...