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
| #Creates Terraform App Account | |
| Param ( | |
| $ApplicationName="Terraform", | |
| $AppURL="http://terraform.io", | |
| [Parameter(Mandatory=$true)]$AppPassword, | |
| $AppRoleAssigned="Owner" | |
| ) | |
| $Account = Login-AzureRmAccount | |
| $Subs = Get-AzureRmSubscription |
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 TestPull | |
| { | |
| Import-DscResource -ModuleName 'PSDesiredStateConfiguration' | |
| Node dscclient.example.com | |
| { | |
| File tempFolder | |
| { | |
| Ensure = 'Present' | |
| DestinationPath = 'C:\Temp' | |
| Type = 'Directory' |
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
| if (!($guid)) {[Guid]$Guid = Read-Host "Paste GUID for client here:"} | |
| $NewPullClientMof = "C:\DSC\NewPullClient\pullclient.example.com.mof" | |
| $GuidPullClientMof = "C:\Program Files\WindowsPowerShell\DscService\Configuration\$($guid.guid).mof" | |
| Copy-Item -Path $NewPullClientMof -Destination $GuidPullClientMof | |
| New-DSCChecksum $NewPullClientMof |
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
| [DSCLocalConfigurationManager()] | |
| Configuration LCM_HTTPSPULL | |
| { | |
| param | |
| ( | |
| [Parameter(Mandatory=$true)] | |
| [string[]]$ComputerName, | |
| [Parameter(Mandatory=$true)] | |
| [string]$guid |
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
| Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | |
| Install-Module xPSDesiredStateConfiguration -Force | |
| configuration CreatePullServer | |
| { | |
| param | |
| ( | |
| [Parameter(Mandatory=$true)][string[]]$ComputerName, | |
| [Parameter(Mandatory=$true)][string]$CertThumbprint | |
| ) |
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 InstallApp | |
| { | |
| Param( | |
| [Parameter(Mandatory=$true)][ValidateNotNullorEmpty()][PsCredential]$credential | |
| ) | |
| Import-DscResource -ModuleName 'PSDesiredStateConfiguration' | |
| Node $AllNodes.NodeName | |
| { | |
| LocalConfigurationManager |
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(Mandatory=$true)][ValidateNotNullorEmpty()]$ComputerName, | |
| $publicKeysLocation = "C:\DSC\publicKeys\", | |
| $configDataLocation = "C:\DSC\ConfigData\" | |
| ) | |
| $DSCCert = Invoke-Command -ComputerName $ComputerName -ScriptBlock { | |
| dir cert:\LocalMachine\My | ? { $_.EnhancedKeyUsageList -match "Document Encryption"} | |
| } |
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 TestPush | |
| { | |
| Import-DscResource -ModuleName 'PSDesiredStateConfiguration' | |
| Node dscclient.example.com | |
| { | |
| File tempFolder | |
| { | |
| Ensure = 'Present' | |
| DestinationPath = 'C:\Temp' | |
| Type = 'Directory' |
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 TestConfig | |
| { | |
| Param( | |
| $FolderName | |
| ) | |
| Import-DscResource -ModuleName 'PSDesiredStateConfiguration' | |
| Node localhost | |
| { | |
| File tempFolder | |
| { |
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 NewDomain | |
| { | |
| param | |
| ( | |
| [Parameter(Mandatory)] | |
| [pscredential]$safemodeAdministratorCred, | |
| [Parameter(Mandatory)] | |
| [pscredential]$domainCred | |
| ) |