Skip to content

Instantly share code, notes, and snippets.

View bateskevin's full-sized avatar

Kevin Bates bateskevin

View GitHub Profile
@bateskevin
bateskevin / Invoke-DockerPester.ps1
Created February 14, 2020 17:12
Running Pester Tests from Module in Linux Containers with Powershell
Function Invoke-DockerPester {
param(
$ContainerName = "DockerPester",
$Image,
$InputFolder,
$PathOnContainer = "/var",
$PathToTests
)
if(!($PathToTests)){
@bateskevin
bateskevin / Invoke-DSCResource_Splat.ps1
Last active February 24, 2020 11:22
Demo code for splatting problem
#Array for Hashtables that are going to be passed to Invoke-DSCResource
$SplatParam = @()
#Defining Hashtables
$Param1 = @{}
$Properties1 = @{}
$Properties1.ValueName = "EnumerateAdministrators"
$Properties1.Key = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\CredUI\EnumerateAdministrators"
$Properties1.ValueType = "Dword"
@bateskevin
bateskevin / Invoke-DSCResource_Splat.ps1
Created February 10, 2020 07:01
Demo code for splatting problem
$SplatParam = @()
$Param1 = @{}
$Properties1 = @{}
$Properties1.ValueName = "EnumerateAdministrators"
$Properties1.Key = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\CredUI\EnumerateAdministrators"
$Properties1.ValueType = "Dword"
$Properties1.ValueData = 0