- In this recipe, we will start by loading the PowerShell extension with the load powershell command and have a look at which commands were added to our Meterpreter session using the help command:
meterpreter > load powershellLoading extension powershell...Success.meterpreter > help powershell Powershell Commands=================== Command Description------- -----------powershell_execute Execute a Powershell command stringpowershell_import Import a PS1 script or .NET Assembly DLLpowershell_shell Create an interactive Powershell prompt meterpreter >
- The first command we will check is the powershell_execute command, which allows us to execute PowerShell commands:
meterpreter > powershell_execute $PSVersionTable[+] Command ...