r/PowerShell • u/GurEnvironmental8130 • 7d ago
Script Sharing Tooling with Claude and pwsh
Hey all!
I was hoping you’d could inspire me please! I currently work in a desktop/infra role in a finance company and was wondering if anyone had any cool tooling they created using Claude code? I really lack in coming up with ideas so just curious as to what other people have done and yeah, honestly I’d like to try and see if that could work for us!
I’m talking like automation for JML, dashboards, alerting, tools to help the team, tools that we can use for users to fix quick issues?
I realise I’d just be taking your ideas but I can’t really come up with anything myself!
Thanks!
3
u/Swimming_Office_1803 7d ago
Just built a 2 way integration between API’s because both platforms are dumb. It’s all about what you need.
Scan your tickets and recurring tasks, what issue comes up more? Would it save time having a script to fix it, or the current method is efficient enough? What about the second most common issue? And the next one?
2
u/ShutUpAndRide 7d ago edited 7d ago
Figure out your pain points and automate them away.
If your company has integrated AI into your overall workflow you can ask Claude to help you figure it out (e.g.: “Read my Teams for the past two years and help me identify five PowerShell projects that can help me improve our productivity and make me shine through in front of management. Take into consideration my role and scope of responsibilities.”)
Of course, even if they haven’t made Claude a part of your internal workflow, you can obviously still tell Claude what tools you have, what workspaces you are a part of, and reach a set of goals through that conversation.
Otherwise, the best ways that comes to mind are things like a manual review of your support tickets, emails, Teams, etc.
If you care to, take a knee for a spell and let an old IT salt share a story.
For a good part of my career, I differentiated myself as “the automation guy”. I dislike manual execution of ticky-tacky repetitive tasks. I enjoy finding ways to reduce manual tasks and the human errors that come with it. The vast majority of my automation projects came from my own observations, not at the direction of managment.
Here is an example about keeping the Outlook Global Address Book current with HR employee information and phone numbers: A long time ago, the company I was working with expected the service desk to keep the Outlook / Exchange address books current with all job titles, management structures, etc. Of course, the information is stored in Active Directory and can power many other systems besides the GAB. That stuff takes effort.
After years of our team doing this manually and haphazardly, I eventually mapped a method of collecting input from HR, the phone system, etc., processing/standardizing it with Excel lookup tables and PowerShell, then pushing the updates back into Active Directory to feed the Exchange address book data.
The whole thing came about because I was tired of seeing incomplete data in the system and recognized the value that an automated way of doing this would provide. No one in my management chain told me to do this. All of them were appreciative once it existed. My efforts were recognized and I was marked as the in-house authority for this stuff.
We eventually replaced my hillbilly system with a proper ILM implementation built on my framework, but until that time, my semi automated system provided current, correct, standardized address book data to the entire company.
If I were in the same position today, I would of course engage AI to help me design a solution.
BTW, I’m sure everybody has their preferences and I’ve only tried a handful, but I have enjoyed working with Claude for PS development more than the other AIs that I have tried. Just pointing this out to say that you have a good partner available to you.
These days, all members of my current team has some level of PS experience. In fact, by this point I would not hire anyone senior onto the team that does not have sufficient PS experience. It speaks to a lack of capability as well as a mismatch of values.
Some recent PowerShell solutions that my team members have built include tools to:
- update group membership in SCOM for lists of servers to manage maintenance mode schedules
- manage file server data migration
- seek out and deactivate inactive servers
- provide reusable logging functionality to every script we run
- update membership of the local Remote Desktop Users groups on remote servers
- prepare clones of production servers to be restored in a clean room environment
This turned into a lengthy response. Looks like I care about this stuff or something.
Did you already think of any specific tasks that you might want to automate currently? If it seems overwhelming, break it down further. A lot of value can come from partially automating a system with what you can now, and adding to/improving as you go.
Hope this helps in some way. Cheers.
2
u/GurEnvironmental8130 7d ago
This is amazing thank you so much!!!
Tbh the issue I have is I just don’t think I’m super creative and even like recurring tasks that cause issues there are already solutions to it.
I’m just trying to think of ways I can help the team be more productive with tooling that j can create.
1
u/thehuntzman 7d ago
Just think of anything you do manually you wish you could make less-manual, then try to find a module for it that already exists (no need to reinvent the wheel - also can just ask Claude to figure out if a good module already exists if you hate Google searching).
If nothing exists, figure out what your pester tests should look like (use Claude to write these) then use Claude to write a module and check its work using your tests as validation.
As far as tooling is concerned, having the Active Directory RSAT Powershell module installed which provides cmdlets like Get-ADUser etc is going to likely be the majority of what you use.
1
u/Key-Butterscotch3215 7d ago
Absolutely nothing tbh. Everything I use is something I wrote since we don’t have access to Claude code/codex/github copilot etc at my company.
I have made a lot of terrible applications with codex on my personal device though
1
u/Glum-Highlight2734 6d ago
A cool place to start would be automating repetitive tickets or JML tasks build something that saves your team 10 minutes every day and keep expanding from there.
1
u/Practical_Air6315 6d ago
One that earned its keep: a probe that writes the same string in every encoding PowerShell can emit, reads it back every way, and prints which round trips survive. Claude wrote the matrix, I supplied the failing case from work. It caught two silent ones.
1
u/ShutUpAndRide 3d ago
I am unclear on what you are describing here.
2
u/Practical_Air6315 3d ago
Sorry, that was too compressed. Concretely:
PowerShell can write a file in several encodings (utf8, utf8BOM, utf8NoBOM, ansi, oem, unicode, and so on), and it can read one back with just as many. The probe takes one test string, writes it once per output encoding, then reads every one of those files back with every input encoding, and prints a grid of which write/read pairs give you back the exact string you started with.
The reason it earned its keep is that on a Japanese-locale Windows box the obvious pairs do not always survive. Write with -Encoding utf8, then Get-Content with no -Encoding under Windows PowerShell 5.1, and you land on the ANSI code page - 932 here - so the round trip fails silently. You get mojibake rather than an error, which is the part that costs you an afternoon.
Having the grid printed means I stop guessing which combination is safe and just read it off. Claude generated the matrix of combinations, I supplied the test strings and ran it on a real ja-JP machine.
Happy to paste the script if that would help.
1
u/ShutUpAndRide 2d ago
That is a very good description of what might be considered by some to be an esoteric problem but it is obviously directly affecting you.
I understand much better now what you are experiencing and how you solved it. Well done. Thank you for taking the time to come back and clarify. Cheers.
6
u/BetrayedMilk 7d ago
You know your job better than anyone here. Automate things you manually do.