Skip to content

Instantly share code, notes, and snippets.

View nmackenzie's full-sized avatar

Neil Mackenzie nmackenzie

  • Microsoft
  • San Francisco, CA
View GitHub Profile
<PerformanceCounters bufferQuotaInMB="512" scheduledTransferPeriod="PT2M">
<PerformanceCounterConfiguration counterSpecifier=
"\Processor(_Total)\% Processor Time" sampleRate="PT30S" />
<PerformanceCounterConfiguration counterSpecifier=
"\Memory\Available MBytes" sampleRate="PT30S" />
<PerformanceCounterConfiguration counterSpecifier=
"\Memory\Committed MBytes" sampleRate="PT30S" />
<PerformanceCounterConfiguration counterSpecifier=
"\Web Service(_Total)\ISAPI Extension Requests/sec" sampleRate="PT1M" />
<PerformanceCounterConfiguration counterSpecifier=
@nmackenzie
nmackenzie / load-balanced-VMs.ps1
Last active September 25, 2015 14:55
Create a load-balanced pair of Azure VMs
$testName = "lower-case-unique-name"
$resourceGroupName = $testName
$location = "West US"
$domainName = $testName
$subnetName = "Subnet-1"
$publisher = "MicrosoftWindowsServer"
$offer = "WindowsServer"
@nmackenzie
nmackenzie / one-VM.ps1
Last active October 22, 2015 16:08
Create an Azure VM with a public instance-level IP address
$testName = "lower-case-unique-name"
$resourceGroupName = $testName
$location = "West US"
$publisher = "MicrosoftWindowsServer"
$offer = "WindowsServer"
$sku = "2012-R2-Datacenter"
$version = "latest"
@nmackenzie
nmackenzie / CreateHostedService
Created June 8, 2013 20:02
Payload for a Create Hosted Service operation against the Windows Azure Service Management REST API
<CreateHostedService xmlns="http://schemas.microsoft.com/windowsazure">
<ServiceName>SERVICE_NAME</ServiceName>
<Label>U3VsYXNnZWlyIFRlc3QgU2VydmljZQ==</Label>
<AffinityGroup>AFFINITY_GROUP_NAME</AffinityGroup>
</CreateHostedService>
@nmackenzie
nmackenzie / CreateVirtualMachineDeployment
Last active December 18, 2015 05:59
Sample payload for a Create Virtual Machine Deployment operation in the Windows Azure Service Management REST API
<Deployment xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Name>DEPLOYMENT_NAME</Name>
<DeploymentSlot>Production</DeploymentSlot>
<Label>Deployment 0.1</Label>
<RoleList>
<Role>
<RoleName>COMPUTER_NAME</RoleName>
<RoleType>PersistentVMRole</RoleType>
<ConfigurationSets>
<ConfigurationSet>
@nmackenzie
nmackenzie / AddRole
Last active December 18, 2015 05:59
Sample payload for the Add Role operation in the Windows Azure Service Management REST API
<PersistentVMRole xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<RoleName>COMPUTER_NAME</RoleName>
<RoleType>PersistentVMRole</RoleType>
<ConfigurationSets>
<ConfigurationSet>
<ConfigurationSetType>WindowsProvisioningConfiguration</ConfigurationSetType>
<ComputerName>COMPUTER_NAME</ComputerName>
<AdminPassword>PASSWORD</AdminPassword>
<AdminUsername>USER_NAME</AdminUsername>
<EnableAutomaticUpdates>true</EnableAutomaticUpdates>
@nmackenzie
nmackenzie / CreateHostedServicesHeader
Created June 8, 2013 22:17
Sample request header for Create Hosted Services operation in the Windows Azure Service Management REST API
POST /MY_SUBSCRIPTION/services/hostedservices HTTP/1.1
Host: management.core.windows.net
x-ms-version: 2013-06-01
Content-Type: application/xml
@nmackenzie
nmackenzie / CreateVirtualMachineDeploymentHeader
Created June 8, 2013 22:19
Sample header for the Create Virtual Machine deployment in the Windows Azure Service Management REST API
POST /MY_SUBSCRIPTION/services/hostedservices/SERVICE_NAME/deployments HTTP/1.1
x-ms-version: 2013-06-01
Host: management.core.windows.net
Content-Type: application/xml
@nmackenzie
nmackenzie / AddRoleHeader
Created June 8, 2013 22:22
Sample header for the Add Role operation in the Windows Azure Service Management REST API
POST /MY_SUBSCRIPTION/services/hostedservices/SERVICE_NAME/deployments/DEPLOYMENT_NAME/roles HTTP/1.1
x-ms-version: 2013-06-01
Host: management.core.windows.net
Content-Type: application/xml
using System;
using System.Collections.Generic;
[EventSource(Name = "MyDomain-MyEventSource")]
public class MyEventSource : EventSource
{
public class Keywords
{
public const EventKeywords Database = (EventKeywords)1;
public const EventKeywords ExternalApi = (EventKeywords)2;
}