Skip to content

HvdMark/InstallModuleFromGitHub

 
 

Repository files navigation

Install a PowerShell Module from GitHub

Not all PowerShell Modules are published to the PowerShellGallery but are hosted on GitHub.

Read the blog post

Changes

1.8.1

  • Add: Default $Scope to CurrentUser if $Scope is'nt entered

  • Add: More verbose output

  • Fix: PSModulePath is different between Windows Powershell 5.1 and Powershell 7.0 $HOME can't be used when documents folder is moved with folder redirection

    Current User: 5.1 [Environment]::GetFolderPath('MyDocuments')\WindowsPowerShell\Modules 7.0 [Environment]::GetFolderPath('MyDocuments')\PowerShell\Modules

    All User: 5.1 $env:ProgramFiles\WindowsPowerShell\Modules 7.0 $env:ProgramFiles\PowerShell\Modules

1.8.0

  • Add: Create folder first before expanding archive
  • Add: Test-Path to see if tmpDir already exist

1.7.0

dfinke#32

  • Add tab-completion for -Scope by @cspotcode

dfinke#25

  • fix unzippedArchive path when searching for psd1 file by @joshschmitter

1.6.0

via dfinke#25

  • on non-unix platforms, fixed the psd1 file search join-path on line 87 was joining two full paths, which is not a valid result.

1.5.0

Thank you to Max Renner for the pull request.

  • Use [System.Environment]::OSVersion.Platform -eq "Unix" as a catch all for non-windows systems
  • Replaced the hard coded Module paths assigned to $dest with environment variables instead.
  • Added if logic for Windows vs Non-Windows machines in assigning $psd1 and in the final Copy-Item statement.

1.4.0

v 0.5.0

In Action

image

About

Install PowerShell Modules from GitHub

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%