T /Using Mimikatz non-interactively

Hi,

I have a scenario which makes it impossible to use mimikatz interactively. I thought I could just pass instructions as arguments in the command line, e.g.:

.\mimikatz.exe “base64 /out:true” exit

This runs, but the spaces in the argument seem to lead to “base64” and “/out:true” being executed separately. The same thing happens if I try “kerberos::list /export” - “kerberos::list” executes correctly, but “/export” is run completely separately (and obviously fails).

Am I missing something really obvious here? I’ve had a hunt around on Google and struggled to find any examples of commands that involve spaces.

Thanks

I found a solution - putting it here in case it’s helpful for anyone else. From Powershell just use the following format:

$results = .\mimikatz.exe privilege::debug sekurlsa::logonpasswords exit

And then simply use $results to read the output