Skip to content

Repair-EnvironmentPath

SYNOPSIS

Repair the PATH environment variable.

SYNTAX

Repair-EnvironmentPath [[-Scope] <String>] [-Force] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Repair the PATH environment variable. This command will remove any invalid paths and normalize the path separators.

EXAMPLES

EXAMPLE 1

Repair-EnvironmentPath -Scope CurrentUser

Repair the PATH environment variable for the current user.

EXAMPLE 2

Repair-EnvironmentPath -Scope AllUsers

Repair the PATH environment variable for all users.

EXAMPLE 3

Repair-EnvironmentPath -Scope CurrentUser -Force

Repair the PATH environment variable for the current user. Any invalid paths will be removed.

EXAMPLE 4

Repair-EnvironmentPath -Scope AllUsers -Force

Repair the PATH environment variable for all users. Any invalid paths will be removed.

PARAMETERS

-Scope

The scope of the environment variable.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: CurrentUser
Accept pipeline input: False
Accept wildcard characters: False

-Force

Remove any invalid paths.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

General notes