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
#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 OdbcConfig | |
{ | |
Param( | |
[Parameter(Mandatory=$true)][ValidateNotNullorEmpty()]$SQLServerName, | |
[Parameter(Mandatory=$true)][ValidateNotNullorEmpty()]$DatabaseName, | |
[Parameter(Mandatory=$true)][ValidateNotNullorEmpty()]$ODBCName, | |
[Parameter(Mandatory=$true)][ValidateNotNullorEmpty()]$ComputerName | |
) | |
Import-DscResource -ModuleName 'PSDesiredStateConfiguration' | |
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 PullClientConfigNames | |
{ | |
Node $AllNodes.NodeName | |
{ | |
Settings | |
{ | |
RefreshMode = 'Pull' | |
RefreshFrequencyMins = 30 | |
RebootNodeIfNeeded = $true |
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 ServerBuild | |
{ | |
Import-DscResource -ModuleName 'PSDesiredStateConfiguration' | |
Node $AllNodes.NodeName | |
{ | |
File ServerBuild | |
{ | |
DestinationPath = "C:\ServerBuild-1.txt" | |
Type = "File" |
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
$RemoteHostName = $ENV:ComputerName | |
$ComputerName = $ENV:ComputerName | |
Write-Host "Setup WinRM for $RemoteHostName" | |
$Cert = New-SelfSignedCertificate -DnsName $RemoteHostName, $ComputerName ` | |
-CertStoreLocation "cert:\LocalMachine\My" | |
$Cert | Out-String |
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( | |
$UserAccountName="HypervUser", | |
$UserAccountPassword="P@ssw0rd1" | |
) | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart | |
Install-WindowsFeature RSAT-Hyper-V-Tools -IncludeAllSubFeature | |
NET USER $UserAccountName $UserAccountPassword /ADD | |
NET LOCALGROUP "Administrators" $UserAccountName /add | |
Enable-PSRemoting -Force |
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( | |
$ServerName = "WIN-VCEI81MP4AD", | |
$UserAccountName="HypervUser", | |
$UserAccountPassword="P@ssw0rd1" | |
) | |
#The next line actually installs ALL hyper-v features including the hypervisor, | |
# I haven't had time to fix this yet so if this isn't acceptable you should | |
# remove the line and install the hyper-v client tools manually | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-Clients -all -NoRestart |
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
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": {}, | |
"variables": {}, | |
"resources": [ | |
{ | |
"type": "Microsoft.Storage/storageAccounts", | |
"name": "randomstorage676", | |
"apiVersion": "2015-06-15", |
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
New-AzureRmResourceGroup -Name ExampleGroup -Location "North Europe" | |
New-AzureRmResourceGroupDeployment -Name ExampleGroupDeploy -ResourceGroupName ExampleGroup -TemplateFile BasicStorage.JSON |