Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to install a module without dependencies? #494

Open
msJinLei opened this issue Oct 16, 2020 · 2 comments
Open

Is there any way to install a module without dependencies? #494

msJinLei opened this issue Oct 16, 2020 · 2 comments

Comments

@msJinLei
Copy link

Hi team, I would like to ask whether there is a way to install one module without its dependencies using PowerShellGet or PackageManagement.

I find the -SkipDependencies in cmdlet Install-Package of PackageManagement ( https://docs.microsoft.com/en-us/powershell/module/packagemanagement/install-package?view=powershell-7) but without the example of how to use it.

And I tried the execution such as
• Install-Package -Name Az -Source PSGallery -SkipDependencies -RequiredVersion 4.7.0
• Install-Package -Provider PowerShellGet -Source PSGallery -RequiredVersion 4.7.0 -SkipDependencies Az
However, all of above report that parameter “SkipDependencies” cannot be found.

So I would like to ask whether Install-Package supports skipping installing dependencies? Or is there other way to install a module without its dependencies with PowerShellGet or PackageManagement?

@SydneyhSmith
Copy link
Collaborator

Thanks what version of PackageManagement are you using? gmo PackageManagement -ListAvailable

@msJinLei
Copy link
Author

I am using 1.4.7

> gmo PackageManagement -ListAvailable

    Directory: C:\program files\powershell\7\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     1.4.7                 PackageManagement                   Desk      {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource…}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants