Join Chapter Files into One Manuscript with PowerShell
Stitch a folder of Markdown or text chapter files into one full manuscript, in the right order, with a title block and a word count that's never out of date.
Thread: Tools for the writing desk ↗Tagged · 87 notes
Everything tagged PowerShell, wherever it's filed, newest first.
Stitch a folder of Markdown or text chapter files into one full manuscript, in the right order, with a title block and a word count that's never out of date.
Thread: Tools for the writing desk ↗Group the USA, Europe, Japan and revised versions of each game in a folder of backups, keep the one you'd actually play, and move the rest to a _duplicates folder.
Thread: Keeping a media library tidy ↗Empty the disk caches for Chrome, Edge, Brave, Opera and Firefox across every browser profile, and see how much space each one gave back, while cookies, history and passwords stay put.
Thread: Spring cleaning for Windows PCs ↗Moves game files into Must-Play, Great, Good, Average and Niche folders using a CSV of titles and scores, with series fallbacks, so a huge backlog shows you the best stuff first.
Thread: Keeping a media library tidy ↗Ping a handful of hosts on a timer, log every reply and every up/down change to CSV, and get a tidy list of outages with start, end and duration when you stop it.
Thread: PowerShell craft ↗Moves game files with keywords like (Beta), (Proto), Mahjong or (Germany) in their names into a review folder, keeping their subfolders, so you can trim a huge set down to what you'd actually play and change your mind later.
Thread: Keeping a media library tidy ↗Moves loose game files into one folder per title, worked out from the file name, so a game's base file, updates and DLC end up together. Built for Switch backups, and it works for anything with a consistent naming pattern.
Thread: Keeping a media library tidy ↗Get a word count for every chapter file and the whole manuscript, from Markdown, plain text or .docx, with a running total and a progress bar toward your target.
Thread: Tools for the writing desk ↗Move every loose file in a folder into a category subfolder by extension, clear out stale partial downloads and empty folders, and preview all of it with -WhatIf first.
Thread: File wrangling ↗Renames game files to "(GENRE) Title (REGION) (NOTES)" using a CSV of titles and genre codes you keep, with short region codes, note codes for betas and hacks, and a list of everything it couldn't place.
Thread: Keeping a media library tidy ↗List every icon overlay handler in the order Explorer loads them, see which ones fall past the 15-slot limit, and switch off the ones you don't need, with a registry backup first and an easy way back.
Thread: Spring cleaning for Windows PCs ↗Strip dump flags like [!] and [b1], turn (U) into (USA), tidy revision tags and optionally add release years from a CSV, with a before-and-after list of every rename.
Thread: Keeping a media library tidy ↗Politely close your open apps (and, if you ask, tray apps and named services) to free up memory before a game or a long render, while Windows, your security software and the terminal you're typing in stay put.
Thread: Spring cleaning for Windows PCs ↗Walk a folder once and get every subfolder's file count and total size in tree order, ready to sort, filter or save as a CSV.
Thread: File wrangling ↗Move CBZ and CBR files, or whole series folders, into genre or decade folders using a series list you keep in a spreadsheet, then list what didn't match and check nothing went missing.
Thread: Keeping a media library tidy ↗Take a restore point, repair the component store with DISM, then run SFC, and get one object back that says what each step found instead of three screens of scrolling text.
Thread: Spring cleaning for Windows PCs ↗Install Bun if it's missing, install the open-source Grok CLI globally, and save your xAI API key as a user environment variable from a hidden prompt instead of a line in a script.
Thread: PowerShell craft ↗Shrink a folder of photos or screenshots to WebP with cwebp or NConvert, keep the originals unless you say otherwise, and see how much each file saved.
Thread: File wrangling ↗Check every book and comic file's real format from its first few bytes, rename the ones that lie, find identical copies by hash, and file whatever is loose in the library root.
Thread: Keeping a media library tidy ↗Find the servicing packages behind a KB number, including cumulative updates that hide it, remove them with DISM, keep a transcript, and optionally hide the update so it doesn't come straight back.
Thread: Windows Update, untangled ↗Write the folders you want as an indented outline, or paste the output of tree, and create the whole structure in one go without moving a single file.
Thread: File wrangling ↗A small Windows Forms pop-up that appears at logon when a PC has been up for more than a week, with a Later button and a Restart now button that asks before it does anything.
Thread: Spring cleaning for Windows PCs ↗One script that dumps a WordPress database and zips the site files into a dated folder, with the password kept off the command line and a -WhatIf that really works.
Thread: The WordPress toolbox ↗Epic Games Transfer is my open-source PowerShell and Python tool that rewrites the Epic Games Launcher's manifest files after you move your games, so the launcher finds them instead of downloading them again.
Thread: Games and gear ↗Every WordPress site since 5.6 can be driven over HTTPS with an application password and nothing else installed. Here's how to read, create and update content from PowerShell.
Thread: The WordPress toolbox ↗A PowerShell script that sorts every show and movie in a folder into flat A-Z buckets, skips anything that would collide, and dry-runs honestly.
Thread: File wrangling ↗Use PowerShell's own parser to catch typos and broken brackets in a whole folder of scripts, before anything runs.
Thread: PowerShell craft ↗A dry run that quietly lies to you. Why ForEach-Object's property shorthand returns nothing under -WhatIf, and the one-line fix.
Thread: PowerShell craft ↗Find out which resource groups are eating your Azure budget, straight from PowerShell, no portal clicking required.
Thread: PowerShell craft ↗One script that locks a departing user out, cleans up their groups and licenses, and keeps their mail, with a CSV record of every step.
Thread: The Microsoft Graph toolbox ↗Put a domain group into the local Administrators group on a list of computers (or take one out) over PowerShell remoting, with a result for every machine and -WhatIf first.
Thread: Local admin, done right ↗One object per update deployment with targeted, compliant, failed and unknown counts, so you can spot the deployments that need you.
Thread: Windows Update, untangled ↗Find the updates the most machines are actually missing, bundle them into a group, and deploy them to a pilot collection, with a WhatIf preview first.
Thread: Windows Update, untangled ↗Install a product key, activate it and confirm the edition actually changed, without the key ever landing in a script file or a log.
Thread: Packaging with ConfigMgr ↗Turn "wrap this script in a package and push it to the DPs" into one command, with a dry run before anything gets created.
Thread: Packaging with ConfigMgr ↗When Graph cmdlets start throwing assembly errors, it's almost always mixed module versions. This removes every copy and puts back one matching set.
Thread: The Microsoft Graph toolbox ↗Before you rename, rescope or delete a group, find out what it's wired to. Members, owners, licenses, apps and Intune policies, in one report.
Thread: The Microsoft Graph toolbox ↗A computer inventory straight out of AD, with OS build, last logon, password age and OU in one tidy CSV, ready for audits or a stale-machine cleanup.
Thread: Keeping Active Directory tidy ↗Turn a folder of CBR comics into CBZ with 7-Zip, and optionally shrink the pages to WebP with cwebp or ImageMagick, testing every file before anything is replaced.
Thread: Archive conversion workshop ↗The folder layout and naming rules I use for a pile of old Mac software, and the small PowerShell script that does the renaming without losing the original names.
Thread: The retro workbench ↗Repack .7z files as plain Deflate ZIPs with UTF-8 file names, including password-protected ones, and test every result before the original goes anywhere.
Thread: Archive conversion workshop ↗A quick, safe software inventory from the registry, local or remote, that returns objects you can filter and export instead of a wall of colored text.
Thread: PowerShell craft ↗Clean old user profiles off shared PCs and servers through Win32_UserProfile, so the folder and the registry entry go together and nobody gets a TEMP profile.
Thread: Spring cleaning for Windows PCs ↗Find the old Outlook .ost files nobody is using any more and reclaim the space, without touching the ones Outlook has open.
Thread: Spring cleaning for Windows PCs ↗Clear old temp files from the usual suspects and run Disk Cleanup unattended, with an age threshold and a -WhatIf that shows how much you'd get back.
Thread: Spring cleaning for Windows PCs ↗When Windows Update is greyed out or just won't run, check all the policy values and services that can block it, and put them back the way Windows shipped.
Thread: Windows Update, untangled ↗Hand a list of folders from several drives to robocopy in one go, keep their structure on the new drive, catch name collisions before anything moves, and get a log per folder.
Thread: File wrangling ↗Pull shutdown, startup and crash events from the System log so you can tell a planned restart from a power cut, and see who or what asked for it.
Thread: Windows Update, untangled ↗A one-off local admin account done properly, with a hidden password prompt, a language-proof group lookup, and an expiry date for the temporary ones.
Thread: Local admin, done right ↗Roll out a named local admin account with a random password nobody knows, ready for Windows LAPS to take over, and optionally retire the built-in Administrator.
Thread: Local admin, done right ↗Empty the Recycle Bin with no prompt, for one user or everyone on the machine, and optionally keep anything deleted recently.
Thread: Spring cleaning for Windows PCs ↗Export your KACE device inventory to CSV and get a per-location (or per-label) device count, optionally just the machines added this week.
Thread: Packaging with ConfigMgr ↗On Windows 10 and 11 there's no Windows Update logging to switch on. The trick is collecting it, and this script does that in one zip per machine.
Thread: Windows Update, untangled ↗A read-first WinRM check that tells you why remote PowerShell won't connect, fixes it only when you ask, and doubles as a ConfigMgr compliance script.
Thread: Windows Update, untangled ↗Clear the Windows DNS client cache locally or across a list of machines, and know when a flush will actually fix anything.
Thread: Spring cleaning for Windows PCs ↗A decade-plus of Windows migrations, endpoint security, and infrastructure work, boiled down to what I did and how big it was.
For the Entra-joined PC that never showed up in Intune. Check it's ready, kick off enrollment, and see why it failed if it does.
Thread: Getting devices into Intune ↗Load mobile numbers into Entra ID as an authentication method before users ever sign in, without stomping on numbers they've already registered.
Thread: The Microsoft Graph toolbox ↗Point each domain controller at a partner DC first and itself (127.0.0.1) last, the way Microsoft recommends, across all your DCs in one pass.
Thread: Keeping Active Directory tidy ↗Audit who still talks SMBv1 to your machines, then switch it off for good, with one script and three modes.
Thread: PowerShell craft ↗Turn on Dell's Password Bypass so patch reboots don't sit at a power-on password prompt all night, then turn it back off when you're done.
Thread: Dell BIOS passwords, without the pain ↗How I think about patch risk now. Sort updates by blast radius, roll them out in rings, decide what "bad" looks like up front, and know your way back before you need it.
Thread: Windows Update, untangled ↗List the preview handlers installed on a PC, see which one each file type uses, and point extensions like .log, .ps1 or .json at the handler you want.
Thread: File wrangling ↗Create the Tier 2 OU, its sub-OUs and the group that manages them, and delegate just enough rights for workstation and user admin work.
Thread: Keeping Active Directory tidy ↗Dump every OU in the domain to a spreadsheet, with a readable path, depth, GPO link count and, if you want, how many objects live in each one.
Thread: Keeping Active Directory tidy ↗A width check that works in a real console, in VS Code, and in scheduled tasks and CI runners where there's no window to measure.
Thread: PowerShell craft ↗One script that reads the WSUS, scan-source and Windows Update for Business settings on a device and tells you where it's really getting updates from, with a safe reset for leftovers.
Thread: Windows Update, untangled ↗Compare files, whole folder trees, or a download against its published checksum with Get-FileHash, and get back a clear Match or Different for every file.
Thread: File wrangling ↗Register the Microsoft Update service through the Windows Update Agent's own COM API, so devices pick up Office and other Microsoft product updates, not just Windows.
Thread: Windows Update, untangled ↗One report for every kind of service account, gMSAs and old-school user accounts alike, showing password age, SPNs, delegation and who can read the gMSA password.
Thread: Keeping Active Directory tidy ↗Create a Tier 0 admin group, keep it where only Tier 0 can touch it, and give it full control of the Tier 0 OU. Preview the whole thing with -WhatIf first.
Thread: Keeping Active Directory tidy ↗Put a BIOS admin password on new Dells, or change the old one across the fleet, with both passwords handed over at runtime.
Thread: Dell BIOS passwords, without the pain ↗Repack ZIPs as 7z, see exactly how much space each one saved, and keep the ZIP when the 7z wouldn't be any smaller.
Thread: Archive conversion workshop ↗Find project folders that haven't changed in N days, zip each one to an archive location with the date of its last change, verify it, and optionally clear out the original.
Thread: File wrangling ↗Switch workstations to High Performance (or Ultimate Performance) by GUID, restore the plan if the image hid it, and don't end up with five copies of it.
Thread: Packaging with ConfigMgr ↗Integrity-test every ZIP, 7z, RAR and TAR in a folder, then optionally repack the good ones into a single format. Broken archives never get touched.
Thread: Archive conversion workshop ↗Clear the BIOS setup password on Dell PCs and see exactly what changed, with the password supplied at runtime instead of sitting in a package.
Thread: Dell BIOS passwords, without the pain ↗One uninstall script for every retired app. Give it a display name and it finds the right uninstall command, MSI or not, and runs it quietly.
Thread: Packaging with ConfigMgr ↗Find out which Chrome version a machine is really running, whether an update is stuck waiting on a restart, and kick Google's updater into checking now.
Thread: Spring cleaning for Windows PCs ↗Stop the spooler, clear out the wedged job files, and bring it back up, with -WhatIf and an option to leave recent jobs alone.
Thread: Spring cleaning for Windows PCs ↗Remove the internal drive password from Dell PCs with Dell's PowerShell provider, without ever writing the password into a script or package.
Thread: Dell BIOS passwords, without the pain ↗Write extensionAttribute1-15 on cloud-only Entra ID users from a CSV, with a clear note for every synced account it can't touch.
Thread: The Microsoft Graph toolbox ↗Force an immediate local admin password rotation on every machine in a collection, with Windows LAPS doing the password part so no script ever sees one.
Thread: Local admin, done right ↗A gpupdate wrapper that checks the domain trust first, never bounces anyone's session, and reports a real success or failure back to ConfigMgr.
Thread: Packaging with ConfigMgr ↗Feed it a list or an OU, and it deletes (or disables) only the computers that are genuinely stale, logs every decision to CSV, and shows you the plan first with -WhatIf.
Thread: Keeping Active Directory tidy ↗Feed it a list of computers and a service name, get back one row per machine saying whether it's installed, running, and how it starts.
Thread: PowerShell craft ↗The hardware hash script behind Windows Autopilot, explained. Upload straight to Intune with -Online, or export a CSV when the device can't reach the tenant.
Thread: Getting devices into Intune ↗