Me and a bunch of other programmers in my team are trying to use more powershell instead of wsl/bash and cmd. There are obviously some basics I miss, and trial-and-error has cost me quite some time (I have run into some character encoding problems, quoting issues, multiline commands, oom from commands I thought were simple streaming operations)
Yet tutorials that start at basics are usually very basic in terms of programming/scripting prerequisite knowledge and quite advanced in terms of knowledge about windows-things like AD. The target audience seems to be sysadmins, not software developers.
Is there a Powershell guide that does it differently and is written for developers?
Welcome to the community. I don’t know of any guides specific to programmers and developers that would help them ease into PowerShell, other than to say, PowerShell is a lot like .NET. Some would argue even like C ## (C Sharp). however, PowerShell was originally written for Windows Administrators, so that is why you are probably feeling that way. Because it is true. It is first and foremost a scripting language, not a programing language. You can automate a lot of things with it.
Developer or not I always recommend Don Jones you tube channel he also started this very web site but no longer maintains it. https://www.youtube.com/@DonJonesConTech
I think even as a developer you would still learn a ton from his videos. I’d say Ed Wilson but he retired a long time ago. Jeff Hicks is another good resource, but none specifically for devs.
I am currently learning Linux myself, since the death of Windows 10. So we’re kind of passing ships here. Anyway welcome to PowerShell I hope you will keep learning and using it.
If you prefer hands-on, on-line learning, give https://exercism.org a try – it’s free and the exercises cover stuff from the really basic up to dynamic programming. For books, "PowerShell in Action (3rd edition) covers PowerShell up to version 6. “PowerShell in Depth” covers PowerShell up to version 4, but has end-of-chapter exercises and the 2nd half of the book has exercises that demonstrate common admin tasks. Almost all of the information in the older book is still valid today.
In addition to my earlier advice, even if you’re writing simple scripts (which you appear to be since you refer only to bash and cmd) you should familiarize yourself with “Pester” (pester.dev). It’s a framework for developing tests for those scripts to ensure that they do what you expect them to do, and that they continue to do so if (and when) the script is modified.
PowerShelll is quite capable handling complex problems, but you should really begin to develop “modules” that solve a particular problem and can be used in other scripts without copy/paste (and all the problems associated with having to change many scripts if a common solution has been pasted into several scripts.
I started a new topic here to suggest a programming exercise that will build up your powershell skills. It’s writing your own Template Engine. See my topic for a discussion of what a template engine is. This is a step above the most basic exercises, but it’s well below writing, say, a discussion manager.