Skip to content

Instantly share code, notes, and snippets.

View vhusker's full-sized avatar

Jacob Benson vhusker

  • Ardalyst
  • Omaha, NE
View GitHub Profile
Configuration TestPendingReboot{
Param(
[string]$ComputerName='localhost'
)
Import-DSCResource -ModuleName xPendingReboot
Node $ComputerName{
@vhusker
vhusker / gist:5154be88128faf6182af
Created March 9, 2015 01:42
Build Domain Controller for a DSC Demo
$ConfigData =@{
AllNodes = @(
@{NodeName = 'localhost';
PSDSCAllowPlainTextPassword = $True
}
)
}
Configuration BuildDC{
@vhusker
vhusker / BuildPullServer
Last active March 12, 2016 16:46
Build Pull Server for a DSC Demo
$ConfigData =@{
AllNodes = @(
@{
NodeName = "localhost"
PSDSCAllowPlainTextPassword = $True
}
)
}
@vhusker
vhusker / BuildAppServer
Created March 10, 2015 11:59
Build App Server for a DSC Demo
$ConfigData =@{
AllNodes = @(
@{
NodeName = "localhost"
PSDSCAllowPlainTextPassword = $True
}
)
}
@vhusker
vhusker / LabAppServerPullConfig
Created March 10, 2015 12:09
Build Lap App Server Pull Configuration
Configuration LabAppServerPullConfig{
param(
[string]$ComputerName
)
Import-DscResource -ModuleName xTimeZone
@vhusker
vhusker / AppServerLCM
Created March 10, 2015 12:33
Set App Server Local Configuration
Configuration PushLCMConfig{
param(
[parameter(Mandatory=$True)]
[ValidateNotNullorEmpty()]
[string]$ComputerName
)
Node $ComputerName{
@vhusker
vhusker / BuildWebServer
Last active March 12, 2016 16:43
Build Web Server for a DSC Demo
$ConfigData =@{
AllNodes = @(
@{
NodeName = "localhost"
PSDSCAllowPlainTextPassword = $True
}
)
}
@vhusker
vhusker / gist:412f1017daefa442c932
Created March 13, 2015 14:27
Get combined desktop size of all users on a Terminal Server
#This can definitely be condensed into a line or two but this is a good illustration of the way I worked my way through this task
$DesktopFolders = Get-ChildItem -Path C:\Users\*\Desktop -Recurse
$DesktopFoldersSize = $DesktopFolders | Measure-Object -Property Length -Sum
$DesktopFolderSize
Count : 16072
Average :
Sum : 22536515116
Maximum :
Minimum :
@vhusker
vhusker / gist:eaf1670f333c9c0518e1
Last active August 29, 2015 14:21
Azure TFS Deployment w/DSC Extension Failure
VERBOSE: [2015-05-15T19:52:37] File lock does not exist: begin processing
VERBOSE: [2015-05-15T19:52:37] Installing the DSC Extension...
VERBOSE: [2015-05-15T19:52:37] Creating
C:\Packages\Plugins\Microsoft.Powershell.DSC\1.9.0.0\bin\..\DSCWork\1-InProgress.Install.dsc...
VERBOSE: [2015-05-15T19:52:37] Reading handler environment from
C:\Packages\Plugins\Microsoft.Powershell.DSC\1.9.0.0\bin\..\HandlerEnvironment.json
VERBOSE: [2015-05-15T19:52:38] Writing handler status to C:\Packages\Plugins\Microsoft.Powershell.DSC\1.9.0.0\Status\0.status
VERBOSE: [2015-05-15T19:52:40] File
C:\Packages\Plugins\Microsoft.Powershell.DSC\1.9.0.0\bin\..\DSCWork\1-InProgress.Install.dsc exists; install in progress.
VERBOSE: [2015-05-15T19:52:40] Installing DSC Extension...
@vhusker
vhusker / Import-Module -Name Azure Breaks ISE
Created May 19, 2015 13:33
Import-Module -Name Breaks ISE
$> $PSVersionTable
Name Value
---- -----
PSVersion 5.0.10074.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.0