[Script Of Dec. 16] How to check for duplicate paths in PATH environment variable


Dec.
16
image

Script Download:  
The script is available for download from https://gallery.technet.microsoft.com//How-to-check-for-duplicate-5d9dd711.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

Sometimes repeated installation of software can add duplicate entries into the PATH environment variable. Since environment variable has a there is a hard coded limit in the size of this variable, there are chances that you may it that limit over a period of time. This script checks the PATH environment variable and removes any duplicate path entries.

This script was originally developed to check and remove duplicate paths in the PATH system environment variable.

Faulty software installers may add duplicate paths to the PATH environment variable. Also, there is a known bug associated with http://support2.microsoft.com/kb/2823180 - This KB adds an extra string : “%systemroot%\System32\WindowsPowerShell\v1.0\“ to the PATH environment variable. As a result the length of the PATH variable may reach close to the 32,767 limit. In some cases applications that try to add additional paths may fail. The issue can be resolved by simply removing the duplicate entries from the PATH variable.

You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery

Comments (1)

  1. aw says:

    You amazingly come with really good posts. Thanks a lot for sharing your blog Microsoft.

    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Kepulauan%20Riau
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Maluku
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Maluku%20Utara
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Nusa%20Tenggara%20Barat
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Nusa%20Tenggara%20Timur
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Sulawesi%20Barat
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Sulawesi%20Selatan
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Sulawesi%20Tengah
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Sulawesi%20Tenggara
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Sulawesi%20Utara
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Sumatera%20Barat
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Sumatera%20Selatan
    http://www.lokerjobindo.com/search/label/Loker%20Daerah%20Sumatera%20Utara
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Antar%20Daerah
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Artha%20Graha%20Internasional
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Bukopin
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Bumi%20Arta
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20ICB%20Bumiputera%20Indonesia
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Ekononomi%20Raharja
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Ganesha
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Hana
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Himpunan%20Saudara%201906
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20ICBC%20Indonesia
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Index%20Selindo
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20SBI%20Indonesia
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank%20Internasional%20Indonesia
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20BUMN
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Terbaru
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20Bank
    http://www.lokerjobindo.com/search/label/Lowongan%20Kerja%20SMA
    http://www.lokerjobindo.com
    http://www.yacinta.com
    http://www.kerjabumn.com
    http://www.wisatasia.id/search/label/Wisata-Indonesia

    http://www.wisatasia.id

Skip to main content