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 Microsoft.Azure.Management.ResourceManager; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Microsoft.Rest; | |
using Microsoft.Azure.Management.Network; | |
using Microsoft.Azure.Management.Network.Models; |
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
public void AppGateway() { | |
var resourceGroup = "blah"; | |
var location = "Australia East"; | |
var netClient = new NetworkManagementClient(credential) { SubscriptionId = Lookup.subscriptionId }; | |
// Create IP for gateway | |
var ipParams = new PublicIPAddress{Location = location ,PublicIPAllocationMethod = "Dynamic" }; | |
var newIp = netClient.PublicIPAddresses.CreateOrUpdate(resourceGroup, "appGatewayFrontendIP", ipParams); | |
Console.WriteLine(newIp.IpAddress); |
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
# Enter-PSSession by default connects to 5985 (Insecure, HTTP) | |
# Azure by default, however, only opens up port 5986 which is for secure communications | |
# So just doing a Enter-PSSession <host> will likely fail complaining | |
# about network connectivity since 5985 is not open. | |
# Shortest (Insecure, HTTP) | |
# Assumes your local username/pwd same as Azure username/pawd | |
# Use Azure portal to create an endpoint for opening up port 5985 | |
Enter-PSSession cloudmanvm1.cloudapp.net |
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
internal class Logger | |
{ | |
public static void Info(string p0) | |
{ | |
Console.WriteLine(p0); | |
} | |
public static void Error(string couldNotLogIntoXmppServer) | |
{ | |
Console.WriteLine(couldNotLogIntoXmppServer); |
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.Net; | |
using System.IO; | |
namespace ConsoleApplication2 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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 script installs RightLink on a Windows Server 2008 R2 Server Core machine | |
function Download-File | |
{ | |
param ( | |
[parameter(Mandatory=$true)] $url | |
) | |
$fileName = $url.Split("/")[-1] |
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
# Set download URLs | |
$git_download_url = "http://msysgit.googlecode.com/files/PortableGit-1.7.3.1-preview20101002.7z" | |
$7zip_download_url = "http://downloads.sourceforge.net/sevenzip/7za465.zip" | |
# Create Software folder | |
$software_folder = "$env:SystemDrive\software" | |
mkdir -force $software_folder | |
# Create temp folder | |
$temp_folder = "$env:userprofile\temp\install_git" |