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-Module -Force AzureRM #run as administrator | |
# run all below as administrator!!! | |
# may get errors if done one bit as admin and one bit not, remove and start again in new window | |
# remember if using in releases to wrap passwords in double quotes in release! e.g. ""$(Password)"" | |
$failoverGroup = $true | |
$passwordOverride = $true | |
$adminPasswordOverride = $true | |
$secretOverride = $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
## Test Azure Resource Exists | |
clear-host | |
Write-Host "Test-AzureResourceExists Starting..." | |
if ([string]::IsNullOrEmpty($(Get-AzureRmContext).Account)) {Login-AzureRmAccount} | |
$resourceGroupName = "test-rg" | |
$resourceNames = @("test1", "test2") | |
$resourceExists = 0 | |
if (-Not(Get-AzureRmResourceGroup | where {$_.ResourceGroupName -eq $resourceGroupName } | Select Name)) { | |
Write-Host "Resource group does not exist!" -ForegroundColor Red | |
##break |
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( | |
[string]$testScript, | |
[string]$resourceGroupName | |
) | |
## $testScript = .\AzureTest\Test-AzureResourceExists.tests.ps1 | |
Write-Host "Executing Pester tests..." | |
$outputPath = $testScript.replace("Tests.ps1","xml"); |
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
## Test Azure Resource Exists | |
clear-host | |
Write-Host "Test-SQL Starting..." | |
$serverName = "test-griff.database.windows.net" | |
$databaseName = "AdventureWorksLT" | |
$password = ConvertTo-SecureString "5up3r53cr3t!" -AsPlainText -Force #need to convert to key vault get |
Column1 | Column2 |
---|
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
<# | |
//Amend the values below to represent your environment | |
string connectionName = "Datawarehouse"; | |
string serverName = "localhost"; | |
string databaseName = "AdventureWorksDW"; | |
string schemaName = "dbo"; | |
var includedSchemas = new List<string>{schemaName}; |
OlderNewer