Return to Snippet

Revision: 55897
at February 27, 2012 20:06 by pjessey


Initial Code
InitialSessionState initial = InitialSessionState.CreateDefault();
initialSession.ImportPSModule(new[] { modulePathOrModuleName1, ... });
Runspace runspace = RunspaceFactory.CreateRunspace(initial);
runspace.Open();
RunspaceInvoke invoker = new RunspaceInvoke(runspace);
Collection<PSObject> results = invoker.Invoke("...");

Initial URL

                                

Initial Description

                                

Initial Title
add powershell module in csharp

Initial Tags

                                

Initial Language
C#