Skip to content

Support for WindowsPowerShell #33

@cspotcode

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.

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