Created
January 5, 2015 08:03
-
-
Save kan6004/164a483aac70a5bb4ca4 to your computer and use it in GitHub Desktop.
2015.1.5 samplecode3
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
$command = "powershell.exe" | |
$argument = '-command "C:\temp\test.ps1"' | |
Invoke-Command -Session $s -Scriptblock{ | |
$action = $null; | |
$action = New-ScheduledTaskAction -Execute $args[0] -Argument $args[1] | |
} -ArgumentList $command, $argument |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment