Set‑PSModulePath - dsccommunity/DscResource.Common GitHub Wiki
Set environment variable PSModulePath in the current session or machine wide.
Set-PSModulePath -Path <String> [-Machine] [-PassThru]
[<CommonParameters>]
Set-PSModulePath -FromTarget <String> -ToTarget <String> [-PassThru]
[<CommonParameters>]
This is a command to set environment variable PSModulePath in current session or machine wide.
;<Path 2>'
Sets the session environment variable PSModulePath
to the specified path
or paths (separated with semi-colons).
;<Path 2>' -Machine
Sets the machine environment variable PSModulePath
to the specified path
or paths (separated with semi-colons).
Set-PSModulePath -FromTarget 'MAchine' -ToTarget 'User'
Copies the value of the machine environment variable PSModulePath
to the
user environment variable PSModulePath
.
The target environment variable to copy the value from.
Type: String
Parameter Sets: TargetParameters
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If set the PSModulePath will be changed machine wide. If not set, only the current session will be changed.
Type: SwitchParameter
Parameter Sets: Default
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
If specified, returns the set value.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
A string with all the paths separated by semi-colons.
Type: String
Parameter Sets: Default
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The target environment variable to set the value to.
Type: String
Parameter Sets: TargetParameters
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.