It's Ok To Fail
We’ve all hit that low spot, when we are working with an especially difficult problem, and the code we are writing to try and solve it just won’t work the way we want it too. I often find that it is in these moments, when I’m contemplating throwing in the IT towel and becoming a hermit, that I grow the most.
Debugging your code, or more often than not, making a bit of code you’ve scraped from online work for your use case lends to many opportunities to learn about a new cmdlet, method, or technique that you have not encountered before.
Don’t be afraid of the red text. It’s there for a reason. Often times, it tells you almost exactly why your code isn’t running the way you expect.
Don’t forget about the following while you are struggling
- Get-Help is just a cmdlet away, and there is help avaiable for pretty much all scenarios in the about_* topics.
- Having the Powershell docs open in a new tab can be useful so you can easily glance and code at the same time.
- Google. We are all professionals at it at this point.
- Reach out to the community. Seriously, they are awesome, and are more than willing to dive in with you and help.
Remember, you are not alone, we’ve all been there!
Albus Dumbledore: Help will always be given at Hogwarts, Harry, to those who ask for it. I’ve always prized myself on my ability to turn a phrase. … But I would, in this case, amend my original statement to this: “Help would always be given at Hogwarts, to those who deserve it.”