Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

PowerShell-Practical-Guide

Welcome to the PowerShell-Practical-Guide, a curated collection of practical, real‑world scripts designed to automate common system‑administration, file‑management, and workflow tasks.
Each section in the /docs directory focuses on a specific problem area and includes:

  • A clear description of the task
  • Usage instructions
  • Sanitized, ready‑to‑run PowerShell scripts
  • Notes, tips, and optional enhancements

This guide is intended for beginners and intermediate PowerShell users who want to build a reliable toolbox of automation utilities.


📁 Directory Structure

The /docs folder contains the following script categories:

  • Cleanup Empty Dirs — Identify and remove empty directories safely.
  • Cleanup-Installer Orphans — Locate leftover installer files and temporary artifacts.
  • Delete duplicate files — Scan for and remove duplicate files using hashing.
  • Domain Join Automation — Automate joining Windows machines to a domain.
  • Filename List — Generate plain-text filename lists from any folder.
  • Find long names — Detect files or folders exceeding Windows path-length limits.
  • Linux Stuff — Cross‑platform scripts and notes for PowerShell on Linux.
  • Move from folders — Flatten directory structures by moving files upward.
  • Windows Batch Scripts (Pre-PowerShell Era) — Legacy .bat scripts preserved for reference.
  • remove old files — Automatically delete files older than a specified age.

Each section includes Markdown documentation and one or more scripts.


🧭 How to Use This Guide

  1. Browse to the section that matches the task you want to automate.
  2. Review the description and usage notes.
  3. Copy the script into your environment or run it directly in PowerShell 5.1 or PowerShell 7+.
  4. Modify paths and variables as needed for your system.
  5. Explore related sections to build more advanced workflows.

If you're new to PowerShell, start with:

  • Basic file operations
  • Understanding the pipeline
  • Working with objects

🛠 Contributing & Expanding

This guide is designed to grow over time. Future additions may include:

  • More automation modules
  • Cross‑platform examples
  • Advanced error handling patterns
  • Logging and reporting templates

If you want to add a new section, simply create a folder under /docs and include a Markdown file with:

  • Overview
  • Usage
  • Script
  • Notes

📄 License

This guide is provided as-is for personal and educational use.
Feel free to adapt the scripts to your own environment.


About

Here is a collection of useful things you can do with powershell

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors