![]() ![]() PS C:\> Register-ScheduledTask T1 -InputObject $task ![]() PS C:\> $task = New-ScheduledTask -Action $action -Principal $principal -Trigger $trigger -Settings $settings PS C:\> $settings = New-ScheduledTaskSettingsSet PS C:\> $principal = "Contoso\Administrator" PS C:\> $trigger = New-ScheduledTaskTrigger -AtLogon Examples Example 1: Define a scheduled task and register it at a later time PS C:\> $action = New-ScheduledTaskAction -Execute "Taskmgr.exe" ![]() bat), command files (.cmd), or any properly registered file type. You can register a task to run any of the following application or file types: Win32 applications, Win16 applications, OS/2 applications, MS-DOS applications, batch files (. New-ScheduledTask does not automatically register the object with the Task Scheduler service. The New-ScheduledTask cmdlet creates an object that contains the definition of a scheduled task. In this article Syntax New-Scheduled Task ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |