Created
May 9, 2014 08:00
-
-
Save wgross/abcb73b9a84ba3f99ef7 to your computer and use it in GitHub Desktop.
Create a simple Powershell Console Host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from c:/Program Files (x86)/ReferenceAssemblies/Microsoft/WindowsPowershell/Microsft.PowerShell.ConsoleHost.Dll | |
using Microsoft.PowerShell; | |
// from c:/Program Files (x86)/ReferenceAssemblies/Microsoft/WindowsPowershell/System.Management.Automation.Dll | |
using System.Management.Automation; | |
using System.Management.Automation.Runspaces; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
ConsoleShell.Start(RunspaceConfiguration.Create(),"Banner", string.Empty, args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment