Skip to content

Instantly share code, notes, and snippets.

View SvenAelterman's full-sized avatar

Sven Aelterman SvenAelterman

View GitHub Profile
# A valid password requires a length of 12 and at least one upper/lower/digit
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*"
# Generate a random string of 12 characters to make the names unique and to use as a password
while ! echo $random12 | grep -P "(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*"
do
random12=$(head /dev/urandom | tr -dc a-zA-Z0-9 | fold -w 12 | head -n 1)
done
region="eastus"
group="rg-disk-test-$random12"

Keybase proof

I hereby claim:

  • I am svenaelterman on github.
  • I am svenaelterman (https://keybase.io/svenaelterman) on keybase.
  • I have a public key ASBZCmBChaaiWq4ThPJNCgWm7WQN4D3dTXM0fLujQ1z59go

To claim this, I am signing this object:

@SvenAelterman
SvenAelterman / Configure-Sql2017RS.ps1
Last active February 9, 2024 10:07
PowerShell script to configure SQL Server 2017 Reporting Services
<#
#>
function Get-ConfigSet()
{
return Get-WmiObject –namespace "root\Microsoft\SqlServer\ReportServer\RS_SSRS\v14\Admin" `
-class MSReportServer_ConfigurationSetting -ComputerName localhost
}
# Allow importing of sqlps module
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
@SvenAelterman
SvenAelterman / FirewallRules.ps1
Last active July 2, 2017 20:24
Azure SQL DB PowerShell script for managing firewall rules
Login-AzureRmAccount
Select-AzureRmSubscription -SubscriptionName 'Your Subscription Name'
$RgName = 'Your Resource Group Name'
$SrvName = 'Your SQL Server Name'
$staticIps = "1.2.3.4", "1.2.3.5"
$ruleNames = "Rule 1", "Rule 2"
$i = 0
@SvenAelterman
SvenAelterman / Response.json
Last active May 6, 2018 22:18
VS2017 Response.json for silent install
{
"installChannelUri": ".\\ChannelManifest.json",
"channelUri": "https://aka.ms/vs/15/release/channel",
"installCatalogUri": ".\\Catalog.json",
"channelId": "VisualStudio.15.Release",
"productId": "Microsoft.VisualStudio.Product.Enterprise",
"includeRecommended": true,
"includeOptional": true,
"productKey": "AAAAABBBBBCCCCCDDDDDEEEEE",