I am tring to get ps1 script from web, and run it on powershell with one line command.
For now on, the command looks like this :
Invoke-WebRequest -UseBasicParsing "URL of ps1 file" | Invoke-Expression
.ps1 script is saved as UTF-8 and setted Encoding option for powershell on the first line of .ps1 File like this.
On the first line of .ps1 file:
[System.Console]::InputEncoding = [System.Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
But it doesn't shows up as UTF-8. All text that can to be shown up as only UTF8 mode(Korean for now) shows up as ?????
Is there a way to fix it? If I need to fix the command to run, Can You tell me how to run to fix this issue?