Ready-to-Use PowerShell and Bash Scripts
Each script does one job. It has a description and is ready to copy. Run it on every device at once with Moftgate Scripts.
- Windows18
- macOS5
- Linux5
- Network3
- Disk and storage4
- Inventory4
- Security9
- Updates4
- Maintenance4
Find the script you need
Search by name, description or code.
28 scripts found
Clear the DNS Cache on Windows
Empties the DNS client cache. Use it when a site resolves to the wrong IP or a DNS record has just changed.
View script →Reset the Windows Network Stack (Winsock and TCP/IP)
Resets the Winsock catalog and TCP/IP settings. Use it when the device cannot connect after a broken VPN or proxy install. A restart is required.
View script →Windows Disk Space Report
Lists size, free space and free percent for all local disks. Flags disks below 10% free.
View script →Clean Up Temporary Files on Windows
Deletes files older than 7 days in the Windows Temp folder and every user's Temp folder. Reports the space recovered.
View script →Find the 20 Largest Files on Windows
Lists the 20 largest files under C:\Users with path and size. Use it to find why a disk is full.
View script →List Installed Software on Windows
Lists installed programs with name, version and publisher from the 64-bit and 32-bit uninstall keys. It does not use Win32_Product, which can trigger MSI repairs.
View script →Find Installed AI Apps on Windows
Searches machine and user uninstall keys for AI apps such as ChatGPT, Claude, Copilot, Cursor, Perplexity, Ollama and LM Studio. A first step for a Shadow AI inventory.
View script →Windows System Information Summary
Returns computer name, manufacturer, model, serial number, OS version, CPU and RAM in one output.
View script →Check Windows Uptime
Shows the last boot time and how many days the device has been on. Devices that do not restart for a long time do not finish patches.
View script →Check for a Pending Reboot on Windows
Checks Windows Update, Component Based Servicing (CBS) and pending file rename entries. Reports why a reboot is needed.
View script →List Recently Installed Windows Updates
Lists installed hotfixes with KB number and install date, newest first.
View script →Check BitLocker Encryption Status
Shows BitLocker protection status, encryption percent and method for each volume. Exits with an error if the system drive is not encrypted.
View script →Check Microsoft Defender Status
Shows whether real-time protection is on, the signature version and the signature age. Warns when signatures are older than 3 days.
View script →Check Windows Firewall Profiles
Shows whether the Domain, Private and Public profiles are on, and the default inbound action.
View script →List Local Administrators on Windows
Lists members of the local Administrators group. The group is found by its language-neutral SID (S-1-5-32-544), so it works on any Windows language.
View script →Disable USB Storage on Windows
Disables the USBSTOR driver. Newly connected USB drives do not mount; keyboards and mice keep working. Set Start back to 3 to undo.
View script →List Startup Programs on Windows
Lists programs that start at sign-in with their command and location. Use it to review slow boots and suspicious persistence.
View script →Reset the Print Spooler
Stops the Spooler service, deletes stuck print jobs and starts the service again. Use it for jobs stuck in the queue.
View script →Flush the DNS Cache on macOS
Flushes the dscacheutil cache and reloads mDNSResponder. Requires root.
View script →Check FileVault Status on macOS
Checks whether FileVault disk encryption is on. Exits with an error if it is off.
View script →Check Gatekeeper and SIP on macOS
Shows whether Gatekeeper app assessment and System Integrity Protection (SIP) are on.
View script →List Installed Applications on macOS with Versions
Lists apps under /Applications with their bundle version.
View script →List Pending Software Updates on macOS
Lists pending macOS and security updates from Apple's update server. It does not install anything.
View script →Linux Disk Usage Report
Shows usage of real file systems and lists those above 90% full separately.
View script →List Pending Package Updates on Linux
Detects apt or dnf and lists pending package updates. It does not install anything.
View script →List Users with sudo Rights on Linux
Lists members of the sudo and wheel groups and extra rules under /etc/sudoers.d.
View script →List Failed SSH Logins on Linux
Counts failed SSH password attempts in the last 24 hours by source IP. Use it to spot brute-force attacks.
View script →Top CPU and Memory Processes on Linux
Lists the top 10 processes by CPU and by memory. The first output to read on a slow server.
View script →Copy, test, roll out
- 01
Copy
Open the script and click Copy.
- 02
Test
Run it on one test device first and read the output.
- 03
Roll out
Send it to a group, profile or tag with Moftgate Scripts.
Run these scripts on every device in one click
Moftgate Scripts gives you target selection, a confirmation step, per-device output and an audit log. The first 200 endpoints are free for a year.