{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/meterpreter/issues/125","labels_url":"https://api.github.com/repos/rapid7/meterpreter/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/meterpreter/issues/125/comments","events_url":"https://api.github.com/repos/rapid7/meterpreter/issues/125/events","html_url":"https://github.com/rapid7/meterpreter/issues/125","id":57011261,"number":125,"title":"Unable to run Powershell interactively","user":{"login":"OJ","id":28896,"avatar_url":"https://avatars.githubusercontent.com/u/28896?v=3","gravatar_id":"","url":"https://api.github.com/users/OJ","html_url":"https://github.com/OJ","followers_url":"https://api.github.com/users/OJ/followers","following_url":"https://api.github.com/users/OJ/following{/other_user}","gists_url":"https://api.github.com/users/OJ/gists{/gist_id}","starred_url":"https://api.github.com/users/OJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OJ/subscriptions","organizations_url":"https://api.github.com/users/OJ/orgs","repos_url":"https://api.github.com/users/OJ/repos","events_url":"https://api.github.com/users/OJ/events{/privacy}","received_events_url":"https://api.github.com/users/OJ/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapid7/meterpreter/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-09T10:14:43Z","updated_at":"2015-02-10T21:09:48Z","closed_at":null,"body":"For some reason the interaction with Powershell through Meterpreter doesn't work interactively:\r\n```\r\nmeterpreter > execute -f C:\\\\windows\\\\system32\\\\windowspowershell\\\\v1.0\\\\powershell.exe -c -H -i\r\nProcess 2356 created.\r\nChannel 2 created.\r\nmeterpreter > shell\r\nProcess 1704 created.\r\nChannel 3 created.\r\nMicrosoft Windows [Version 6.1.7601]\r\nCopyright (c) 2009 Microsoft Corporation.  All rights reserved.\r\n\r\nC:\\Users\\oj\\Desktop>powershell\r\npowershell\r\nWindows PowerShell \r\nCopyright (C) 2009 Microsoft Corporation. All rights reserved.\r\n\r\nexit\r\nexit\r\n^C\r\nTerminate channel 3? [y/N]  y\r\nmeterpreter >\r\n```\r\n:disappointed: \r\n\r\nIt looks like it might have something to do with the way that the std handles are managed. This isn't great. We should try to figure out what's going on here so that people can run interactive powershell prompts through Meterpreter. At the time time, it'd be nice to have a `powershell` command that behaves like `shell`, but gives a powershell prompt instead of a command prompt."},"comment":{"url":"https://api.github.com/repos/rapid7/meterpreter/issues/comments/73784142","html_url":"https://github.com/rapid7/meterpreter/issues/125#issuecomment-73784142","issue_url":"https://api.github.com/repos/rapid7/meterpreter/issues/125","id":73784142,"user":{"login":"Meatballs1","id":1854557,"avatar_url":"https://avatars.githubusercontent.com/u/1854557?v=3","gravatar_id":"","url":"https://api.github.com/users/Meatballs1","html_url":"https://github.com/Meatballs1","followers_url":"https://api.github.com/users/Meatballs1/followers","following_url":"https://api.github.com/users/Meatballs1/following{/other_user}","gists_url":"https://api.github.com/users/Meatballs1/gists{/gist_id}","starred_url":"https://api.github.com/users/Meatballs1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Meatballs1/subscriptions","organizations_url":"https://api.github.com/users/Meatballs1/orgs","repos_url":"https://api.github.com/users/Meatballs1/repos","events_url":"https://api.github.com/users/Meatballs1/events{/privacy}","received_events_url":"https://api.github.com/users/Meatballs1/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T21:09:48Z","updated_at":"2015-02-10T21:09:48Z","body":"N.b. powershell -C/E command will generally work OK. But obviously limited to the command line length of 8192 which is easily reached when encoding larger scripts. "}}