Hacker News new | ask | show | jobs
by ronjouch 3517 days ago
Thanks. I hesitated reaching for PowerShell because, although it looks solid, I'm not familiar with it. Even at work, I was automating part of a Windows build last week, and used batch :-/

So I have a few questions to you or knowledgeable PS-passersby:

1. Any recommendations to get started with PowerShell? Good documentation, tooling, linters, useful packages?

2. Are there remaining cases where it's impossible or unreasonable to use PowerShell rather than Batch or VBScript?

3. PS runs on Win≄XP, right? How does the language evolve / is it versioned? If so, which version should I target?

2 comments

1. Start with the ISE, comes with windows. If you can't find it "C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe" Otherwise VSCode with a plugin is nice but you miss some intellisense magic the ise can do.

1a. with powershell as an administrator run `Update-Help` That's all the help for the commands installed and up to date from online. Get-help <command> and don't forget to use wildcards `get-help get-*` will show every single get command you can run. Get-Verb will show what you should expect things to be called. `Get-module -listAvailable` worth looking at too. Tab complete is your friend.

1b. This and the advenced one are great although quite slow; https://mva.microsoft.com/en-us/training-courses/getting-sta...

2. No? Maybe stuff that's already fine or where working out the signing policy is a hassle.

3. Powershell is wrapped into the "Windows Management Framework" you can install. WMF 5 has PS 5, can install down to Windows 7. 7 shipped with PS 2.0 where you could write cmdlets in powershell itself, before that you had to use C++ and visual studio. PS3.0 is the minimum it's really pleasant to use but 2.0 support isn't crazy.

1. Try this: https://web.archive.org/web/20120103141402/http://powershell...

2. Not really. Worst case, you can batch & co.

3. Probably v2.