This file contains hidden or 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 bootstrap-tentacle{ | |
param($username,$password,$environments,$roles) | |
$rolestring="@(""" + ($roles -join """,""") + """)" | |
$environmentstring="@(""" + ($environments -join """,""") + """)" | |
$command = ". c:\redist\configuremachine.ps1;install-tentacle -environments $environmentstring -roles $rolestring" | |
$command | set-content c:\installoctopus.ps1 | |
Write-Host "Starting Tentacle install script:" |
This file contains hidden or 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
New-Landlord [filepath] | |
Remove-Landlord [filepath] |
This file contains hidden or 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
for($i=0;$i -lt 2;$i++){ | |
Machine Web$i { | |
Add-WindowsFeature Net-Framework | |
Probision base.ps1 | |
Provision webserver.ps1 | |
Provision octopus.ps1 www development | |
} | |
} |
This file contains hidden or 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
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
$rss = (new-object net.webclient) | |
#Set the username for windows auth proxy | |
#$rss.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials | |
$a = ([xml]$rss.downloadstring("http://s.ch9.ms/Events/Build/2014/rss/mp4high?sort=sequential&direction=desc&term=&tag=asp.net&tag=azure&Media=true")) | |
$a.rss.channel.item | foreach{ | |
$url = New-Object System.Uri($_.enclosure.url) | |
$file = $_.creator + "-" + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-") + ".mp4" | |
if (!(test-path $file)) | |
{ |
This file contains hidden or 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
Write-Host "Installing foobar for $Environment" | |
& .\QS.CommandProcessor.exe install -instance:$Environment | Write-Host | |
do | |
{ | |
Write-Host "Starting Command Processor for $Environment" | |
& .\QS.CommandProcessor.exe start -instance:$Environment | Write-Host | |
start-sleep 5 | |
$service = Get-Service "QSCommandProcessor`$$Environment" -ErrorAction SilentlyContinue |
This file contains hidden or 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
$p = join-path . ".\CommandProcessor.exe" -Resolve | |
$c =[System.Configuration.ConfigurationManager]::OpenExeConfiguration($p) | |
$s=$c.GetSection("connectionStrings") | |
$s.SectionInformation.ProtectSection($null) | |
$s=$c.GetSection("appSettings") | |
$s.SectionInformation.ProtectSection($null) | |
$c.Save() |
This file contains hidden or 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-azurevm -name qsvmdvb1 -ServiceName qsvmdvb2|set-azurevmsize -InstanceSize Medium|update-azurevm |
This file contains hidden or 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
#start iis with the console window up, so we can see trace messages from the website while were doing front end development. | |
function global:start-iis(){ | |
param($port="14062",$wwwdir="website") | |
$websitepath=$dte.solution.FileName | split-path | join-path -childpath $wwwdir | |
&start 'C:\Program Files (x86)\IIS Express\iisexpress.exe' "/trace:none /path:$websitepath /port:$port" | |
} |
This file contains hidden or 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 class LoggingStopwatch : IDisposable | |
{ | |
private readonly string _operationname; | |
private Stopwatch stopwatch; | |
public LoggingStopwatch(string operationname) | |
{ | |
_operationname = operationname; | |
stopwatch = new Stopwatch(); | |
System.Diagnostics.Trace.WriteLine("Starting tracing of "+ operationname); |