Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

Updated Wiki: PowerShell

$
0
0

PowerShell Examples

As a .NET library, all of the Task Scheduler Managed Wrapper can be used from within PowerShell. You simply need to load the assembly and then use the interop methods, like New-Object, to interact with the classes.

Create a task

[Reflection.Assembly]::LoadFile("C:\CodeShare\Microsoft.Win32.TaskScheduler.dll")
$dt= New-Object Microsoft.Win32.TaskScheduler.DailyTrigger -ArgumentList 2
$ea= New-Object Microsoft.Win32.TaskScheduler.ExecAction -ArgumentList "cmd"[Microsoft.Win32.TaskScheduler.TaskService]::Instance.AddTask("Test", $dt, $ea)

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>