Skip to content

Instantly share code, notes, and snippets.

@wgross
Created May 9, 2014 08:00
Show Gist options
  • Save wgross/abcb73b9a84ba3f99ef7 to your computer and use it in GitHub Desktop.
Save wgross/abcb73b9a84ba3f99ef7 to your computer and use it in GitHub Desktop.
Create a simple Powershell Console Host
// 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