Skip to content

Instantly share code, notes, and snippets.

@Santaro255
Created July 8, 2021 07:45
Show Gist options
  • Save Santaro255/acce5deb33ecdddaefa994fe7fa039be to your computer and use it in GitHub Desktop.
Save Santaro255/acce5deb33ecdddaefa994fe7fa039be to your computer and use it in GitHub Desktop.
Cyrilic letters with chcp 866
Add-Type -Namespace Win32 -Name Kernel32 -MemberDefinition @'
[DllImport("Kernel32.dll", SetLastError=true)]
public static extern bool AllocConsole();
'@
[void][Win32.Kernel32]::AllocConsole()
[Console]::OutputEncoding = [Text.Encoding]::GetEncoding(866)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment