{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShellMafia/PowerSploit/issues/96","labels_url":"https://api.github.com/repos/PowerShellMafia/PowerSploit/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/PowerShellMafia/PowerSploit/issues/96/comments","events_url":"https://api.github.com/repos/PowerShellMafia/PowerSploit/issues/96/events","html_url":"https://github.com/PowerShellMafia/PowerSploit/issues/96","id":122333756,"number":96,"title":"Invoke-WmiCommand doesn't work properly in PSv2","user":{"login":"PowerShellMafia","id":15639068,"avatar_url":"https://avatars.githubusercontent.com/u/15639068?v=3","gravatar_id":"","url":"https://api.github.com/users/PowerShellMafia","html_url":"https://github.com/PowerShellMafia","followers_url":"https://api.github.com/users/PowerShellMafia/followers","following_url":"https://api.github.com/users/PowerShellMafia/following{/other_user}","gists_url":"https://api.github.com/users/PowerShellMafia/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerShellMafia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerShellMafia/subscriptions","organizations_url":"https://api.github.com/users/PowerShellMafia/orgs","repos_url":"https://api.github.com/users/PowerShellMafia/repos","events_url":"https://api.github.com/users/PowerShellMafia/events{/privacy}","received_events_url":"https://api.github.com/users/PowerShellMafia/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PowerShellMafia/PowerSploit/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"PowerShellMafia","id":15639068,"avatar_url":"https://avatars.githubusercontent.com/u/15639068?v=3","gravatar_id":"","url":"https://api.github.com/users/PowerShellMafia","html_url":"https://github.com/PowerShellMafia","followers_url":"https://api.github.com/users/PowerShellMafia/followers","following_url":"https://api.github.com/users/PowerShellMafia/following{/other_user}","gists_url":"https://api.github.com/users/PowerShellMafia/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerShellMafia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerShellMafia/subscriptions","organizations_url":"https://api.github.com/users/PowerShellMafia/orgs","repos_url":"https://api.github.com/users/PowerShellMafia/repos","events_url":"https://api.github.com/users/PowerShellMafia/events{/privacy}","received_events_url":"https://api.github.com/users/PowerShellMafia/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/PowerShellMafia/PowerSploit/milestones/1","html_url":"https://github.com/PowerShellMafia/PowerSploit/milestones/3.0%20release","labels_url":"https://api.github.com/repos/PowerShellMafia/PowerSploit/milestones/1/labels","id":1458223,"number":1,"title":"3.0 release","description":"","creator":{"login":"PowerShellMafia","id":15639068,"avatar_url":"https://avatars.githubusercontent.com/u/15639068?v=3","gravatar_id":"","url":"https://api.github.com/users/PowerShellMafia","html_url":"https://github.com/PowerShellMafia","followers_url":"https://api.github.com/users/PowerShellMafia/followers","following_url":"https://api.github.com/users/PowerShellMafia/following{/other_user}","gists_url":"https://api.github.com/users/PowerShellMafia/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerShellMafia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerShellMafia/subscriptions","organizations_url":"https://api.github.com/users/PowerShellMafia/orgs","repos_url":"https://api.github.com/users/PowerShellMafia/repos","events_url":"https://api.github.com/users/PowerShellMafia/events{/privacy}","received_events_url":"https://api.github.com/users/PowerShellMafia/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":7,"state":"open","created_at":"2015-12-13T23:33:56Z","updated_at":"2015-12-15T18:21:40Z","due_on":"2015-12-22T08:00:00Z","closed_at":null},"comments":6,"created_at":"2015-12-15T18:21:40Z","updated_at":"2015-12-15T19:36:22Z","closed_at":null,"body":"One of the core pieces of functionality in Invoke-WmiCommand is that it returns a proper PowerShell object. I do this in memory by using the System.Management.Automation.PSSerializer class to perform object [de]serialization. This class doesn't exist in PSv2 however. I could reimplement the logic in Import/Export-CliXml but I think I'll opt to just use Import/Export-Clixml and temporarily drop the execution results to disk and clean things up accordingly."},"comment":{"url":"https://api.github.com/repos/PowerShellMafia/PowerSploit/issues/comments/164870194","html_url":"https://github.com/PowerShellMafia/PowerSploit/issues/96#issuecomment-164870194","issue_url":"https://api.github.com/repos/PowerShellMafia/PowerSploit/issues/96","id":164870194,"user":{"login":"secabstraction","id":5590939,"avatar_url":"https://avatars.githubusercontent.com/u/5590939?v=3","gravatar_id":"","url":"https://api.github.com/users/secabstraction","html_url":"https://github.com/secabstraction","followers_url":"https://api.github.com/users/secabstraction/followers","following_url":"https://api.github.com/users/secabstraction/following{/other_user}","gists_url":"https://api.github.com/users/secabstraction/gists{/gist_id}","starred_url":"https://api.github.com/users/secabstraction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/secabstraction/subscriptions","organizations_url":"https://api.github.com/users/secabstraction/orgs","repos_url":"https://api.github.com/users/secabstraction/repos","events_url":"https://api.github.com/users/secabstraction/events{/privacy}","received_events_url":"https://api.github.com/users/secabstraction/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T19:36:21Z","updated_at":"2015-12-15T19:36:21Z","body":"That's my bad, I left out the converting to csv first in that gist. my $obj was actually:\r\n```powershell\r\n$obj = ps -Id $PID | ConvertTo-Csv\r\n```\r\n\r\n```powershell\r\nps -Id $PID | ConvertTo-Csv | % { [Convert]::ToBase64String($OutputEncoding.GetBytes($_)) } | % { $OutputEncoding.GetString([Convert]::FromBase64string($_)) } | ConvertFrom-Csv\r\n```"}}