Skip to content

Instantly share code, notes, and snippets.

param(
[string]$PATH_TO_BUILD_FOLDER = "",
[string]$BUILD_NUMBER = "")
try {
$doc = New-Object System.Xml.XmlDocument
$doc.Load("$PATH_TO_BUILD_FOLDER\AppSettings.config")
$BUILD = $doc.get_DocumentElement().SelectSingleNode("//add[@key='BuildNumber']")
$BUILD.value = $BUILD_NUMBER
@opentable-devops
opentable-devops / import-certificate.ps1
Created July 8, 2013 18:12
Script that will allow you to import a certificate for use on Windows Server 2008 and upwards.
.\import-certificate.ps1 -CertificateName "" -CertLocation ""
param(
[Parameter(
Mandatory=$true,
HelpMessage="Name of the cert - this will copy the certificate from tron to the local machine")]
[string]$CertificateName,
[Parameter(
Mandatory=$true,
function enable_net_3_5_features()
{
Add-WindowsFeature NET-HTTP-Activation
Add-WindowsFeature NET-Win-CFAC
Add-WindowsFeature NET-Non-HTTP-Activ
Add-WindowsFeature AS-MSMQ-Activation
}
function enable_iis_common_http_features()
{
Copyright (c) 2013 OpenTable, Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: