Skip to content

Get-ModulePath

SYNOPSIS

Retrieves the folders in the powershell module path.

SYNTAX

Get-ModulePath [-AsString] [-Active]

DESCRIPTION

The Get-ModulePath function uses the registry and the environmental variables to retrieve the folders in the powershell module path.

EXAMPLES

Example 1

@{paragraph=PS C:\>}

Get-ModulePath

Get the folders in the module path.

Example 2

@{paragraph=PS C:\>}

Get-ModulePath -AsString

Get the folders in the module as single string.

Example 3

@{paragraph=PS C:\>}

Get-ModulePath -Active

Get the folders in the module path as it is currently in the system. Event if changes are made, you need to start a new powershell windows in order for changes to take affect.

PARAMETERS

-AsString

Returns the powershell module path as a single string.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Active

Displays the folders in the current powershell module path using the PSModulePath variable.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

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

INPUTS

OUTPUTS

NOTES

You need to run this function as a member of the Administrators group.

Back to top