a guest Jun 13th, 2018 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- $A = New-ScheduledTaskAction -Execute "Taskmgr.exe" -Argument '/S'
- $T = New-ScheduledTaskTrigger -AtLogon
- $P = New-ScheduledTaskPrincipal "Contoso\Administrator"
- $S = New-ScheduledTaskSettingsSet
- $D = New-ScheduledTask -Action $A -Principal $P -Trigger $T -Settings $S
- Register-ScheduledTask T1 -InputObject $D
RAW Paste Data