I like being a lazy administrator, and using P$ and PDQ it makes life a lot easier. I'm not even close to an expert on powershell or automation. Thanks guys.
(I think the best comments don't just explain what the code does, they PROVIDE CONTEXT. What role does this code play in the greater script? Why is it done this way? Is there a ticket #, or bug # you can list as a breadcrumb?)
Here's a good story for you. When I worked helpdesk back in the 90s we had this young developer we hired and they had us set up a dual boot Win95/Linux box for her. Calls me up to her desk one day and says "Why can't I access my stuff in Windows when I'm in Linux?" So I had to explain it to her without laughing. 🤣
It's funny how our experiences can shape our opinions. 100% of the macs I've used I've had to take to the apple store in person at least once. Some three times. Yet i've only had about 5% of my Dells have issues and it's either been due to their age or some oddity within warranty and they ship a replacement overnight. Give me Dell (or Lenovo) over Mac any day.
And a small addendum - You can also create a custom PowerShell scanner, that will collect the information you need so you can create reports or collections based on the scanner's results.
Good info for those new to dealing with services. Especially when this can be the source of an AD account getting locked when someone sets up a service to test, forget, change their password, and the service keeps trying to run with an old password.
My first thoughts seeing this were: 1 thank God it's not a laptop, 2 that is a $10 keyboard that is simply getting replaced, why would you even consider using that?