Windows 2003 Scheduled Task Cmdlet (v 1.0)

Does anyone know about the powershell cmdlet to automate the task scheduler in XP / 2003? If you have ever tried to work with schtasks, you know that it is rather painful.

+3
source share
6 answers

Well, Pablo aroused my interest in saying that the scheduler is available through COM.

In PowerShell, you can do this:

$svc = new-object -com Schedule.Service

... and this gives you an idea of ​​the task scheduler. You can see which members it has:

$svc | get-member

One of its methods is NewTask, so I started there.

Edit: Another information here . This is an example of VBScript, but it will give you the gist.

+3
source

PowerShell , SCHTASKS XP.

Wikipedia, 2.0 (Vista Server 2008) COM.

+1

- ( ), , , , .

+1

@(EBGreen) Win32_ScheduledJob .

Windows 2000 Windows NT 4.0: " " , WMI. , , WMI.

, com- Schedule.Service, 2003

, script, PowerShell, , , API? ! Windows Vista .

+1

"" PowerShell, powershell.exe , "at", .

0

@slipsec: I don't have access to server 2003 to try, but googling "server 2003" SCHTASKS has links related to questions about this. Did you miss a team? According to Matt, you can also use AT, but in this case you do not have access to scheduled tasks through the control panel, only with the AT command.

-1
source

Source: https://habr.com/ru/post/1696582/


All Articles