View UD.browse.ps1
This file contains 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
# Put code you'd like to run during dashboard startup here. | |
New-UDDashboard -Title 'a' -Pages @( | |
# Create a page using the menu to the right -> | |
# Reference the page here with Get-UDPage | |
New-UDPage -Name 'Select a folder' -Content { | |
$Page:Path = $Env:USERPROFILE | |
New-UDPaper -Content { | |
New-UDAutocomplete -id 'myPath' -Value $Page:Path -Variant filled -FullWidth -OnLoadOptions { | |
$options = @( |
View Get-DscSplattedResource.ps1
This file contains 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
function Get-DscSplattedResource { | |
[CmdletBinding()] | |
Param( | |
[String] | |
$ResourceName, | |
[String] | |
$ExecutionName, | |
[hashtable] |
View kitchen.yml
This file contains 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
--- | |
# Check this doc: https://github.com/test-kitchen/kitchen-azurerm | |
# you may set the following environment variables: | |
# AZURE_CLIENT_ID="your-azure-client-id-here" | |
# AZURE_CLIENT_SECRET="your-client-secret-here" | |
# AZURE_TENANT_ID="your-azure-tenant-id-here" | |
# (check doc https://github.com/test-kitchen/kitchen-azurerm for more details) | |
driver: | |
name: azurerm |
View Invoke-SamplerGit.ps1
This file contains 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
<# | |
.SYNOPSIS | |
Executes git with the provided arguments. | |
.DESCRIPTION | |
This command executes git with the provided arguments and throws an error | |
if the call failed. | |
.PARAMETER Argument |
View dummy jinja composite.ps1
This file contains 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 MyComposite { | |
Params ( | |
$TemplateFilePath = 'MyJinja2Template.tpl', | |
$parameter1, | |
$parameter2 | |
) | |
$tempParamFile = [io.Path]::GetTempFileName() |
View DynamicParam.draft.ps1
This file contains 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
#region Get-TypeDynamicParam | |
function Get-DynamicParamFromTypeName { | |
Param( | |
[string] | |
$TypeName | |
) | |
function New-ParamAttribute { | |
Param( | |
[Parameter(Mandatory=$true,ValueFromPipeLine=$false,ValueFromPipelineByPropertyName=$true, position=0)] | |
[string] |
View MyDscConfig.ps1
This file contains 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 MyDscConfig { | |
# Import the module that has the 'ServerType' configuration | |
Import-DscResource -ModuleName Platform | |
# Import the module that has the 'Application' Configuration | |
Import-DscResource -ModuleName Product | |
$ConfigurationData.AllNodes.Nodename { | |
$ConfigurationData.Roles.($Node.Role).configurations.Foreach{ | |
$ConfigurationName = $_ | |
$ConfigurationParameters = $ConfigurationData.Roles.($Node.Role).($ConfigurationName) |
View Invoke-TestHandlerAction.ps1
This file contains 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
function Invoke-TestHandlerAction { | |
Param( | |
$Password, | |
$test, | |
$Datum, | |
$Node, |
View new_unattend_iso.ps1
This file contains 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
. '.\TestKitchen\script\IsoFile.ps1' | |
#create ISO with my Unattend.xml file | |
New-IsoFile -Source .\TestKitchen\Unattend.xml -Path .\TestKitchen\Unattendxml.iso -Force -Title MyISO |
View ConfigData.ps1
This file contains 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
$ConfigurationData = @{ | |
AllNodes = @( | |
@{ | |
Nodename = 'SRV01' | |
Role = 'ServerType1_Application' | |
}, | |
@{ | |
Nodename = 'SRV02' | |
Role = 'ServerType2_Application' | |
} |
NewerOlder