This file contains 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
$container_name = 'sqlbackups' | |
$blob_name = 'mydb-2018-9-19-7-32.bacpac' | |
$destination_file = 'c:\temp\mybackup.bacpac' | |
$storage_account = '' | |
$storage_key = '' | |
az storage blob download ` | |
--container-name $container_name ` | |
--name $blob_name ` | |
--file $destination_file ` |
This file contains 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
# Connect-AzureRmAccount | |
$location = "West Europe" | |
$publisher = "MicrosoftSQLServer" | |
$offer = "SQL2014SP2-WS2012R2" | |
$sku = "Standard" | |
Get-AzureRmVMImagePublisher -Location $location | where-object {$_.PublisherName.Contains("SQLServer")} | |
#Get-AzureRmVMImageOffer -Location $location -PublisherName $publisher | |
#Get-AzureRmVMImageSku -Location $location -PublisherName $publisher -Offer $offer | |
#Get-AzureRmVMImage -Location $location -PublisherName $publisher -Offer $offer -Skus $sku |
This file contains 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
## SQL Server Linux | |
docker run --name sqlserver -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Pa$$w0rd' -p 1433:1433 -d microsoft/mssql-server-linux | |
## SQL Server Windows | |
docker run --name sqlserver -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Pa$$w0rd' -p 1433:1433 -d microsoft/mssql-server-windows-developer | |
## Postgres | |
docker run --name postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres | |
## Neo4j (connect via http://localhost:7474 with U/P neo4j/neo4j |
This file contains 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
Get-WmiObject -Class Win32_NTEventLOgFile | Select-Object FileName, Sources |
This file contains 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
write-output "This is a pre-commit powershell call" | |
write-output "=======================================" | |
Import-Module -Name PSScriptAnalyzer | |
$changes = git diff --name-only | |
$output = @() | |
foreach ($change in $changes) | |
{ |
This file contains 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
#Requires -RunAsAdministrator | |
<# | |
Workstation Configuration | |
Uses chocolately to install a standard set of software used regularly | |
view log: C:\ProgramData\chocolatey\logs\chocolatey.log | |
This file contains 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
# Markdown By Example | |
> - [Block-Elements](#block-elements) | |
> Block elements are standard text blocks | |
> - [Headers](#headers) | |
> - [Links](#links) | |
> - [Text](#text) | |
> - [Lists](#lists) | |
> - [Tables](#tables) | |
> - [Quotes](#quotes) |
This file contains 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
# Create a profile (cookbook) | |
inspec init profile SQLServerSecurity | |
# check profile is valid | |
insec check SQLServerSecurity | |
# Run single inspec.rb file | |
inspec exec mytest.rb | |
# Run a profile |
This file contains 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
SHIFT+ALT+F (or press F1 and type Format and select Format Document). |
This file contains 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
## list the run_lists on a node | |
knife node run_list list <NODE> -r | |
## Set a run_list | |
knife node run_list <NODE> 'recipe[iis]' | |
## Add an item before | |
knife node run_list add <NODE> recipe[basicconfig::join_ad] -b recipe[iis] | |
## Add an item after |