Deployed v2 of my automated offboarding scripts. Ms Form to PowerAutomate (with approval steps and scheduling function) to Azure Automations runbook to hybrid worker to run script filled with variables gathered along the way.
Script exports key attributes of the account to a txt file, including things like group membership, attributes, title, location etc, manager, direct reports. Removes all attributes, connects to EOL, convert to shared, add manager with full control, connect to Entra and revoke all active sessions. Connect to our sharepoint asset list and gather all assigned devices, send email to HR and manage to gather and return. Disable account, move to disabled OU. Send notification and log file into ticketing platform.
Thanks to most groups being dynamic, including access to SaaS platforms, 95% offboarding is done.
Thatâs cool⊠I was setting this up in my test lab but just the PowerShell side mostly.. my thought was to do this around power automate to trigger the script off
How do you setup the trigger? Does HR have just submit a form for onboarding or offboarding?
Created a script to grab all SharePoint site URLs, apply automatic versioning settings everywhere possible, trigger the automatic trim batch jobs, and then have a separate script loop through all sites to check the status of said jobs. It's worked well, I've even had Copilot analysing the results, which has also been surprisingly good given how crap I've found Copilot to be historically.
I did something similar for AD cleanup. We have tons of test computer objects that need to be cleaned up on a regular basis, so I have a monthly emailed report that looks back at anything more than 6 months not modified and does a dump of all details, who created, location, description, etc.
Technically anything I've created on the clock belongs to company so cannot share full script. But its fairly straight forward to piece together using:
Get-ChildItem -Path Cert:\LocalMachine\My
$_.NotAfter property to filter on expiry time
then a Send-MailMessage for the email/ticket
automated using Register-ScheduledTask and an xml import previously saved from test machine
Automated HP bios downloads to SCCM and created applications that manage bios upgrades and bios settings, all this within one script to make the deployment able for testing once execution is done.
Still some work left with this script but I'm really happy with the result.
Idempotent font installation script. Uses COM to fetch the name of the font using Shell.Application, copies the font if it doesnât already exist, creates registry entry if it doesnât exist. Has Force and Recurse options, and properly handles TTC and OTC font collections.
A reboot your PC message box to deploy with our RMM tool, with logic showing uptime, time remaining till restart, and snooze buttons. It's not much of a showstopper, but probably the longest PS script I've written (~200 lines) and I'm pretty proud of it.
Built a function that displays the users group membership (entrance &AD) in a tree structure. Mostly for presenting to end users as it easily illustrates nested groups. get-entragrouotree. ps1
In environments Iâve worked in, Exchange Online provisioning is typically handled downstream via directory sync and automation (dynamic groups, licensing rules, etc.), so I kept this focused on unattended identity creation rather than coupling it directly to O365.
If youâre referring to notification emails, the script writes structured logs locally by design. Notifications would be handled by the trigger/orchestration layer (e.g., Power Automate or a bootstrapper).
This was intentionally built as a reusable execution template, not a full end-to-end workflow.
I'll clean up the code a bit and remove some confidential stuff and reply once I have that. Basically, the structure is this:
- We have a private GitHub repo where all the scripts and relevant files we care about exist. - There is a script on this repo called New-ImagingISO.ps1 that converts a normal Windows 11 Business Versions ISO into our imaging ISO, by making all the necessary changes to the image. This allows technicians to easily make new versions of images when there's a new Windows feature release for example.
New-ImagingISO.ps1 prompts you for the Win11 ISO, the Language and Optional Features ISO (mainly just to enable WMIC), and then modifies the image using Windows ADK. It adds WinPE packages to allow for using PowerShell and running PS scripts in WinPE. It also modifies the WinPE environment so that instead of booting automatically into Windows Setup like a normal Windows ISO, it instead boots directly into a PowerShell script (Test-NetworkConnectivity.ps1).
Test-NetworkConnectivity.ps1 just kind of does what it says on the tin, it checks the PC is network connected, if it's not, prompts you to. Once connected, it then downloads another script: Start-Imaging.ps1 from the GitHub repo, and launches right into it. I chose to break up Test-NetworkConnectivity.ps1 and Start-Imaging.ps1 like this so that I could make changes to the actual imaging script without having to create a new ISO, so when technicians image, they are always getting the latest version of the script regardless.
Start-Imaging.ps1 formats and partitions the disk, installs drivers into WinPE, and then shows a fancy Winforms that allows the technician to customize the image being installed onto the computer (the Winforms shows fields to set a unique hostname, domain join to a specific OU, set the BIOS asset tag, and prompts for credentials for joining the domain). It then installs Windows. After install, the script places marker files on the newly created C: Windows drive based on what you selected in the Winforms. It then downloads the next script that will launch automatically in the Windows install to shell:common startup in the new Windows install.
I'll sanitize everything and put it in a repo here for you, might just take me a little bit.
For sure, so the DomainComputer CSVs are meant to represent an export of all the domain computer objects that exist in AD, for each domain. At my company, we have this setup as an hourly scheduled task on a jumpbox that exports the list, then uploads these CSV files to our repo.
If you selected to change the hostname in the Winforms, Start-Imaging.ps1 will download Dom1/Dom2.csv (depending on what domain you selected in the Winforms), and check that the hostname you entered in the form does not currently exist as a computer object on the CSV. This is because if you try domain joining with the same computer account (at least in our environment), the entire domain join fails.
If a match is detected between the name you entered and the names on the CSV, you receive a message box asking if you want to retry with a different name, or ignore the error and continue anyway.
The drivers that are included on the repo are just WinPE driver packs from HP/Dell/Lenovo. They exist there for the basics to work in WinPE, like networking and storage, but don't actually install most useful drivers into the live OS. Which WinPE drivers are applied depends on what the manufacturer of the computer is. The logic for this is in the Test-NetworkConnectivity.ps1 script, lines 161-209.
What we use to install drivers within Windows is HPIA for HPs, Dell Command Update for Dells, and LSUClient for Lenovos. If that's what you mean, I can give you some code examples of how we have that implemented.
Ah ok, that makes sense for the domain. We used to have that, but instead limited who can join things to the domain to get rid of it. makes sense tho!
I'd love to see the Driver side for the within Windows as well.
My ultimate goal is to wrap all this into a pxe boot as well, which doesn't look too difficult since you're already building wims and such, just would need to repoint the drivers/etc. from the UsbDrive ramdisk
I made a powershell Claude code skill with some additional enhancements to keep it up to date with powershell docs and tools. I added the official docs and gallery as sources it uses live. I also made a plugin that contains an autonomous powershell developer agent with a skill and hooks that check coding patterns for safety as it works.
As a sysadmin, I try to automate every daily task I encounter. I constantly iterate on my functions until Iâm happy with the code, then I compile them into a module that grows by about one or two functions every few weeks.
Recently, I noticed a spike in "Teams not working/updating" tickets, so I built a robust Install-RemoteTeams function. My whole team uses it nowâhappy colleagues, happy clients, happy everyone.
If youâre interested, you can find it in my module:
Regarding ARM - frankly there was no need in our environment yet, but it's a great feature to have, so I will implement it soon with additional installers based on $Architecture = $env:PROCESSOR_ARCHITECTURE
I had issues with determing arm processor with $env:PROCESSOR_ARCHITECTURE Don't remember what my issue was, but my solution was to use Get-CimInstance Win32_operatingsystem -Property OSArchitecture | Select-Object OSArchitecture
I started investigating whether it's even feasible to attempt using PowerShell in the One Billion Row Challenge.
I iterated through different ideas. I used the ReadLine() method from the StreamReader class. Then I tried the Read() method and buffering, and iterating through a char array in case ReadLine added some weird overhead.
I tried treating the double/float values as integers (remove the decimal point) and then just dividing by 10 at the end. Turns out floating point arithmetic doesn't seem to add any kind of overhead - at least nothing noticeable in the small sample I used.
Same goes for calculating/updating the average/mean on every iteration, and not just in the final "tidy up" loop. I think that's more to do with the small sample though, and limited number of times each weather station entry appeared. So I think I need to recreate the sample data with a smaller number of station names, so it iterates through each more frequently.
I ran out of time to dig into the various attempts at profiling, so couldn't pinpoint the actual bottleneck. It also didn't help that each run needed to be done about five times just to narrow the actual result down.
I used a class to structure the data being captured in a hashtable, so if I feel the itch to explore again, I'd likely move away from that and use a hash of hashes - the only method for the class was for initialisation so there's no real need for it. Once I make these changes, I'd then explore runspaces I think using thread-safe collections - try and stop IO from blocking the processing.
Well... that turned into more of a ramble than I anticipated!
I work in DevOps and got the task to migrate the perl script into powershell for sccm application. Previously we had multiple cmd and perl script files. But now we have a single powershell file that manages all the tasks.
The main task was to migrate the sccm program to application. Don't ask me about sccm, as I'm completely new to this.
Iâve just (in the last 48hrs) started to learn PowerShell, so my actual physical achievement is remembering how to turn it on.
What Iâm trying to learn how to do is work around a Nuance Dragon limitation with list variables in commands. The version I have has Advanced Scripting locked and all attempts to get it unlocked have resulted in a big, fat, no.
So Iâm learning PowerShell so I can:
Use Dragon to copy some text I need converting to the clipboard
Have PowerShell pull the text from the clipboard and convert it to the two letter code I need
Have PowerShell put the code back onto the clipboard
Use Dragon to paste the code and then carry on with the step by step macro
I really, really donât need to do this and I know it. But Iâm curious as to whether I can do it now Iâve found out itâs a possibility.
Made a script to "manually" replicate (robocopy) GPOs, because our gpo replication is bricked and the msp's answer was "yeah idk why, we'll fix it when we replace the current servers".
This is kind of nuts. If that is broken, there are likely other significant issues with your AD environment. Replacing domain controllers will probably not fix that issue.
I connect remotely to Linux hosts from Windows 11 and wrote scripts that will automatically initiate the connections and tile them. PowerToys wasnât an option but Windows Terminal has built in support for it so I used that.
Iâd still need an external monitor if I ever needed to go beyond 8 simultaneous sessions however. 2 rows of 4 columns seems like a usability limit.
It would be neat if I could set a key combination that would toggle on/off the ability to send commands simultaneously to each session.
Iâm thinking of using a keyboard command that would toggle broadcast mode. Windows Terminal supports Send-Input which I could wrap in a powershell loop that would cycle between Focus-Pane and Send-Input and I could pretty much have something like tmux.
It would be useful in cases where I may be doing deployments, tailing logs, running single-purpose commands. Stuff that you wouldnât necessarily need to automate in a puppet, ansible, etc.
Toggling could be capturing something like CTRL+Shift+B, for example, to enable/disable broadcast mode.
Created an azure automation run book that pulls all audit logs from my website hosting platform, saves them as a variable, deduplicating any already accounted for, then it sends the new logs to my log analytics workspace.
With AIs help built a service so I can schedule powershell scripts to run via cron schedule and the script or command can be supplied as an environment variable so I can keep everything in the docker-compose.yml file https://github.com/nickadam/pwsh-cron
Recently was working on querying a Snowflake table (via SnowSQL) of our internal ITSM system tickets to have the AI roll a custom HTML formatted email with the tickets based on a certain filter (local office, recent timeframe) and then aside from listing some key columns from the records, create an AI summary / action plan it thinks would help prioritize initial work flow for the recipients. Then it emails it using existing functions I have already in place.
Is a nice during coffee read from what's being on since end of work the previous day, so can shift the work day accordingly.
Keeping the self service portal profiles up to date with the latest apps. For some reason, that's not an option natively. Works great with the script, though.
Also automatically updating apps in Tanium from Github and Winget based on a CSV.
It's with powershell, but really just their rest API.
Building out a script to automate about a thousand computers to update their bios for the Secure Boot certificate.
Our RMM manages updates normally so the computers aren't requesting the new Active DB cert from MS and a lot of them are reporting back that they don't have the Default DB cert updated either, so gotta manage that too.
To make things more fun, its a mixture of Dell, Lenovo and HP so I'm having to deploy 3 different systems to do all this.
Not this month but last month I created our Intune and Configuration Manager script which runs on a schedule and performs a health check on both. It'll send an email to administrators in HTML format.
The next phase is to use agentic AI to perform some basic remediations (PoC) still trying to get process fixed but it should be easy to create it. The agentic AI is both proactive and reactive...
I updated my Hardware Monitoring Datto RMM monitoring script, that used Libre Hardware Monitor. I had to disable it for quite a while, because there was a huge security vulnerability in the WinRing0 driver, now LHM has a stable release based on PawnIO.
I would love to, but cant. A lot of things in it are environment specific. Would take a lot of time to get it in a state where it would be usable to others and is completely sanitized.
Upgraded the IHM linked to our Pull DSCv2 server (managing around 500 Windows servers, from Win2k16 to Win2k22). We handle configuration consistency checks, Chocolatey package upgrades, WinHTTP proxy configuration, and Git repository sync on selected servers. We now have the equivalent of Azure Automation, but fully on-premises.
Since we implemented an API on the DSC protocol, we can use Zabbix to monitor if servers encounter errors during consistency checks, track the last communication time, and verify if a target server has retrieved the updated configuration.
Gitlab pipeline auto compile needed MOF files when PSD files are updated and push it into DSC infra using API calls. Terraform auto-register servers to DSC infra with tags (env, application...).
We built our own DSC pull/report server backed by SQL.
Terraform pushes node metadata at provisioning time (env, app, hostgroup, OS) into the DB. On the DSC side, we use a ~30-line PowerShell script that merges multiple PSD1 files with priority (node > app> hostgroup > env > OS), basically GPO-style, to generate MOFs.
It handles Chocolatey auto-updates or version pinning, registry values, Git repo sync, WinHTTP proxy (way easier than GPOâŠ), file content management, DNS zone deployment, etc. Compliance runs every 2 hours. Everything is visible in a web UI + API (token auth): reports, node discovery if a server stops talking to DSC, and detailed LCM lifecycle errors â makes troubleshooting much faster.
Day-to-day changes are usually just adding a line in a PSD1.
All configs live in Git (gitlab), and a runner validates PSD1 + compiles MOFs on merge requests.
I created a script that, when run every 15 minutes by the task scheduler, pings an IP address that I specify in the script call. If the ping is successful, a notification popup appears to alert me.
I use it for installing new printers: I already have the MAC address, which allows me to reserve IP addresses which allows me to ping. This way, I can enable the scan-to-email service on the printer (which is IP-restricted in my company), add it to a print server, and send an email to the designated user with instructions on how to install the printer from that print server. These actions must be done manually because the systems are managed differently through web interfaces (and some admins behind them don't want any automation...)
Figured out how to cat a PowerShell script to a variable via ssh and then run that variable from memory. Just so I don't leave my install scripts behind for some else that read.
Current now converting that script with a console menu.
I literally wrote loving off the land script that encrypts an entire sharepoint targetâŠ. All for the sake of BCP and DR testing. I also write another script to generate any numeber of files that dynamically adjusts file sizes to meet an overall target size. For example. It will generate 15k files all adjusted in size to meet a 120GB size target. The two paired together make for a great test tool for a backup restoration and alert testing.
Built a script to gather last check-in/online time from all our management systems to help audit for stale device records. RMM platform, AD, Intune, Entra and SCCM.
But now I'm thinking I should have spent that time doing this in PowerBI as it would be faster once built. The script is a bit slow. May tweak it to run in PowerShell v7 to take advantage of parallel threads.
I asked Copilot to write a powershell script to retrieve build statistics from Azure DevOps, and then had to guide it through making the script less rubbish. It was using write-host, IWR, += on arrays, not using parallel processing it wrote the bulk of the script faster than me but then I had to fix it and make it work.
I created a modular uninstall script to uninstall applications.
Use that to uninstall applications via SCCM.
Whenever a new application is to be added for removal I just use SCCM hardware inventory to pull uninstall command stick it into the new model of same name.
I use this solution to create a task sequence to remove all old versions of that application and then install latest version.
Easy to remove apps or all versions of any app so that when deployed say 200 machines all with different versions of that same application I can remove all using the single script and then next step installs latest version.
My devops about 2 years ago built some offboarding automation to remove members from groups during offboarding. However itâs not retroactive so our environment is peppered with disabled users and computers. So I went ahead and wrote an object discovery tool with PS to show mgmt. that is going to be Monday. Fun times ahead.
I created a script that allows me to interact from the command line to share an Outlook 365 calendar with another user for those users who don't know how to do it themselves. I then added the ability to set an OOO for those users who forget to do so.
Early this month i finished my Auto Backup script just so that getting back to business after a OS reinstall or crash would be less pain full. And i am so glad that i did.. Yesterday my Windows 11 crapped out on me and i had to boot on a iso and reinstall. But all my stuff was saved on my NAS.
Had that running every hour and that really saved my plex server among other things :) Its nothing new but works really well as a light weight backup solution.
.SYNOPSIS
Automates multi-threaded folder backups to a local, NAS, or Cloud destination using Robocopy.
.DESCRIPTION
Run-AutoBackup is a high-performance backup wrapper for Robocopy.
It leverages PowerShell 7 parallel processing to backup multiple directories simultaneously
while using Robocopy's multi-threading for individual files.
It is pre-configured with parameters to handle common NAS/Cloud quirks,
such as timestamp rounding (/FFT) and daylight saving time shifts (/DST).
It also supports granular file and directory exclusions to optimize backup times.
.EXAMPLE
$sources = @(
"C:\Users\Martin\GitHub-Harze2k"
"C:\Users\Martin\AppData\Local\zen"
"C:\Users\Martin\AppData\Local\Plex Media Server"
"C:\Users\Martin\AppData\Local\qBittorrent"
"C:\Users\Martin\AppData\Roaming\zen"
"C:\Users\Martin\AppData\Local\Zen Browser"
"C:\Users\Martin\AppData\Roaming\mpv.net"
"C:\Users\Martin\AppData\Roaming\Code - Insiders"
"C:\Users\Martin\AppData\Roaming\SVP4"
"C:\Users\Martin\Documents\PowerShell"
"C:\Toolkit\Toolkit_v13.7\Data"
"C:\Toolkit\Toolkit_v13.7\Custom"
"C:\Temp"
"C:\Program Files\PowerShell\Modules"
"C:\Program Files\totalcmd"
)
$excludeDirs = @(
"C:\Users\Martin\GitHub-Harze2k\NodeJs"
"C:\Users\Martin\AppData\Local\Plex Media Server\Cache"
)
$excludeFiles = @("parent.lock", "*.log", "*.tmp", "*.temp", "*.cache", "*.bak", "~*", "Thumbs.db", "desktop.ini")
Run-AutoBackup -SourcePaths $sources -DestinationBase "G:\AutoBackup" -ExcludeDirectories $excludeDirs -ExcludeFiles $excludeFiles
I have a variety of Linux distros on Windows Subsystem for Linux (WSL), which I setup manually. There's often a bit of nuance involved with manual imports and when working with distros that don't use systemd (supported by default).
As a test case, I've been working on a script to bootstrap the installation of Alpine Linux on WSL with cloud-init. The script is on Github, if it's of interest to anyone.
Found a way to run a cmdlet meant to be run only on a DC from my computer. Obviously the right module needs to be installed on the DC, imported through invoke command if needed, run the script with the right user level access.
... Its 54 lines of code and comments to detect the available DCs in a nice selectable menu format instead of me connecting to a DC and running 1 line of code on it, but THINK OF THE POTENTIAL !!!
I am using invoke-command. I didn't create something new, merely adapted and combined a bunch of things that were already there to fuel my efficient lazy mess.
This month (February into early March 2026), I've been deeply focused on enhancing my Windows-SysAdmin-ProSuite PowerShell toolkit, with a strong emphasis on WSUS administration and Active Directory reliability. I polished several WSUS-related scripts, including major updates to Maintenance-WSUS-Admin-Tool.ps1, Check-WSUS-AdminAssembly.ps1, Inventory-WSUSEnvironment.ps1 (later renamed to Inventory-WSUS-Environment.ps1 for consistency), and Generate-WSUSReindexScript.ps1. I also introduced new SQL helpers such as SUSDB-WID-IndexMaintenance-Reindex-UpdateStats.sql and wsusdbmaintenance-classic.sql, along with refinements to wsus-reindex-smart.sql and wsus-verify-fragmentation.sql, all aimed at improving database index maintenance, fragmentation detection, and automated reindexing in bloated WSUS environments.
On the Active Directory side, I renamed and upgraded Synchronize-ADForestDCs.ps1 to Synchronize-n-HealthCheck-ADForestDCs.ps1, adding built-in health-check capabilities alongside DC synchronization. I further standardized naming conventions across key WSUS scripts (e.g., adding hyphens), made tweaks to related tools like Create-n-Retrieve-DHCPReservations.ps1, and kept the repository documentation fresh with multiple README.md updates and automated daily README card refreshes via GitHub Actions.
Mid-month, I tagged and released BlueTeam-Tools-20260223-ce1c73b as a milestone for the defensive security and forensics utilities within the suite. Overall, it was a productive month of practical polish, reliability enhancements, and real enterprise ops value for Windows, AD, and WSUS administrators - reflected in the repo's ongoing activity, now at over 4,150 commits with the latest changes confirmed as of late February 2026 on my GitHub profile at https://github.com/brazilianscriptguy/.
Multiple scripts to populate AD with users from CSVs daliy given by the id manager Who is 3rd party to our client. The scripts change what attributes or groups needs to be changed if a user changes in the given csv or create the users + gives them their rights in a heaviliy secured and tiered environnent.
It's a fuckin' non-optimised vibe coded mess because this whole thing should have been made by someone who knows how to properly dev pwsh but the sales Guy signed with the client for a turbo-minimal price in hope we would get the whole market after delivering a poc wich turned to be production. đ€Ą
In February? Nothing, it's the first day of the month, it's a Sunday, and as of 6:45 AM I started my day off with a VBA. It is now 10:22 AM and I finished that up about 90 minutes ago. Tomorrow I'll work on my user audit ps1 file then move it to deactivation/ destruction.
29
u/Infinite-Stress2508 Feb 01 '26
Deployed v2 of my automated offboarding scripts. Ms Form to PowerAutomate (with approval steps and scheduling function) to Azure Automations runbook to hybrid worker to run script filled with variables gathered along the way.
Script exports key attributes of the account to a txt file, including things like group membership, attributes, title, location etc, manager, direct reports. Removes all attributes, connects to EOL, convert to shared, add manager with full control, connect to Entra and revoke all active sessions. Connect to our sharepoint asset list and gather all assigned devices, send email to HR and manage to gather and return. Disable account, move to disabled OU. Send notification and log file into ticketing platform.
Thanks to most groups being dynamic, including access to SaaS platforms, 95% offboarding is done.
7
u/RichN Feb 01 '26
Created a script to grab all SharePoint site URLs, apply automatic versioning settings everywhere possible, trigger the automatic trim batch jobs, and then have a separate script loop through all sites to check the status of said jobs. It's worked well, I've even had Copilot analysing the results, which has also been surprisingly good given how crap I've found Copilot to be historically.
4
u/andyr354 Feb 01 '26
Wrote scripts to standardize the creation and removal on our Hyper-V hosts.
4
u/tdez11 Feb 01 '26
AD/Entra ID cleanup, finds stale objects and outputs into CSV with each object type (user, computer, OU, etc.) on its own page
4
u/R0B0T_jones Feb 01 '26
Scheduled script to check for expiring tls certs on web servers, then send email/raise ticket for renewal.
3
u/StigaPower Feb 01 '26
Automated HP bios downloads to SCCM and created applications that manage bios upgrades and bios settings, all this within one script to make the deployment able for testing once execution is done.
Still some work left with this script but I'm really happy with the result.
3
u/ihartmacz Feb 01 '26 edited Feb 01 '26
Idempotent font installation script. Uses COM to fetch the name of the font using Shell.Application, copies the font if it doesnât already exist, creates registry entry if it doesnât exist. Has Force and Recurse options, and properly handles TTC and OTC font collections.
Edit: fixed typo. :)
3
u/eberndt9614 Feb 01 '26 edited Feb 01 '26
A reboot your PC message box to deploy with our RMM tool, with logic showing uptime, time remaining till restart, and snooze buttons. It's not much of a showstopper, but probably the longest PS script I've written (~200 lines) and I'm pretty proud of it.
3
u/itscum Feb 09 '26
Built a function that displays the users group membership (entrance &AD) in a tree structure. Mostly for presenting to end users as it easily illustrates nested groups. get-entragrouotree. ps1
2
u/Brasiledo Feb 01 '26 edited Feb 01 '26
Built a non-interactive AD onboarding script in a test lab, driven entirely by CSV input.
Current features:
The end goal is to trigger this via Power Automate (e.g., MS Form)
This was built in a test lab, but designed to be reusable:
the following components can be swapped
Power Automate would just act as the trigger.
Script here: https://pastebin.com/LFM0m9FF
Inspired to post after /u/Infinite-Stress2508
2
u/Jonathan_Rambo Feb 01 '26
If you mean january - i wrote a script to share a file in Teams with all members of a group in azure using graph, that was something
2
u/OneLandscape2513 Feb 02 '26
Fully automated Windows imaging with software installation, replacing SCCM entirely in our environment
2
u/eth03 Feb 03 '26
I made a powershell Claude code skill with some additional enhancements to keep it up to date with powershell docs and tools. I added the official docs and gallery as sources it uses live. I also made a plugin that contains an autonomous powershell developer agent with a skill and hooks that check coding patterns for safety as it works.
https://github.com/hmohamed01/claude-code-plugins/tree/main/powershell-developer
https://github.com/hmohamed01/powershell-expert
2
u/mapi8472 Feb 06 '26
As a sysadmin, I try to automate every daily task I encounter. I constantly iterate on my functions until Iâm happy with the code, then I compile them into a module that grows by about one or two functions every few weeks.
Recently, I noticed a spike in "Teams not working/updating" tickets, so I built a robust Install-RemoteTeams function. My whole team uses it nowâhappy colleagues, happy clients, happy everyone.
If youâre interested, you can find it in my module:
Install-Module MapiADtools
Gallery Link: https://www.powershellgallery.com/packages/MapiADTools/1.6.0
2
u/fr0mtheinternet Feb 09 '26
I started investigating whether it's even feasible to attempt using PowerShell in the One Billion Row Challenge.
I iterated through different ideas. I used the ReadLine() method from the StreamReader class. Then I tried the Read() method and buffering, and iterating through a char array in case ReadLine added some weird overhead.
I tried treating the double/float values as integers (remove the decimal point) and then just dividing by 10 at the end. Turns out floating point arithmetic doesn't seem to add any kind of overhead - at least nothing noticeable in the small sample I used.
Same goes for calculating/updating the average/mean on every iteration, and not just in the final "tidy up" loop. I think that's more to do with the small sample though, and limited number of times each weather station entry appeared. So I think I need to recreate the sample data with a smaller number of station names, so it iterates through each more frequently.
I ran out of time to dig into the various attempts at profiling, so couldn't pinpoint the actual bottleneck. It also didn't help that each run needed to be done about five times just to narrow the actual result down.
I used a class to structure the data being captured in a hashtable, so if I feel the itch to explore again, I'd likely move away from that and use a hash of hashes - the only method for the class was for initialisation so there's no real need for it. Once I make these changes, I'd then explore runspaces I think using thread-safe collections - try and stop IO from blocking the processing.
Well... that turned into more of a ramble than I anticipated!
2
u/Krn_O1 Feb 11 '26
I work in DevOps and got the task to migrate the perl script into powershell for sccm application. Previously we had multiple cmd and perl script files. But now we have a single powershell file that manages all the tasks.
The main task was to migrate the sccm program to application. Don't ask me about sccm, as I'm completely new to this.
2
u/RealSharpNinja Feb 19 '26
I just uploaded a big enhancement to my PoweShell Snippets system. It's free and available at https://github.com/PS-Services/Snippets
2
u/Sirenskye Feb 20 '26
Iâve just (in the last 48hrs) started to learn PowerShell, so my actual physical achievement is remembering how to turn it on.
What Iâm trying to learn how to do is work around a Nuance Dragon limitation with list variables in commands. The version I have has Advanced Scripting locked and all attempts to get it unlocked have resulted in a big, fat, no.
So Iâm learning PowerShell so I can:
I really, really donât need to do this and I know it. But Iâm curious as to whether I can do it now Iâve found out itâs a possibility.
Edit: Mobile formatting
1
u/evasive_btch Feb 01 '26
Made a script to "manually" replicate (robocopy) GPOs, because our gpo replication is bricked and the msp's answer was "yeah idk why, we'll fix it when we replace the current servers".
Making a module out of it hopefully soon.
1
u/jr49 Feb 01 '26
My own module with two functions. One to generate a graph API token and another to handle paging results.
1
u/p001b0y Feb 01 '26
I connect remotely to Linux hosts from Windows 11 and wrote scripts that will automatically initiate the connections and tile them. PowerToys wasnât an option but Windows Terminal has built in support for it so I used that.
Iâd still need an external monitor if I ever needed to go beyond 8 simultaneous sessions however. 2 rows of 4 columns seems like a usability limit.
It would be neat if I could set a key combination that would toggle on/off the ability to send commands simultaneously to each session.
1
u/gringoloco01 Feb 01 '26
Veeam reporting total backups, total success, total fail, total completed with errors.
1
u/Any-Virus7755 Feb 01 '26
Created an azure automation run book that pulls all audit logs from my website hosting platform, saves them as a variable, deduplicating any already accounted for, then it sends the new logs to my log analytics workspace.
1
u/nickadam Feb 01 '26
With AIs help built a service so I can schedule powershell scripts to run via cron schedule and the script or command can be supplied as an environment variable so I can keep everything in the docker-compose.yml file https://github.com/nickadam/pwsh-cron
1
u/bodobeers2 Feb 01 '26
Recently was working on querying a Snowflake table (via SnowSQL) of our internal ITSM system tickets to have the AI roll a custom HTML formatted email with the tickets based on a certain filter (local office, recent timeframe) and then aside from listing some key columns from the records, create an AI summary / action plan it thinks would help prioritize initial work flow for the recipients. Then it emails it using existing functions I have already in place.
Is a nice during coffee read from what's being on since end of work the previous day, so can shift the work day accordingly.
1
u/8-16_account Feb 01 '26
For Tanium:
Keeping the self service portal profiles up to date with the latest apps. For some reason, that's not an option natively. Works great with the script, though.
Also automatically updating apps in Tanium from Github and Winget based on a CSV.
It's with powershell, but really just their rest API.
1
u/Dragennd1 Feb 01 '26
Building out a script to automate about a thousand computers to update their bios for the Secure Boot certificate.
Our RMM manages updates normally so the computers aren't requesting the new Active DB cert from MS and a lot of them are reporting back that they don't have the Default DB cert updated either, so gotta manage that too.
To make things more fun, its a mixture of Dell, Lenovo and HP so I'm having to deploy 3 different systems to do all this.
1
u/AcceptableFuel5064 Feb 01 '26
Not this month but last month I created our Intune and Configuration Manager script which runs on a schedule and performs a health check on both. It'll send an email to administrators in HTML format.
The next phase is to use agentic AI to perform some basic remediations (PoC) still trying to get process fixed but it should be easy to create it. The agentic AI is both proactive and reactive...
1
u/vlkr Feb 01 '26
Script to switch between two audio devices.
1
u/g3n3 Feb 01 '26
Cim and ad proxy functions with formatters and types. Compacting the path. Chezmoi work.
1
u/_Buldozzer Feb 01 '26
I updated my Hardware Monitoring Datto RMM monitoring script, that used Libre Hardware Monitor. I had to disable it for quite a while, because there was a huge security vulnerability in the WinRing0 driver, now LHM has a stable release based on PawnIO.
1
u/chaosphere_mk Feb 01 '26
Created a forest to forest fileserver ReACL script for migration purposes.
1
u/Rwinarch Feb 01 '26
The usual API wrappers that I build because I hate using python
1
u/gerardlemetayerc Feb 01 '26
Upgraded the IHM linked to our Pull DSCv2 server (managing around 500 Windows servers, from Win2k16 to Win2k22). We handle configuration consistency checks, Chocolatey package upgrades, WinHTTP proxy configuration, and Git repository sync on selected servers. We now have the equivalent of Azure Automation, but fully on-premises.
Since we implemented an API on the DSC protocol, we can use Zabbix to monitor if servers encounter errors during consistency checks, track the last communication time, and verify if a target server has retrieved the updated configuration.
Gitlab pipeline auto compile needed MOF files when PSD files are updated and push it into DSC infra using API calls. Terraform auto-register servers to DSC infra with tags (env, application...).
1
u/Particular_Fish_9755 Feb 01 '26
I created a script that, when run every 15 minutes by the task scheduler, pings an IP address that I specify in the script call.
If the ping is successful, a notification popup appears to alert me.
I use it for installing new printers: I already have the MAC address, which allows me to reserve IP addresses which allows me to ping.
This way, I can enable the scan-to-email service on the printer (which is IP-restricted in my company), add it to a print server, and send an email to the designated user with instructions on how to install the printer from that print server.
These actions must be done manually because the systems are managed differently through web interfaces (and some admins behind them don't want any automation...)
1
u/atl-hadrins Feb 01 '26
Figured out how to cat a PowerShell script to a variable via ssh and then run that variable from memory. Just so I don't leave my install scripts behind for some else that read.
Current now converting that script with a console menu.
1
u/UnderstandingHour454 Feb 02 '26
I literally wrote loving off the land script that encrypts an entire sharepoint targetâŠ. All for the sake of BCP and DR testing. I also write another script to generate any numeber of files that dynamically adjusts file sizes to meet an overall target size. For example. It will generate 15k files all adjusted in size to meet a 120GB size target. The two paired together make for a great test tool for a backup restoration and alert testing.
1
u/whatudrivin Feb 02 '26
Built a script to gather last check-in/online time from all our management systems to help audit for stale device records. RMM platform, AD, Intune, Entra and SCCM.
But now I'm thinking I should have spent that time doing this in PowerBI as it would be faster once built. The script is a bit slow. May tweak it to run in PowerShell v7 to take advantage of parallel threads.
1
u/RefrigeratorGlo412 Feb 02 '26
I started to put all my scripts into functions, so that I can have a cookbook ready with all the scripts I need for daily work.
1
u/phony_sys_admin Feb 02 '26
Not fully PowerShell, but using com object with it to modify a word document
1
u/ThatKingLizzard Feb 02 '26
Improved my Powershell library for Azure DevOps integration with Snyk and repo policies.
1
u/ps_for_fun_and_lazy Feb 03 '26
I asked Copilot to write a powershell script to retrieve build statistics from Azure DevOps, and then had to guide it through making the script less rubbish. It was using write-host, IWR, += on arrays, not using parallel processing it wrote the bulk of the script faster than me but then I had to fix it and make it work.
1
u/ashodhiyavipin Feb 03 '26
I created a modular uninstall script to uninstall applications.
Use that to uninstall applications via SCCM.
Whenever a new application is to be added for removal I just use SCCM hardware inventory to pull uninstall command stick it into the new model of same name.
I use this solution to create a task sequence to remove all old versions of that application and then install latest version.
Easy to remove apps or all versions of any app so that when deployed say 200 machines all with different versions of that same application I can remove all using the single script and then next step installs latest version.
1
u/Hot-Government6010 Feb 06 '26
Morning,
Not been doing PS long but managed the following
Script to Scan for PC's\Laptops and report back on all info (Current User\Mem\HD Space\Last rebooted) and Generate a Excel doc via Excel Macros
Script to list users OST files on a PC and report Size & Last Used
Script to Clear all temp folders from all profiles on a certain PC
Currently trying to get a script to set Zebra Darkness levels to 25 if they change back to 0
1
u/Snoo_60785 Feb 07 '26
My devops about 2 years ago built some offboarding automation to remove members from groups during offboarding. However itâs not retroactive so our environment is peppered with disabled users and computers. So I went ahead and wrote an object discovery tool with PS to show mgmt. that is going to be Monday. Fun times ahead.
1
u/Wesmosis Feb 12 '26
winget upgrade
1
u/paolgiacometti Feb 14 '26
I created a script that allows me to interact from the command line to share an Outlook 365 calendar with another user for those users who don't know how to do it themselves. I then added the ability to set an OOO for those users who forget to do so.
1
u/Mafamaticks Feb 18 '26
I started to port a python GitHub project over to PowerShell
1
u/Harze2k Feb 24 '26
Early this month i finished my Auto Backup script just so that getting back to business after a OS reinstall or crash would be less pain full. And i am so glad that i did.. Yesterday my Windows 11 crapped out on me and i had to boot on a iso and reinstall. But all my stuff was saved on my NAS.
https://github.com/Harze2k/Shared-PowerShell-Functions/blob/main/Run-AutoBackup.ps1
Had that running every hour and that really saved my plex server among other things :)
Its nothing new but works really well as a light weight backup solution.
1
u/pbrutsche Feb 25 '26
Continued work on a PowerShell script that pulls VLAN & prefix information from NetBox, and configures a factory reset FortiGate
1
u/JandyRids Feb 25 '26
I have a variety of Linux distros on Windows Subsystem for Linux (WSL), which I setup manually. There's often a bit of nuance involved with manual imports and when working with distros that don't use systemd (supported by default).
As a test case, I've been working on a script to bootstrap the installation of Alpine Linux on WSL with cloud-init. The script is on Github, if it's of interest to anyone.
1
u/CryktonVyr Feb 27 '26
Found a way to run a cmdlet meant to be run only on a DC from my computer. Obviously the right module needs to be installed on the DC, imported through invoke command if needed, run the script with the right user level access.
... Its 54 lines of code and comments to detect the available DCs in a nice selectable menu format instead of me connecting to a DC and running 1 line of code on it, but THINK OF THE POTENTIAL !!!
1
u/Historical-Poetry537 Mar 01 '26 edited Mar 01 '26
This month (February into early March 2026), I've been deeply focused on enhancing my Windows-SysAdmin-ProSuite PowerShell toolkit, with a strong emphasis on WSUS administration and Active Directory reliability. I polished several WSUS-related scripts, including major updates to Maintenance-WSUS-Admin-Tool.ps1, Check-WSUS-AdminAssembly.ps1, Inventory-WSUSEnvironment.ps1 (later renamed to Inventory-WSUS-Environment.ps1 for consistency), and Generate-WSUSReindexScript.ps1. I also introduced new SQL helpers such as SUSDB-WID-IndexMaintenance-Reindex-UpdateStats.sql and wsusdbmaintenance-classic.sql, along with refinements to wsus-reindex-smart.sql and wsus-verify-fragmentation.sql, all aimed at improving database index maintenance, fragmentation detection, and automated reindexing in bloated WSUS environments.
On the Active Directory side, I renamed and upgraded Synchronize-ADForestDCs.ps1 to Synchronize-n-HealthCheck-ADForestDCs.ps1, adding built-in health-check capabilities alongside DC synchronization. I further standardized naming conventions across key WSUS scripts (e.g., adding hyphens), made tweaks to related tools like Create-n-Retrieve-DHCPReservations.ps1, and kept the repository documentation fresh with multiple README.md updates and automated daily README card refreshes via GitHub Actions.
Mid-month, I tagged and released BlueTeam-Tools-20260223-ce1c73b as a milestone for the defensive security and forensics utilities within the suite. Overall, it was a productive month of practical polish, reliability enhancements, and real enterprise ops value for Windows, AD, and WSUS administrators - reflected in the repo's ongoing activity, now at over 4,150 commits with the latest changes confirmed as of late February 2026 on my GitHub profile at https://github.com/brazilianscriptguy/.
1
u/esfirmistwind Feb 01 '26
Multiple scripts to populate AD with users from CSVs daliy given by the id manager Who is 3rd party to our client. The scripts change what attributes or groups needs to be changed if a user changes in the given csv or create the users + gives them their rights in a heaviliy secured and tiered environnent.
It's a fuckin' non-optimised vibe coded mess because this whole thing should have been made by someone who knows how to properly dev pwsh but the sales Guy signed with the client for a turbo-minimal price in hope we would get the whole market after delivering a poc wich turned to be production. đ€Ą
1
u/dalinxz Feb 01 '26
Kept it closed
1
u/davcreech Feb 01 '26
All kinds of thingsâŠbut I cheat and use ChatGPT!
1
u/[deleted] Feb 01 '26
In February? Nothing, it's the first day of the month, it's a Sunday, and as of 6:45 AM I started my day off with a VBA. It is now 10:22 AM and I finished that up about 90 minutes ago. Tomorrow I'll work on my user audit ps1 file then move it to deactivation/ destruction.
-11
u/XInsomniacX06 Feb 01 '26
Ask ChatGPT lol
35
u/[deleted] Feb 01 '26
[removed] â view removed comment
2
u/[deleted] Feb 01 '26
[removed] â view removed comment