Carbon can be installed from a ZIP archive, from the PowerShell gallery, with Chocolatey, and NuGet.
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'
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'
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'
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 ';'