-
Notifications
You must be signed in to change notification settings - Fork 200
PowerShell
David Hall edited this page Jul 5, 2017
·
4 revisions
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.
[Reflection.Assembly](Reflection.Assembly)::LoadFile("C:\CodeShare\Microsoft.Win32.TaskScheduler.dll")
[Microsoft.Win32.TaskScheduler.TaskService](Microsoft.Win32.TaskScheduler.TaskService)::Instance.AddTask("Test",
[Microsoft.Win32.TaskScheduler.QuickTriggerType](Microsoft.Win32.TaskScheduler.QuickTriggerType)::Hourly, "cmd", "/param1")