Skip to content

Instantly share code, notes, and snippets.

Josh Duffney Duffney

Block or report user

Report or block Duffney

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View simpleWinStack.yaml
Type: AWS::EC2::Instance
ImageId: ami-0a9ca0496f746e6e0
InstanceType: t2.micro
- Key: Name
Value: "WinTest01"
- Key: NameOfService
Duffney / TeamCityAgentDSC.Build.ps1
Created Sep 19, 2017
TeamCityAgentDSC build script as of 9-19-2017
View TeamCityAgentDSC.Build.ps1
task . InstallDependencies, Analyze, Test, UpdateVersion, Clean, Archive
task InstallDependencies {
Install-Module Pester -Force
Install-Module PSScriptAnalyzer -Force
task Analyze {
$scriptAnalyzerParams = @{
Path = "$BuildRoot\DSCClassResources\TeamCityAgent\"
Duffney / Enable-IISRemoteManagement.ps1
Created Sep 6, 2017
View Enable-IISRemoteManagement.ps1
function Enable-IISRemoteManagement {
param (
if (-not (Test-Connection -ComputerName $_ -Quiet -Count 1)) {
throw "The computer [$_] could not be reached."
} else {
View Add-AclAccessRule.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.'
. "$here\$sut"
Describe "Add-ACLAccessRule Tests" {
New-Item -Name Logs -Path 'TestDrive:' -ItemType Directory
$application = 'DevOpsTest'
View Add-AclAccessRule.ps1
function Add-AclAccessRule {
Adds an access rule to an existing ACL on a folder or file.
Use .net methods to get the current ACL of the file or folder then generates a new rule
to which is added to the ACL of the file system object
$splat = @{
Path = 'C:\Logs'
Duffney / LCMPull.ps1
Last active May 4, 2017
LCM configuration to connect the pull server to the client node
View LCMPull.ps1
Configuration LCM_Pull {
Node Pull {
Settings {
ConfigurationMode = 'ApplyAndAutoCorrect'
RefreshMode = 'Pull'
Duffney / WebServer.ps1
Created Mar 6, 2017
Simple Web Server DSC Configuration for a DSC Pull Server
View WebServer.ps1
Configuration WebServer {
Import-DscResource -ModuleName 'PSDesiredStateConfiguration'
Import-DscResource -ModuleName "xWebAdministration"
Node WebServerConfig {
WindowsFeature WindowsServer {
Name = 'Web-Server'
Duffney / DscPullServer.ps1
Last active May 4, 2017
DSC config for v2 of the pull server
View DscPullServer.ps1
configuration DscPullServer
[string[]]$NodeName = 'localhost',
[string] $certificateThumbPrint,
View New-DomainSignedCertificate.ps1
function New-DomainSignedCertificate {
Duffney / DSCPullServerLab.psd1
Last active Nov 27, 2017
Configuration data for DSC pull server lab environment provisioning with Lability.
View DSCPullServerLab.psd1
AllNodes = @(
NodeName = '*'
Lability_SwitchName = 'External'
DomainName = ''
Lability_StartupMemory = 2GB;
PSDscAllowPlainTextPassword = $true;
You can’t perform that action at this time.