r/PowerShell • u/AutoModerator • 2d ago
Script Sharing What have you done with PowerShell this month?
A sticked post for the community to share their projects throughout the month.
Make sure to post a link to the code!
13
Upvotes
9
u/MadBoyEvo 2d ago
Quite a few:
And a lot others
5
u/sqloid 2d ago
https://github.com/ronascentes/OracleCmd - A tiny module that runs a single SQL statement against an Oracle database, in the spirit of Invoke-Sqlcmd.
5
u/Kasper_Franz 1d ago
ran it as admin 💪🏻
2
u/Incrediblecodeman 2d ago
I ended up building my own little clipboard vault. It takes my clipboard contents, salts and encrypts them using a password, and appends the encrypted data to a text file on a UNC path that only I have access to.
Each entry is timestamped, so I can easily browse the history. When I want to retrieve something, I just copy the entire line, timestamp included, and the script automatically strips the timestamp, decrypts the contents, and puts the original text back on my clipboard.
Simple, portable, and surprisingly convenient. No database or additional infrastructure required.
2
u/positivemark 13h ago
With a good chunk of AI assistance, mainly these four:
1
u/chaosphere_mk 1d ago
We had a dynamic group with rules that were awful for picking up "every internal employee". It was being used to assign access to over 100 entra SSO apps. I tightened up the rules and created a new group for each app to replace the original dynamic group. Used powershell to not only specify the new rules, but to also create the new group per app, assign the group to each enterprise app, amd remove the old group.
1
u/Hybrid_SysAdmin 1d ago
Automated our hybrid new-hire onboarding this month: one run creates the on-prem AD account, enables the Exchange hybrid remote mailbox, builds the home folder, kicks off an Entra Connect delta sync and waits for the user to appear in Entra ID, assigns the M365 license, pre-provisions OneDrive and adds them to Teams. The part I'm happiest with is the per-step error handling: a failed step gets logged and the rest of the run continues, so one failure doesn't leave a half-built account with no trail. -WhatIf previews the whole run before anything changes.
1
u/ContentedJourneyman 1d ago
Created a collection of scripts that run API schema through compliance and regulatory agency standards to evaluate their security and maturity.
Total of 26 international agencies, each with its own suite of pester tests. Outputs infractions, exactly which statute was violated, the severity, how to fix it, and the downstream customer compliance impact of the defect to file. That last one is to proactively answer what we all know is coming in response.
I’m everyone’s favorite API governance sheriff. 🤠
1
u/Gakamor 5h ago
https://github.com/gakamor/public-scripts/blob/main/Uninstall-InstallShieldApp.ps1
I decided that I was recording entirely too many InstallShield response files for application uninstalls. The response file for a given application doesn't often change between versions except for the GUID. I made a script that will generate response files on the fly by swapping out the application GUID with information from the Uninstall registry keys and then perform the uninstall(s).
-1
u/[deleted] 1d ago
Quite a bit for me, but as it's only December 2nd I have only one:
https://github.com/2civics/PSGallery-Manager A standalone Windows desktop GUI for browsing, installing, updating, translating, and publishing PowerShell Gallery scripts and modules—without memorizing cmdlets or manually editing metadata headers.
But last month a bunch:
https://github.com/2civics/Asus-Nat-View lightweight, read-only Windows WPF GUI for inspecting live
iptablesNAT rules (PREROUTING,POSTROUTING,VSERVER) on ASUS (Asuswrt / Asuswrt-Merlin) routers over SSH.https://github.com/2civics/Security-Audit-System-Repair-Studio A clean, modern Windows health check and PC repair tool with a Windows Fluent Dark UI
https://github.com/2civics/PowerShell-Desktop-Shortcut-Creator A standalone, Windows 11 Fluent WPF GUI utility for creating .lnk Desktop shortcuts for PowerShell (.ps1) scripts, supporting Windows PowerShell 5.1 and PowerShell 7.x
And many more on my github.