r/PowerShell • u/AutoModerator • Oct 01 '26
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!
23
Upvotes
22
u/AdeelAutomates Oct 01 '26
Not code per say.
But I made a yt video on PowerShell that's a visual guide (rather than demos) on all the concepts that go in powershell.
And it got Jeffrey Snover's attention, who was impressed by it and shared it on his Linkedin page!
I am going to live off that high for the rest of my days.
7
u/Jandalf81 Oct 01 '26
Created a simple module for (a current version of) SQLite3.
Then used that to store my personal worklogs from Jira (using another self written module). And finally create markdown with Mermaid diagrams to show my worklogs per day.
I love being able to just do that!
5
u/Sea_Propellorr Oct 01 '26
I wrote a short script which synchronizes 2 containers ( folders, partitions ) in both ways, based on Robocopy and needs no external modul.
3
u/Particular_Fish_9755 Oct 01 '26
Played with AD, like identify users who still have a network drive mapping script configured in their AD profile, or filter objects that do not belong in a specific OU (such as computers in the users OU, or vice versa).
7
u/Creative-Type9411 Oct 01 '26
Made a powershell bittorrent client
https://github.com/illsk1lls/PowerTorrent
I started the project over a year ago, but I had AI help me recently, and I asked nearly every model i could access to review it to ensure it's solid and that it works as advertised..
It's better than I thought possible tbh 😉
2
u/kinky666hallo Oct 01 '26
Played with some module to read keepass values as i'm tired of using the UI
2
u/Gron_Tron Oct 01 '26
Scripted External MFA authentication method registration to apply to all users. This is to accommodate transitioning from using Custom Controls in Entra w/ Duo MFA to Entra External MFA w/Duo.
2
u/harmbogert1 Oct 01 '26
Created a rest api server with keycloak integeration. This rest api serves endpoints to manage Microsoft ad and dns. Now our other automation can use modern authentication to mutate ad and dns
2
u/TipIll3652 Oct 01 '26
Wrote a few new scripts for our NinjaOne instance for more centralized automation rather than letting windows handle it through task scheduler. Nothing fancy, just random scripts like clearing certain cache files, exporting specific data for certain users, etc.
2
u/Dudeofthecountry Oct 02 '26
Hey everyone,
Like most techs, I used to have a USB drive overflowing with random
.bat,.ps1, and.vbsscripts that I'd accumulate over the years. Finding the right file to fix a clients system or during an outage was always a mess.To fix this, I built NorthStar (Windows Modular Toolkit 2.0). It is a completely portable, text-based Windows administration framework designed to organize, validate, and launch your IT tools from a unified dashboard.
Core Architecture:
Start.bat/Toolkit.ps1) is completely separated from your tools. You can drop in, remove, or upgrade your personal scripts, installers, or documents without breaking the menu layout.It’s lightweight, completely open-source, and handles dynamic module discovery out of the box.
I'd love to get your feedback on the layout or hear how you currently manage your "Swiss Army Knife" flash drives.
https://github.com/rageoftheday/Windows-Modular-Toolkit-2.0-NorthStar
2
u/Alone_Marionberry900 Oct 08 '26
I wrote a self contained system to hand off to another team since it requires full exchange admin and I don’t hand that out. Has a react front end, and pode powershell back end with exchange and sharepoint modules. If an email address gets blocked one team now can do the investigation and unblock it after the fact. It has other features that I’ll be adding. But wanted to see if it could be done.
1
u/Healthy-Mission7927 Oct 21 '26
https://github.com/VibeCodingFromHell/SecurityAudit/ Used AI to make security audit tool. Friend had annoying virus so made this and was able to remove it
1
u/No-Lab5359 10d ago
(A)I wrote a script to validate a series of CSV Files names and to report in a .txt file with the # of invalid files, and for each a brief description of their errors, with a .bat to run the script.
(I'm still developing skills in powershell so this was mostly AI based - I'm a Mechanical Engineer)
What I learned from this was a lot:
1
u/nvmuskie Oct 01 '26
Created a script to reconcile a dynamic device autopilot group with entra with intune using graph because there isn't a canned report available.
1
u/uptimefordays Oct 01 '26
I created a bunch of enterprise reporting tooling which makes answering "quick questions" into a repeatable business process.
1
u/netmc Oct 01 '26
Sadly, I haven't been doing much direct coding recently. My work has wanted me to use Copilot to assist. So, I've been doing the design and letting Copilot update my scripts. I now have a standards library with common functions, various design notes and requirements and am fleshing out a few scripts that were a little rigid. I'm also standardized the output so it shows all the decision trees with passing [*] or failing [!] logic identifiers and having consistent layout designs between all the various scripts we deploy. One of the biggest changes that have been done is to add a technician action section to our monitoring scripts. This way, when a monitor alerts, the tech isn't wondering what needs to be done. It gets spelled out in the alert itself. The guidance isn't 100%, but generally enough to get them pointed in the right direction. Much better than having them wonder what to do, or always coming to me about it. This works really well on the monitors that you see alert only once every 6 months or so.
1
u/No_Split11911 Oct 01 '26
A small front end for CMPivot and Script Runner (Microsoft Configuration Manager), PS5.1
https://github.com/jasonulbright/pivots-and-scripts
1
u/AroTesCra Oct 01 '26
Write a Azure PEM module
Get-PemRole
Enable-PemRole
Disable-PemRole
Wait-PemRole
You can chain them
Get-PemRole | Enable-PemRole | Wait-PemRole
No AI just coding for fun.
Also a PDF text reader to parse patients information and return Objects but it’s a bunch of just open pages in VSCode which I need to turn into a class and modules and a Psxml for some more complex views
1
u/gunnersmate_sc2 Oct 02 '26
MediaFileInfo A more modern powershell wrapper around MediaInfo with cross platform support for getting metadata from media file types like video, audio and images.
1
u/newboofgootin Oct 02 '26
Phone system API to sync business phone numbers into Entra directory.
1
u/No-Consideration6678 Oct 02 '26
"optimised" an existing script which we use to analyse the output from a Huawei CMTS for cable modems. It has a GUI using webview2.
This does a regex match for some data we want, but the struggle was getting NO match to trigger an error. Even though [regex]::matches() has a data type, if there is no match you get nothing / null. If you wrap it around ().gettype().fullname you get System.Text.RegularExpressions.Match, but if you | gm the empty content you get an error. Its not a stopping error to have no match.
Not that impressive really, but made me happy to clean up my previous slop :D
1
u/Yengling05 Oct 02 '26
Automatically sync live data to a reporting SQL instance from production SQL server and export to AWS S3 bucket for real time sales dashboard for a retail environment. Tied everything to Windows services to run unattended.
1
u/DhakaWolf Oct 03 '26
Wrote a function to parse listings from the Apple App Store and detect references to AI in the description. ( Compliance thing )
1
u/MFZozzy Oct 03 '26
Wrote a simple function that checks whether a file can be found in the folders listed in the PATH environment variable.
By default it returns True/False, but with a switch parameter returns the found file's full path as a string.
Thinking of adding another switch param so that it keeps looking in PATH folders even if it has found the file in question (to check if there are multiples).
I call it Test-InPATH.
1
u/sonic10158 Oct 05 '26
Sfc scannow and some dism’ing
1
u/warren_stupidity Oct 12 '26
Built some ad scripts to a) monitor the health of my homelab AD controllers (AD DNS DHCP) and plug that into prometheus and alertmanager b) a sort of DSC mechanism for removing and replacing obsolete servers and validating the end state.
1
u/Right-Brother6780 Oct 14 '26
Subscribed - thanks
1
u/Abacus_Gerard Oct 15 '26
I just finished a PowerShell 7 project that started as a way to estimate Microsoft 365 backup storage requirements.
It evolved into a tenant storage assessment tool that collects storage information from Exchange Online (including online archives), OneDrive, and SharePoint, including Teams-connected file storage.
It generates a console summary, CSV export, and a standalone HTML report with charts. There's also an optional backup cost estimator.
I've tested it against two production tenants and compared the Fast and Exact Exchange measurement modes.
It's my first public GitHub project, so feedback, suggestions, and constructive criticism are welcome.
Source code (MIT license):
https://github.com/Dasmail2000/M365-Tenant-Storage-Assessment?utm_source=chatgpt.com
1
u/Vern_Anderson Oct 16 '26
Used Invoke-ScriptAnalyzer to find a variable I defined in a script but later in the script it was never used. RuleName "PSUseDeclaredVarsMoreThanAssignments". Removed the unused variable and tested the script to ensure it still works. Apparently I started to define a variable at the top but later abandoned that notion and declared a differently named variable inside a foreach loop.
Which PSScriptAnalyzer rules do you ignore or find acceptable to ignore? I personally use Plural Nouns in foreach loops and it doesn't like it. Example: foreach ($File in $Files) {#Remember example of what you might do to a file}
1
u/[deleted] Oct 03 '26
[removed] — view removed comment