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
$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> |
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
$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> |
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-ChildItem -Directory |%{ | |
cd $_.FullName | |
git pull | |
cd.. | |
} |
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
baz |
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
# 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 ( |
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
<?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> |
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
[CmdletBinding()] | |
param ( | |
[string] $filename | |
) | |
$matches = $env:Path.Split(';') | %{ join-path $_ $filename} | ?{ test-path $_ } | |
if ($matches.Length -eq 0){ | |
"No matches found" | |
} else { |
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
function PascalName($name){ | |
$parts = $name.Split(" ") | |
for($i = 0 ; $i -lt $parts.Length ; $i++){ | |
$parts[$i] = [char]::ToUpper($parts[$i][0]) + $parts[$i].SubString(1).ToLower(); | |
} | |
$parts -join "" | |
} | |
function GetColumnInfo($headerRow, $propertyNames){ | |
$lastIndex = 0 | |
$lastName = $null |
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
using System; | |
using System.Configuration; | |
public static class CustomConfigurationManager | |
{ | |
private static CustomAppSettings _appSettings = new CustomAppSettings(); | |
public static CustomAppSettings AppSettings { get { return _appSettings; } } | |
} | |
public class CustomAppSettings | |
{ |
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
# Working on 1.0.0 preview of Azure PowerShell cmdlets | |
function GetAccessToken(){ | |
$psContext = Get-AzureRmContext | |
$context = [Microsoft.Azure.Common.Authentication.Models.AzureContext] $psContext | |
$account = $context.Account | |
$environment= $context.Environment | |
$tenant = $context.Tenant | |
$authFactory = [Microsoft.Azure.Common.Authentication.AzureSession]::AuthenticationFactory |
OlderNewer