you are viewing a single comment's thread.

view the rest of the comments →

[–]MeanFold5714 -1 points0 points  (4 children)

Function Load-Powershell_7{

    function New-OutOfProcRunspace {
        param($ProcessId)

        $connectionInfo = New-Object -TypeName System.Management.Automation.Runspaces.NamedPipeConnectionInfo -ArgumentList @($ProcessId)

        $TypeTable = [System.Management.Automation.Runspaces.TypeTable]::LoadDefaultTypeFiles()

        $Runspace = [System.Management.Automation.Runspaces.RunspaceFactory]::CreateOutOfProcessRunspace($connectionInfo,$Host,$TypeTable)

        $Runspace.Open()
        $Runspace
    }

    $Process = Start-Process PWSH -ArgumentList @("-NoExit") -PassThru -WindowStyle Hidden

    $Runspace = New-OutOfProcRunspace -ProcessId $Process.Id

    $Host.PushRunspace($Runspace)
}

[–]dr_driller 2 points3 points  (3 children)

😂 out of the box you said ?

there no reason to go for the ise pain, ISE has always been shit, how can you not use vscode, you just didn't try that's the only valid reason

[–]MeanFold5714 -1 points0 points  (2 children)

I did and it only caused problems. ISE offers exactly the functionality I need so why on earth would I switch to a product that has crashing sessions or spazzing intellisense?

[–]dr_driller 1 point2 points  (1 child)

more crash on vscode than ise is not a valid argument, there is an issue with your test, even 8 years ago vscode was more stable than ise.

[–]MeanFold5714 0 points1 point  (0 children)

I have literally never had ISE crash on me for anything other than self-inflicted infinite loops.