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
| ip_configuration { | |
| name = "${var.vm_name_prefix}-${count.index}-ipConfig" | |
| subnet_id = "${azurerm_subnet.subnet1.id}" | |
| private_ip_address_allocation = "dynamic" | |
| load_balancer_backend_address_pools_ids = ["${azurerm_lb_backend_address_pool.backend_pool.id}"] | |
| load_balancer_inbound_nat_rules_ids = ["${element(azurerm_lb_nat_rule.winrm_nat.*.id, count.index)}"] | |
| } |
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)]$Domain, | |
| [Parameter(Mandatory=$true)]$User, | |
| [Parameter(Mandatory=$true)]$computerName | |
| ) | |
| $WindowsAccount = Get-WmiObject -Class Win32_Account -Filter "Domain='$($domain)' and Name='$($user)'" | |
| if ($WindowsAccount) { | |
| #### Add user/group into the local group |
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 | |
| ) |
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 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
| 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 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
| 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
| [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
| 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 |