Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Github en profile

Jacqueline edited this page Sep 17, 2016 · 3 revisions

Powershell PackageManagement

PackageManagement aka OneGet is een package manager manager. Hiermee kun je package repositories toevoegen en beheren. Zie hier een lijst van OneGet Providers https://github.com/OneGet/oneget/issues/77. Zie hier: https://blogs.msdn.microsoft.com/powershell/2016/03/08/package-management-preview-march-2016-for-powershell-4-3-is-now-available/

Chocolatey bevat Windows packages: https://chocolatey.org/.

PsGet is de Powershell Module gallery http://psget.net/

Installeer Msysgit met OneGet

Import-Module PackageManagement
Get-PackageSource -Provider chocolatey
Install-Package git

Clone een repo

git clone https://github.com/jacqinthebox/powershell-training.git

Installeer Posh-Git

De module Posh-Git https://github.com/dahlbyk/posh-git verzorgt Git en Powershell integratie waaronder een mooie prompt. Deze kan geinstalleerd worden met PsGet:

Install-Module posh-git

Create a Powershell profile (or edit your existing profile)

new-item $profile -force
notepad $profile

Copy this code

Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)

# Load posh-git module from current directory
# Import-Module .\posh-git

# If module is installed in a default location ($env:PSModulePath),
# use this instead (see about_Modules for more information):
Import-Module posh-git


# Set up a simple prompt, adding the git prompt parts inside git repos
function global:prompt {
    $realLASTEXITCODE = $LASTEXITCODE

    Write-Host($pwd.ProviderPath) -nonewline

    Write-VcsStatus

    $global:LASTEXITCODE = $realLASTEXITCODE
    return "> "
}

Pop-Location

Start-SshAgent -Quiet

cd ~

Resultaat:

Clone this wiki locally