Skip to content

Support for WindowsPowerShell #33

Description

@cspotcode

Sadly, I still find myself forced to use Windows PowerShell occasionally. Today it was because Office interop fails on PowerShell Core.

This logic can be tweaked to install modules into the WindowsPowerShell directory instead of PowerShell

if ($Scope -eq "CurrentUser") {
$scopedPath = $HOME
$scopedChildPath = "\Documents\PowerShell\Modules"
} else {
$scopedPath = $env:ProgramFiles
$scopedChildPath = "\PowerShell\Modules"
}
$dest = Join-Path -Path $scopedPath -ChildPath $scopedChildPath

As a workaround, I used -DestinationPath $HOME\Documents\WindowsPowerShell\Modules

Hopefully this helps anyone searching in the future.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions