This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Cookbook Name:: demo_dsc | |
| # Recipe:: wmf5install | |
| # | |
| # Copyright (c) 2016 vNiklas, All Rights Reserved. | |
| #lets rocknroll | |
| powershell_script 'updatewmfto5' do | |
| code <<-EOH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param ( | |
| [Parameter()] | |
| [ValidateSet('VMM','OM','DPM','SCORH','SM','All')] | |
| [String] $Component = 'All', | |
| [Parameter()] | |
| [String] $Destination = $env:TEMP | |
| ) | |
| Begin { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #requires -version 5.0 | |
| Function Compare-Module { | |
| <# | |
| .Synopsis | |
| Compare module versions. | |
| .Description | |
| Use this command to compare module versions between what is installed against an online repository like the PSGallery. Results will be automatically sorted by module name. | |
| .Parameter Name | |
| The name of a module to check. Wildcards are permitted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # upgrading puppet with choco | |
| # | |
| # Niklas Akerlund | |
| # Get version of puppet agent | |
| $puppetversion = & puppet agent --version | |
| # Get the latest run of puppet | |
| $lastrun = Get-WinEvent -ProviderName Puppet -MaxEvents 35 | where {$_.Message -like "*Finished*" -or $_.Message -like "Applied*"} | sort TimeCreated -Descending | select -First 1 | select -ExpandProperty TimeCreated | |
| $datenow = Get-Date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Param ( | |
| ## The directory into which the user wishes to download the files. | |
| [string]$directory = $PSScriptRoot, | |
| ## Optional parameter allowing the user to specifiy the code (or comma seperated codes) of the video(s) they wish to download. | |
| [string]$sessionCodes = "", | |
| [switch]$onlyppt, | |
| [switch]$onlyvideo | |
| ) | |
| ### Variables ### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| configuration IISInstall | |
| { | |
| node "localhost" | |
| { | |
| WindowsFeature IIS | |
| { | |
| Ensure = "Present" | |
| Name = "Web-Server" | |
| } | |
| } |