about_Carbon_Installation

Carbon can be installed from a ZIP archive, from the PowerShell gallery, with Chocolatey, and NuGet.

Install From Zip Archive

  1. Download the ZIP file from GitHub.
  2. Unblock the zip file (right-click the .zip file, choose Properties, click "Unblock", then click "OK").
  3. Unzip the Carbon module anywhere on your file system.

You can now import module using the Import-Carbon.ps1 script:

PS> .\Carbon\Import-Carbon.ps1

To make Carbon available so you can run Import-Module Carbon, copy the Carbon directory into one of PowerShell's module paths. This command will you a list:

PS> $env:PSModulePath -split ';'

Once you do, you can import Carbon by running:

PS> Import-Module 'Carbon'

Install From Powershell Gallery

To install from the PowerShell Gallery, you must be running PowerShell 5 or PowerShell 4 with the Package Management PowerShell Modules Preview installed.

To install, run:

PS> Install-Module -Name 'Carbon' -AllowClobber

Note: You need the -AllowClobber switch because Windows 10/2016 ships with modules that contain functions with the same name as some of Carbon's functions.

You can now import Carbon by running:

PS> Import-Module 'Carbon'

Install With Chocolatey

To install with Chocolatey, you'll need Chocolatey installed. With Chocolatey installed, run:

PS> choco install Carbon

This will install Carbon into one of PowerShell's module paths. You can now import Carbon by running:

PS> Import-Module 'Carbon'

Install With Nuget

To install with NuGet, you'll need NuGet installed. With NuGet installed, run:

PS> nuget install Carbon

This will create a Carbon-X.Y.Z directory in your current directory (or the output directory you specified with Nuget's OutputDirectory parameter). You can import Carbon from that directory using the `Import-Carbon.ps1 script:

PS> .\Carbon-X.Y.Z\Carbon\Import-Carbon.ps1

Or with PowerShell's Import-Module command:

PS> Import-Module '.\Carbon-X.Y.Z\Carbon'

If you want Carbon available so you can run Import-Module Carbon, copy the Carbon-X.Y.Z\Carbon directory into one of PowerShell's module paths. This command will give you a list:

PS> $env:PSModulePath -split ';'

See Also