PowerShellMafia / PowerSploit

PowerSploit - A PowerShell Post-Exploitation Framework
Other
11.96k stars 4.62k forks source link

UserPersistenceOption -> ScheduledTaskAtLogon Fix #270

Closed 0xdeadbeefJERKY closed 1 year ago

0xdeadbeefJERKY commented 7 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.