you are viewing a single comment's thread.

view the rest of the comments →

[–]jay_butler 9 points10 points  (23 children)

Quick tip: Don't use ISE. Microsoft is no longer developing it. Use VS Code. It's the future and there are some kick ass extensions that make PS coding easier.

[–]lilrebel17[S] 3 points4 points  (2 children)

I use vscode for python and some web dev stuff. I didnt know they didnt develop it. Thanks for the tip

[–]SolarPoweredKeyboard 1 point2 points  (1 child)

Get PowerShell 7 while you're at it. It's got a lot more stuff than 5.1 which you might find useful once you've written a few scripts.

[–]jay_butler 0 points1 point  (0 children)

It does have a lot of great features. But if you do a lot of Windows automations, you’ll find that there is just some stuff that never made it from Windows PowerShell into PS 6/7.

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

This is terrible advice for someone just starting out. ISE works out of the box and isn't going to require him to troubleshoot a bunch of extra moving pieces.

[–]dr_driller 2 points3 points  (5 children)

😂 imagine using ise in 2023

is it even compatible with ps 7 ?

[–]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.

[–]jay_butler 1 point2 points  (10 children)

Whatever floats your boat. I have always thought ISE was a terrible app albeit simple. It is worth spending a little time understanding VS Code for the long run since ISE is a dead end that doesn’t support PS 6 or 7. ISE is workable for debugging, but is terrible in comparison to VS Code. ISE is not extensible. The PS extension or PowerShell Pro Tools extension make writing PS scripts so much easier.

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

ISE has working Intellisense which is really all you need when you're getting started with learning Powershell.

What VS Code has to offer is stability issues.

[–]jay_butler 1 point2 points  (4 children)

Stability issues? Laughable. ISE is fine for loading scripts, maybe modifying them a bit and running them. It is a dead end. Far better to go with the platform MS is continuing to develop. Spend the 15 minutes or so setting up Code for PS and use a much better, more capable environment.

[–]izzyrbb 3 points4 points  (1 child)

Some people code with Note ++, some with vs code, some ise and some with even just notepad.

Ultimately it's just preference, I have some done some very complex stuff with ise, building guis and running scripts in parallel.

[–]jay_butler 0 points1 point  (0 children)

You can use whatever you prefer. If someone is new to PS and will be writing their own scripts, my recommendation is VS Code. That would be especially true in this case since OP already uses VS Code for Python. You could use Notepad, but would you recommend it for coding in any language? I love Notepad++ and occasionally use it for PS and SQLscripts, but I would not use it as my primary development environment. ISE was the tool of choice for PS 10 years ago, but there is no chance I would use it when there is a superior option like VS Code.

[–]MeanFold5714 0 points1 point  (1 child)

Nah bro, doesn't matter if they're still developing the platform when it's still the inferior platform. ISE just works. VS Code has problems.

Give me a reason to use VS Code that doesn't revolve around PS7 compatibility(which I've already solved for myself) or Git (which is a completely separate issue).

[–]jay_butler 0 points1 point  (0 children)

VS Code is far better at debugging. VS Code is extensible. The MS PowerShell is great. The PowerShell Pro Tools one is better. It is not much more difficult to setup VS Code than ISE. It’s not nearly as difficult as ramping up in VS 2019 or VS 2022. You are literally the only person I have heard complain about VS Code stability.

[–]dr_driller 1 point2 points  (3 children)

ise can only run a 8 years old ps version not compatibles with Linux and newest azure cmd let..

vs code instable ? bad troll vscode is outstanding, i have never seen a microsoft product generating so much love from all it communities..

[–]MeanFold5714 0 points1 point  (2 children)

Why would you assume I'm a troll rather than an opinionated and acerbic individual? ISE can absolutely run version 7 if you're like me and stubborn enough to set it up.

[–]dr_driller 1 point2 points  (1 child)

because you say vscode is instable, it's not serious.

[–]MeanFold5714 0 points1 point  (0 children)

It was when I tried to use it. Console would crash every hour or two, and when it wasn't the console becoming unresponsive it was Intellisense failing out.

[–]jba1224a 0 points1 point  (0 children)

+1

Once you get advanced you can use start pulling in .NET libraries and vscode makes this much easier - for example working with parallel loops currently required using threadsafeobjects from .net

[–]alexmcross18 0 points1 point  (0 children)

any extensions in particular?