View Download and Install MongoDB as Windows Service PowerShell Script
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-ExecutionPolicy RemoteSigned | |
$mongoDbPath = "C:\MongoDB" | |
$mongoDbConfigPath = "$mongoDbPath\mongod.cfg" | |
$url = "http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.4.9.zip" | |
$zipFile = "$mongoDbPath\mongo.zip" | |
$unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-2.4.9" | |
if ((Test-Path -path $mongoDbPath) -eq $True) | |
{ |
View Sitecore_Demo_v1.0.3
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
Update-ExecutionPolicy Unrestricted | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole | |
Enable-WindowsOptionalFeature -Online -FeatureName NetFx3 | |
Enable-WindowsOptionalFeature -Online -FeatureName NetFx4Extended-ASPNET45 | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpRedirect | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility45 | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WindowsAuthentication | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ManagementScriptingTools |
View Program.cs
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
var allNodes = DashboardData.AllNodes.Where(s => !s.IsUnwatched).Where(s => s.CPULoad >= 0 || s.MemoryUsed >= 0).ToList(); | |
var downNodes = allNodes.Where(x => x.Status == NodeStatus.Down); | |
Thread.Sleep(3000); | |
float inBps = 0; | |
float outBps = 0; | |
var totalRam = 0.0; | |
var totalDisk = 0.0; | |
foreach (var node in allNodes) |
View DashboardSettings.json
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
"providers": [ | |
{ | |
"name": "Orion", | |
"type": "Orion", | |
"host": "monitorXd1:8686", | |
"connectionString": "Data Source=monitorXd1;Initial Catalog=SolarWindsOrion;User ID='SolarWindsOrionDatabaseUser';Password='put the password here';Timeout=10" | |
} | |
] |
View app.config.xml
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
<configSections> | |
<section name="Settings" type="StackExchange.Opserver.SettingsSection, StackExchange.Opserver.Core" /> | |
<section name="SecuritySettings" type="StackExchange.Opserver.SecuritySettings, StackExchange.Opserver.Core" /> | |
<section name="Exceptional" type="StackExchange.Exceptional.Settings, StackExchange.Opserver.Core" /> | |
</configSections> | |
<SecuritySettings configSource="Config\SecuritySettings.config" /> | |
<Settings name="JSON" provider="JSONFile" path="~\Config\" /> | |
<Exceptional applicationName="Status"> |
View gist:5361702
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
$checkoutFolder = "%teamcity.build.workingDir%" | |
$targetDll = "$checkoutFolder\bin\Debug\%DLL containing tests here%" | |
$fixture = "%your namespace here%" | |
$resultXml = "$checkoutFolder\TestResult.xml" | |
$resultHtml = "$checkoutFolder\TestResults" | |
rm $resultXml -Force -Verbose | |
rm $resultHtml -Force -Verbose -Recurse | |
$buildOptions = "/xml:$resultXml /fixture:$fixture" |
View gist:5362867
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
properties { | |
$buildFolder = Resolve-Path .. | |
$revision = "100500" | |
$buildNumber = "15" | |
} | |
task Package -depends Init, Upt, Zip | |
task Init { | |
# Copy Sitecore DLL's, etc. |
View gist:5363165
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
Remove-Module [p]sake | |
Import-Module .\Tools\psake\psake.psm1 | |
$psake.use_exit_on_error = $true | |
Invoke-psake .\package.ps1 Package -properties @{ revision = '%env.BUILD_VCS_NUMBER%'; } |
View gist:5418727
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
properties { | |
$distributivePath = "%path to storage%\Sitecore 6.6.0 rev. 130111.zip" | |
$localStorage = "C:\LocalStorage" | |
$distributiveName = [System.IO.Path]::GetFileNameWithoutExtension($distributivePath) | |
$zipFile = "$localStorage\$distributiveName.zip" | |
$buildFolder = Resolve-Path .. | |
$revision = "12345" | |
$buildNumber = "1" | |
} |
View gist:5442033
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
Clear-Host | |
# Framework initialization | |
$scriptRoot = Split-Path (Resolve-Path $myInvocation.MyCommand.Path) | |
$env:PSModulePath = $env:PSModulePath + ";$scriptRoot\Framework" | |
Import-Module WebUtils | |
Import-Module ConfigUtils | |
Import-Module DBUtils | |
Import-Module IISUtils |
OlderNewer