< Back
Get-CPowerShellModuleInstallPath
Post
NAME Get-CPowerShellModuleInstallPath
SYNOPSIS
Returns the path to the directory where you can install custom modules.
SYNTAX
Get-CPowerShellModuleInstallPath [<CommonParameters>]
DESCRIPTION
Custom modules should be installed under the `Program Files` directory. This function looks at the `PSModulePath`
environment variable to find the install location under `Program Files`. If that path isn't part of the
`PSModulePath` environment variable, returns the module path under `$PSHOME`. If that isn't part of the
`PSModulePath` environment variable, an error is written and nothing is returned.
`Get-CPowerShellModuleInstallPath` is new in Carbon 2.0.
PARAMETERS
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-CPowerShellModuleInstallPath
Demonstrates how to get the path where modules should be installed.
RELATED LINKS
SYNOPSIS
Returns the path to the directory where you can install custom modules.
SYNTAX
Get-CPowerShellModuleInstallPath [<CommonParameters>]
DESCRIPTION
Custom modules should be installed under the `Program Files` directory. This function looks at the `PSModulePath`
environment variable to find the install location under `Program Files`. If that path isn't part of the
`PSModulePath` environment variable, returns the module path under `$PSHOME`. If that isn't part of the
`PSModulePath` environment variable, an error is written and nothing is returned.
`Get-CPowerShellModuleInstallPath` is new in Carbon 2.0.
PARAMETERS
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.String
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-CPowerShellModuleInstallPath
Demonstrates how to get the path where modules should be installed.
RELATED LINKS