My Profile Photo Title

Thoughts about DevOps and automation from a Windows guy


POSHOrigin - Installation feature image

POSHOrigin - Installation

This article is Part 2 in a 9-Part series about POSHOrigin, a PowerShell module that aims to assist you in managing your Infrastructure via custom PowerShell DSC resources.

POSHOrigin on GitHub→

Setup / Initialization

Download Windows Management Framework 5 Production Preview

POSHOrigin uses class based DSC resources therefore PowerShell 5 is required. This is only required on the machine that is executing the configuration.

If you have Chocolatey already installed on your machine, just run the following to install WMF 5.

choco install powershell -pre

To install Chocoletey, run the following:

iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))

If you want to install WMF 5 manually, use this link.

Download POSHOrigin

Run the following commands to download the module from GitHub and extract it to your modules folder. Make sure you run PowerShell as Administrator so it can extract the module to ${env:ProgramFiles}\WindowsPowershell\Modules.

1
2
3
4
Invoke-WebRequest -Uri 'https://github.com/devblackops/POSHOrigin/archive/master.zip' -OutFile "$env:UserProfile\Downloads\POSHOrigin-master.zip"
UnBlock-File -Path "$env:UserProfile\Downloads\POSHOrigin-master.zip"
Expand-Archive -Path "$env:UserProfile\Downloads\POSHOrigin-master.zip" -DestinationPath "$env:ProgramFiles\WindowsPowershell\Modules" -Force
Move-Item -Path "$env:ProgramFiles\WindowsPowershell\Modules\POSHOrigin-master" -Destination "$env:ProgramFiles\WindowsPowershell\Modules\POSHOrigin"

Verify the module

Verify that the module is correctly installed by running the following:

Get-Module -Name POSHOrigin -ListAvailable

Initialize POSHOrigin

Initialize-POSHOrigin -Verbose

Initializing POSHOrigin will do the following:

  1. Initializes the POSHOrigin configuration repository that will hold default values for cmdlet parameters. By default this will be $env:UserProfile.poshorigin.
  2. Configures the DSC Local Configuration Manager on the local host for PUSH mode.
  3. Enables PS remoting.
  4. Sets WSMan TrustedHosts to ‘*’ in order to allow PowerShell remoting to a machine by IP address.

Cheers

Sharing is caring