Welcome to the PowerShell Utility Scripts repository! This collection includes a variety of useful PowerShell scripts designed to enhance productivity, automate tasks, and optimize system performance. Each script serves a unique purpose, from system cleanup to managing OneDrive storage.
Description: Cleans up temporary files, empties the recycle bin, and clears browser caches for major browsers (Edge, Chrome, Firefox).
Usage: Keep your system clean and optimized with a simple execution or schedule.
Description: Copies files from predefined folders (e.g., Documents) to a specified destination (external drive or cloud storage) while preserving folder structure.
Usage: Ideal for automating regular backups and protecting critical data.
Description: Lists and allows the removal of startup applications from the registry and startup folder.
Usage: Simplify your boot process and optimize system performance by managing unnecessary startup programs.
Description: Automatically shuts down, restarts, or puts the system into sleep mode after inactivity or at a scheduled time.
Usage: Save power and secure your workstation during downtime.
Description: Monitors and reports on CPU, RAM, and disk usage, providing a summary of system performance.
Usage: Use it to keep track of system resource usage or identify performance bottlenecks.
Description: Clears the current clipboard content and removes clipboard history for added security.
Usage: Protect sensitive data by ensuring clipboard contents are not stored locally.
Description: Locks the screen after a period of inactivity or at a specified scheduled time.
Usage: Ideal for enhancing security in shared or unattended environments.
Description: Removes locally synced OneDrive files, keeping them stored only in the cloud.
Usage: Free up disk space while keeping your files accessible online.
Description: Scans specified directories and generates a report of folder sizes, sorted by size.
Usage: Quickly identify space-hogging folders to manage disk space effectively.
Description: Tests network upload and download speeds using a public API and logs results for future comparison.
Usage: Measure and track your network performance over time.
Description: Lists running, stopped, or disabled services and allows users to start, stop, or restart selected services interactively.
Usage: Manage critical Windows services efficiently.
Description: Clear all the cache folders for Microsoft Teams.
Usage: Needs admnin privileges.
- Clone the repository:
git clone https://github.com/yourusername/PowerShell-Utility-Scripts.git cd PowerShellUtilityScripts
- Execute the desired script:
./ScriptName.ps1
You can automate the execution of these scripts using Windows Task Scheduler:
-
Open Task Scheduler:
- Press
Win + R
, typetaskschd.msc
, and press Enter.
- Press
-
Create a New Task:
- Click on
Create Task
in the right-hand menu.
- Click on
-
Configure General Settings:
- Provide a name for the task.
- Select
Run whether user is logged on or not
. - Check
Run with highest privileges
.
-
Set the Trigger:
- Add a new trigger (e.g., daily or at a specific time).
-
Set the Action:
- Choose
Start a Program
and set:- Program/script:
powershell.exe
- Add arguments:
-ExecutionPolicy Bypass -File "C:\Path\To\ScriptName.ps1"
- Program/script:
- Choose
-
Save the Task:
- Click OK, and provide your credentials if prompted.
The script will now run automatically based on the schedule.
Contributions are welcome! If you have ideas for new scripts, enhancements, or bug fixes, feel free to:
- Fork this repository.
- Create a new branch for your changes.
- Submit a pull request with a detailed explanation.
Open an issue to report bugs or suggest new features.
This project is licensed under the MIT License. See the LICENSE file for details.
Thank you for using these PowerShell scripts! If you find this repository helpful, please give it a star 🌟 and share it with others.