PowerShellMafia / PowerSploit

PowerSploit - A PowerShell Post-Exploitation Framework
Other
11.77k stars 4.59k forks source link

UserPersistenceOption -> ScheduledTaskAtLogon Fix #270

Closed 0xdeadbeefJERKY closed 11 months ago

0xdeadbeefJERKY commented 6 years ago

Attempting to leverage the Add-Persistence module with the following parameter combination would result in an AmbiguousParameterSet error:

$UserOptions = New-UserPersistenceOption -ScheduledTask -AtLogon

This was due to missing parameter/cmdlet bindings within the New-UserPersistenceOption function as well as missing switch-case logic within the Add-Persistence function.