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
| # config settings - get DNS Server addresses from the portal under the AAD Domain Services blade | |
| $vnetName = 'northeurope-vnet' | |
| $vnetRg = 'domain-services-rg' | |
| $dnsServer1 = '10.0.0.4' | |
| $dnsServer2 = '10.0.0.5' | |
| $vnet = get-azurermvirtualnetwork -Name $vnetName -ResourceGroupName $vnetRg | |
| # Add the DNS Server values to the VNET var | |
| $vnet.DhcpOptions.DnsServers = $dnsServer1 |
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
| Describe 'Management VM Config' { | |
| Context 'Management Tools' { | |
| It 'Should have the Remote Server Admin Tools AD feature installed' { | |
| (Get-WindowsFeature -Name RSAT-AD-Tools).installed | Should Be $true | |
| } | |
| It 'Should have the Remote Server Admin Tools AD PowerShell feature installed' { | |
| (Get-WindowsFeature -Name RSAT-AD-PowerShell).installed | Should Be $true | |
| } | |
| It 'Should have the Remote Server Admin Tools DNS feature installed' { |
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
| workflow Stop-MDAzureRMVMByTag { | |
| <# | |
| Stop a VM based on the powerOffTime tag value of the VM and the powerOffTime value of the parameter passed to the script. | |
| The time can be passed through via the schedule of the workbook or the default time of 23:00 will be used. | |
| This runs against a specified subscription passed in via the automation variable 'subscriptionName' | |
| Matt Davis 5th Aug 2017 | |
| #> | |
| Param( | |
| [Parameter (Mandatory = $false)] | |
| [String] $powerOffTime = "23:00" |
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
| --- | |
| driver: | |
| name: ec2 | |
| instance_type: t2.micro | |
| retryable_tries: 120 | |
| provisioner: | |
| name: chef_zero | |
| verifier: |
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
| FROM microsoft/powershell | |
| Run powershell -Command Install-Module -Name AWSPowerShell.NetCore -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
| AWSTemplateFormatVersion: 2010-09-09 | |
| Description: Creates an S3 bucket given the owner full control. | |
| Parameters: | |
| BucketName: | |
| Description: Name of the S3 bucket must be globally unique and can contain lowercase characters, numbers and hyphens | |
| Type: String | |
| ProjectTag: | |
| Description: Tag value for the project | |
| Type: String | |
| Resources: |
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
| AWSTemplateFormatVersion: 2010-09-09 | |
| Description: Creates an S3 bucket giving the owner full control. | |
| Parameters: | |
| BucketName: | |
| Description: Name of the S3 bucket must be globally unique and can contain lowercase characters, numbers and hyphens | |
| Type: String | |
| ProjectTag: | |
| Description: Tag value for the project | |
| Type: String | |
| Resources: |
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
| [ | |
| { | |
| "ParameterKey": "BucketName", | |
| "ParameterValue": "matt-vsts-bucket", | |
| "UsePreviousValue": false | |
| }, | |
| { | |
| "ParameterKey": "ProjectTag", | |
| "ParameterValue": "vsts", | |
| "UsePreviousValue": false |
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
| #Distributor ID: Ubuntu | |
| #Description: Ubuntu 14.04.5 LTS | |
| #Release: 14.04 | |
| #Codename: trusty | |
| sudo apt-get update | |
| sudo apt-get upgrade -y | |
| sudo apt-get install python-pip -y | |
| pip install --upgrade pip | |
| sudo pip install markupsafe |
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
| <# | |
| Gets the attached volumes of the specified instance and shows the latest snapshots for each volume | |
| #> | |
| # Case sensitive! | |
| $InstanceName = 'AWS-IE-DC-01' | |
| # Create an EC2 filter to find the instance with the corresponding Name tag (if you don't Name your instances, use another tag value) | |
| $instanceFilter = New-Object Amazon.EC2.Model.Filter | |
| $instanceFilter.Name = 'tag:Name' |