rapid7/metasploit-framework — pull request #2139 by Meatballs1 (2013-07-21 19:14:19+00:00)
Title: Enables a rudimentary interactive powershell prompt

Hopefully @dark0perator @mattifestation @obscuresec can advise how to improve this.

Requires Meterpreter update: https://github.com/rapid7/meterpreter/pull/13

Currently there is a slight bug in that each command has to be entered like so:

[Return]command[return]

Need to work out why the streamreader is ignoring the first return etc.

```
meterpreter > powershell
Process 4800 created.
Channel 7 created.
[*] File written to C:\Users\pentest\AppData\Local\Temp/kgoVNpkU.ps1
Hit Enter, Write Command then Enter again...
PS>
Get-Service

Status Name DisplayName
------ ---- -----------
Running AdobeARMservice Adobe Acrobat Update Service
Stopped AdobeFlashPlaye... Adobe Flash Player Update Service
Running AeLookupSvc Application Experience
Stopped ALG Application Layer Gateway Service
Running AMPPALR3 IntelÂ® CentrinoÂ® Wireless Bluetooth...
Running AppHostSvc Application Host Helper Service
Stopped AppIDSvc Application Identity
Running Appinfo Application Information
Running AppMgmt Application Management
Stopped aspnet_state ASP.NET State Service
Running AudioEndpointBu... Windows Audio Endpoint Builder
Running AudioSrv Windows Audio
Stopped AxInstSV ActiveX Installer (AxInstSV)
Stopped BDESVC BitLocker Drive Encryption Service
Running BFE Base Filtering Engine
```