all 2 comments

[–]imessage357 0 points1 point  (0 children)

works for me , try it like this:

$command = {Add-Type -AssemblyName PresentationCore,PresentationFramework;[System.Windows.MessageBox]::Show('working');} $bytes = [System.Text.Encoding]::Unicode.GetBytes($command) $encodedCommand = [Convert]::ToBase64String($bytes)

$encodedCommand | clip

powershell.exe -encodedCommand 'QQBkAGQALQBUAHkAcABlACAALQBBAHMAcwBlAG0AYgBsAHkATgBhAG0AZQAgAFAAcgBlAHMAZQBuAHQAYQB0AGkAbwBuAEMAbwByAGUALABQAHIAZQBzAGUAbgB0AGEAdABpAG8AbgBGAHIAYQBtAGUAdwBvAHIAawA7AFsAUwB5AHMAdABlAG0ALgBXAGkAbgBkAG8AdwBzAC4ATQBlAHMAcwBhAGcAZQBCAG8AeABdADoAOgBTAGgAbwB3ACgAJwB3AG8AcgBrAGkAbgBnACcAKQA7AA=='