r/PowerShell • • Oct 09 '19

My IT Tool

Figured I'd share my little program as well. Been working on this on and off for about 6 months now. Just started getting into Powershell. Some key features are a security check the second the program is ran. If the user is not part of the proper OU, it will display an error message, email the IT dept with their username and computer, and then close the program. Just to make sure only IT people can use it. Every action is also logged to a central server Event Viewer.

Program screenshots: https://imgur.com/a/qsjk4ek

Code: https://pastebin.com/0FmdSaRF

I know I can clean it up some and probably stream line some stuff but, again, I've only been using Powershell since the beginning of the year basically and I have no real other programming experience prior. I made this to really just make my job a little easier and quicker. I started this in Powershell Studio trial with the form and tabs. Pulled that code and have been using ISE ever since. Apparently Studio is just too expensive for my company but oh well.

EDIT: GOLD?! Wow, my first! Thank you internet stranger! I also wanted to thank everyone on here who helped me the times I came looking for help with certain aspects of this thing. I really appreciate it. And thanks to everyone on this post for tips and suggestions, I will definitely look into them all. Always looking to improve.

172 Upvotes

62 comments sorted by

View all comments

12

u/mystonedalt Oct 09 '19

Almost looks like you got holdta some of the shit I wrote as a consultant! Good stuff, mate.

6

u/bajinabass Oct 09 '19

Thanks! Curious, which part(s)? I definitely took the color scheme from another post on here a while back. Just really liked the way it looked. For Excel output I went and looked up how to do it and just modified some code from a site to do what I needed within my system. The event logging I just added yesterday actually after seeing someone mention it on another help desk tool post.

3

u/mystonedalt Oct 09 '19

Nothing specific, I've just written about 500 POSH GUIs to hand off to Operations teams when I'd go in to help unfuck their org.

3

u/bajinabass Oct 10 '19

I kinda did the same thing for our order processing department. They have these little issues that they are always running into so I got a little tired of the tickets and made them a one form GUI that answers any one of their questions. Tickets have drastically reduced.

1

u/stuartall Oct 10 '19

Hey so I know there’s a few posts about GUIs recently from Adams stuff. Any particular tools you prefer for GUIs ? All these make we want to re-jig some of my Helpdesk scripts.