Skip to content

A PowerShell module for managing PATH environment variables.

Notifications You must be signed in to change notification settings

smn-1/PathUtilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PathUtilities Module

This is a quick module I made to make managing the PATH environment variable easier, especially when dealing with constant updates or bad MSI installers that duplicate entries. Feel free to use it.


How to Import the Module

Import-Module 'C:\Users\Tony\YourScripts\Modules\PathUtilities\PathUtilities.psd1'

How to Permanently Import the Module

  1. Open your PowerShell profile for editing:

    notepad $Profile
  2. Add the following line to your profile file:

    Import-Module 'C:\Users\Tony\YourScripts\Modules\PathUtilities\PathUtilities.psd1'
  3. Save the profile file and restart PowerShell.


Features of PathUtilities Module

  • Add-Path: Add directories to your PATH environment variable.
  • Remove-DuplicatePaths: Remove duplicate entries from your PATH.
  • Get-PathEntries: Display PATH entries by User or System.
  • Remove-DuplicatesFromUserPath: Remove duplicates in the User PATH that exist in the System PATH.
  • Update-Path: Update the PATH environment variable for the current session.
  • Get-EnvironmentPathEntries: Retrieve the entries of the PATH environment variable for either System or User, with options for uniqueness, filtering, and raw output

About

A PowerShell module for managing PATH environment variables.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published