Getting ready

Let's build a small post-exploitation module that will enumerate all the users in a domain using PowerShell. We already know how to run PowerShell scripts using the Windows Powershell Execution Post Module; however, typing PowerShell commands or having to maintain separate files with scripts for common tasks can be daunting and prone to errors.

Get Metasploit Penetration Testing Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.