Skip to content

Set PSModulePath

dscbot edited this page Jan 21, 2024 · 3 revisions

Set-PSModulePath

SYNOPSIS

Set environment variable PSModulePath in the current session or machine wide.

SYNTAX

Set-PSModulePath [-Path] <String> [-Machine] [<CommonParameters>]

DESCRIPTION

This is a command to set environment variable PSModulePath in current session or machine wide.

EXAMPLES

EXAMPLE 1

;<Path 2>'

Sets the session environment variable PSModulePath to the specified path or paths (separated with semi-colons).

EXAMPLE 2

;<Path 2>' -Machine

Sets the machine environment variable PSModulePath to the specified path or paths (separated with semi-colons).

PARAMETERS

-Machine

If set the PSModulePath will be changed machine wide. If not set, only the current session will be changed.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Path

A string with all the paths separated by semi-colons.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
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

None

NOTES

RELATED LINKS

Clone this wiki locally