I am trying to run a base64 encoded PowerShell command with the -e flag, however it does not work.
powershell.exe -e V3JpdGUtSG9zdCBhYWFh
The base64 is just the command Write-Host aaaa. Instead of decoding the command and printing "aaa", it throws the following error.
牗瑩ⵥ潈瑳愠慡� : The term '牗瑩ⵥ潈瑳愠慡�' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
- 牗瑩ⵥ潈瑳愠慡�
-
+ CategoryInfo : ObjectNotFound: (牗瑩ⵥ潈瑳愠慡�:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Why is it not trying to decode the command and run it? I tried -EncodedCommand as well and got the same result.