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.
- Part 1 - POSHOrigin - Summary
- Part 2 - POSHOrigin - Installation <<
- Part 3 - POSHOrigin - Configuration File
- Part 4 - POSHOrigin - Defaults File
- Part 5 - POSHOrigin - Load, Test, and Execute Configurations
- Part 6 - POSHOrigin - Sharing Configurations
- Part 7 - POSHOrigin - Credential Resolvers
- Part 8 - POSHOrigin - Examples
- Part 9 - POSHOrigin - Wrapping Up
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.
To install Chocoletey, run the following:
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:
Initialize POSHOrigin
Initializing POSHOrigin will do the following:
- Initializes the POSHOrigin configuration repository that will hold default values for cmdlet parameters. By default this will be $env:UserProfile.poshorigin.
- Configures the DSC Local Configuration Manager on the local host for PUSH mode.
- Enables PS remoting.
- Sets WSMan TrustedHosts to ‘*’ in order to allow PowerShell remoting to a machine by IP address.
Cheers