Skip to content

Install-ModuleFast -Destination won't install modules if ModuleFast detects the same module installed some other place on the system #45

@o-l-a-v

Description

@o-l-a-v

I expect the -Destination parameter in Install-ModuleFast to don't care about modules installed elsewhere. This is a breaking change with rc1 vs. earlier versions, I think.

Either change the default behavior, or add a parameter -IgnoreExistingModules or something like that.

Reproduce

Prerequirement

  • Install mentioned modules to %LOCALAPPDATA%\Microsoft\PowerShell\Modules, and add same path to user context env variable PSModulePath.
  • After running the input and seeing the output, %TEMP%\Modules is still empty.

Input

$ModulePath = [string] '{0}\Modules' -f $env:TEMP
if (-not [System.IO.Directory]::Exists($ModulePath)) {
    $null = [System.IO.Directory]::CreateDirectory($ModulePath)
}
$env:MFRELEASE='v0.1.0-rc1';iwr bit.ly/modulefastmain | iex
Install-ModuleFast -NoPSModulePathUpdate -NoProfileUpdate -Update -Destination $ModulePath -ModulesToInstall (
    'Az.Accounts',
    'Az.Compute',
    'Az.Resources',
    'Az.ResourceGraph',
    'Az.StreamAnalytics'
)

Output

PS C:\Users\olav.birkeland> Install-ModuleFast -NoPSModulePathUpdate -NoProfileUpdate -Update -Destination $ModulePath -ModulesToInstall (
>>     'Az.Accounts',
>>     'Az.Compute',
>>     'Az.Resources',
>>     'Az.ResourceGraph',
>>     'Az.StreamAnalytics','Microsoft.Graph.Authentication'
>> ) -Verbose
VERBOSE: Az.Accounts: Evaluating Module Specification
VERBOSE: Az.Compute: Evaluating Module Specification
VERBOSE: Az.Resources: Evaluating Module Specification
VERBOSE: Az.ResourceGraph: Evaluating Module Specification
VERBOSE: Az.StreamAnalytics: Evaluating Module Specification
VERBOSE: Microsoft.Graph.Authentication: Evaluating Module Specification
VERBOSE: ✅ 6 Module Specifications have all been satisfied by installed modules. If you would like to check for newer versions remotely, specify -Update
PS

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions