Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Hide PowerShell Console
- Add-Type -Name Window -Namespace Console -MemberDefinition '
- [DllImport("Kernel32.dll")]
- public static extern IntPtr GetConsoleWindow();
- [DllImport("user32.dll")]
- public static extern bool ShowWindow(IntPtr hWnd, Int32 nCmdShow);
- '
- $consolePtr = [Console.Window]::GetConsoleWindow()
- [Console.Window]::ShowWindow($consolePtr, 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement