Created
January 5, 2015 08:03
-
-
Save kan6004/7b460021090bbd458036 to your computer and use it in GitHub Desktop.
2015.1.5 samplecode4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$taskname = "test" | |
$execuser = "<domain>\<execute user>" | |
$execpass = "execute user password" | |
Invoke-Command -Session $s -Scriptblock{ | |
Register-ScheduledTask -TaskPath "\" -TaskName $args[0] -User $args[1] -Password $args[2] -RunLevel Highest -Trigger $trigger -Action $action | |
} -ArgumentList $taskname, $execuser, $execpass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment