Skip to main content

Remove-Environmental Path Variable

Summary​

This document will remove a requested Windows path from the environmental path variable for the desired scope.

Sample Run​

  • To remove a user-scoped environmental path variable item.

Sample Run 1

  • To remove multiple machine-scoped environmental path variable items.

Sample Run 2

Note: Scope is not mandatory; if left blank, the scope will default to the machine-scoped variable.

Dependencies​

Variables​

Standard agnostic template variables apply.

User Parameters​

NameExampleRequiredDescription
PathC:/windows, C:/temp...TrueThe paths that must be removed from the scoped environmental path variable.
ScopeUserMachineFalseThe scope of the environmental path variable you wish to target. This is defaulted to 'Machine'

Process​

Please see the agnostic content document EPM - Windows Configuration - Agnostic - Remove-PathVariable for process information.

Output​

  • Script log

Changelog​

2025-04-10​

  • Initial version of the document