Skip to content

Instantly share code, notes, and snippets.

@stuartleeks
stuartleeks / Visual Studio Code - Dark.ps1xml
Created July 1, 2015 12:44
Powershell ISE theme - VS Code Dark
<?xml version="1.0" encoding="utf-16"?>
<StorableColorTheme xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Keys>
<string>ErrorForegroundColor</string>
<string>ErrorBackgroundColor</string>
<string>WarningForegroundColor</string>
<string>WarningBackgroundColor</string>
<string>VerboseForegroundColor</string>
<string>VerboseBackgroundColor</string>
<string>DebugForegroundColor</string>
@stuartleeks
stuartleeks / APIM-backup.ps1
Last active February 4, 2019 10:43
Script to expose commands for backing up and restoring Azure API Management configuration. See http://blogs.msdn.com/b/stuartleeks/archive/2015/04/29/azure-api-management-backing-up-and-restoring-configuration.aspx
# This accompanies http://blogs.msdn.com/b/stuartleeks/archive/2015/04/29/azure-api-management-backing-up-and-restoring-configuration.aspx
#
# see http://azure.microsoft.com/en-us/documentation/articles/api-management-howto-disaster-recovery-backup-restore/
# Auth for ARM: https://msdn.microsoft.com/library/dn790557.aspx
function Get-ArmToken
{
# Somewhat dirty approach as it uses values not directly obtained from cmdlets! But it saves provisioning an Azure AD application!
[CmdletBinding()]
param (
@stuartleeks
stuartleeks / baz
Last active August 29, 2015 14:16
dummy gist
baz
Get-ChildItem -Directory |%{
cd $_.FullName
git pull
cd..
}
@stuartleeks
stuartleeks / ImportAzureVmsIntoRdcMan-2.ps1
Last active June 3, 2022 19:53
PowerShell script to create a Remote Desktop Connection Manager configuration file for all Windows Azure Virtual Machines and PaaS role instances in a subscription.Requires Azure PowerShell cmdlets: http://www.windowsazure.com/en-us/documentation/articles/install-configure-powershell/. See this blog post for more information: http://blogs.msdn.c…
$rdcmanName = "Azure VMs"
$outputFileName = Get-Location | Join-Path -ChildPath "AzureVMs.rdg"
$xml = [xml]'<?xml version="1.0" encoding="utf-8"?>
<RDCMan programVersion="2.7" schemaVersion="3">
<file>
<credentialsProfiles />
<properties>
<expanded>True</expanded>
<name>Azure VMs</name>
@stuartleeks
stuartleeks / ImportAzureVmsIntoRdcMan.ps1
Last active February 24, 2017 15:43
PowerShell script to create a Remote Desktop Connection Manager configuration file for all Windows Azure Virtual Machines in a subscription.Requires Azure PowerShell cmdlets: http://www.windowsazure.com/en-us/documentation/articles/install-configure-powershell/. See this blog post for more info: http://blogs.msdn.com/b/stuartleeks/archive/2014/0…
$rdcmanName = "Azure VMs"
$outputFileName = Get-Location | Join-Path -ChildPath "AzureVMs.rdg"
$xml = [xml]'<?xml version="1.0" encoding="utf-8"?>
<RDCMan schemaVersion="1">
<version>2.2</version>
<file>
<properties>
<name>blog</name>
<expanded>True</expanded>