Esempio n. 1
0
        internal System.Management.Automation.PowerShell NewPowerShell()
        {
            if (IsRunning)
            {
                return(powerShell.CreateNestedPowerShell());
            }

            powerShell          = System.Management.Automation.PowerShell.Create();
            powerShell.Runspace = host.Runspace;
            return(powerShell);
        }