Skip to content

Adding to PSModulePath separator #4263

Closed

Description

@Liturgist

Issue Details

$p = [Environment]::GetEnvironmentVariable("PSModulePath")
$p += "C:\Program Files\Fabrikam Technologies\Fabrikam Manager\Modules"
[Environment]::SetEnvironmentVariable("PSModulePath",$p)

The added path needs a leading SEMICOLON separator. The first example code is correct. The second is not.

$p += ";C:\Program Files\Fabrikam Technologies\Fabrikam Manager\Modules"

Activity

  1. sdwheeler commented on May 6, 2019

    @sdwheeler
    Contributor

    Liturgist Which document has this issue?

  2. Liturgist commented on May 6, 2019

    @Liturgist
    Author

    Sorry. I revised it a couple of times and omitted the URL. It is the second example code.

    https://docs.microsoft.com/en-us/powershell/developer/module/installing-a-powershell-module

  3. added a commit that references this issue on Aug 26, 2019
    0ac3ae8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions