Coder Social home page Coder Social logo

davebrothers / psget Goto Github PK

View Code? Open in Web Editor NEW

This project forked from psget/psget

0.0 1.0 0.0 1.95 MB

Set of commands to install PowerShell modules from local file or from the web. Inspired by NuGet

Home Page: http://psget.net

PowerShell 98.51% Shell 0.18% C# 1.31%

psget's Introduction

PsGet Utils

Set of commands to install PowerShell modules from central directory, local file or from the web.

Features

  1. Install modules from central directory
  2. Install modules from web or local file
  3. Install modules to user profile or for all users ( elevated access required )
  4. Install multifile modules from ZIP
  5. Import module after install
  6. Alter you profle to load module every time that PowerShell starts
  7. Execute Install.ps1 if found in module folder
  8. Tab completion for modules, ismo Ps

Examples

To install something from central directory just type:

install-module PsUrl

This command will query central directory to find required information about PsUrl module and install it if found.

Another example is how to install PsUrl module located at https://github.com/chaliy/psurl/raw/master/PsUrl/PsUrl.psm1 , to install it just execute

install-module -ModuleUrl https://github.com/chaliy/psurl/raw/master/PsUrl/PsUrl.psm1

or zipped modules like posh-git. Zip package is located at https://github.com/dahlbyk/posh-git/zipball/master , to install it just execute

install-module -ModuleUrl https://github.com/dahlbyk/posh-git/zipball/master

Also this command will execute Install.ps1 that is install scrtipt for posh-git. (pls note posh-git is in the directory so install-module posh-git is enough).

And of course it supports local files. Both ZIP and PSM1

install-module -ModulePath \TestModules\HelloWorld.zip

install-module -ModulePath \TestModules\HelloWorld.psm1

Command also can make given module to start with your profile

install-module PsUrl -Startup   

Modules can also be installed from NuGet:

install-module -nugetpackageid SomePowerShellModuleOnNuget

install-module -nugetpackageid SomePrivatePowerShellModule -nugetsource http://mynugetserver/nuget/feed/

If you need update module execute Update-Module, this will dowload last version and replace local one

update-module PsUrl

Installation

In your prompt execute:

(new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex

You are done. This nice line of PowerShell script will dowload GetPsGet.ps1 and send it to Invoke-Expression to install PsGet Module.

Alternativelly you can do installation manually

  1. Copy PsGet.psm1 to your modules folder (e.g. $Env:PsGet\PsGet\ )
  2. Execute Import-Module PsGet (or add this command to your profile)
  3. Enjoy!

FAQ

Q: Error "File xxx cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details." A: By default, PowerShell restricts execution of all scripts. This is all about security. To "fix" this run PowerShell as Administrator and call

Set-ExecutionPolicy RemoteSigned

For mode details run get-help about_signing or get-help about_Execution_Policies.

Q: How to add my module to the directory? A: Review small instruction on PsGet Wiki - How to add your module to the directory

Roadmap

Roadmap is not sorted in any order. This is just list what is think should be done.

  1. Support for other than PSM1 types of modules
  2. Support for modules with more than one file with NuGet packages
  3. Support for versions of the modules
  4. Git/Hg/Svn sourcesgit

Resources

  1. Blog about PsGet - http://blog.chaliy.name/tagged/psget
  2. PowerShell wrapper for NuGet http://code.andrewnurse.net/psget (yes also has name PsGet), now also on GitHub.
  3. Instruction how pack PowerShell module to NuGet package - http://haacked.com/archive/2011/04/19/writing-a-nuget-package-that-adds-a-command-to-the.aspx

Contributing

If you are interested in contributing to PsGet, please read the following page on the wiki: https://github.com/psget/psget/wiki/How-can-I-contribute-to-PsGet

Credits

Module based on http://poshcode.org/1875 Install-Module by Joel Bennett

Bitdeli Badge

psget's People

Contributors

alastairs avatar alexfalkowski avatar chaliy avatar dlwyatt avatar dotcypress avatar ghostsquad avatar iristyle avatar jamesdawson avatar jamesmanning avatar jfromaniello avatar jstangroome avatar kierdugan avatar kunzimariano avatar kylegobel avatar lzybkr avatar manojlds avatar markrobertjohnson avatar matthewkimber avatar mtboren avatar nblagoev avatar paulmarsy avatar ralish avatar richardszalay avatar scottdware avatar scottmuc avatar sergey-s-betke avatar sethflowers avatar skalinets avatar thinkbeforecoding avatar weswigham avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.