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
$tfsurl = 'https://tfs.someservername:8088/tfs/SomeAwesomeCollection' | |
$username = 'administrator' | |
$domain = 'MyCompany' | |
$password = 'Password1' | |
# Create URI | |
$tfs_uri = [System.Uri]::new( $tfsurl ) |
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
$folder4Logs = "X:\AdvancedIISLogs" | |
$LogRotateFreq = "Hourly" # Change to your desired frequency | |
#Check if we have folder for our logs - if not create one | |
if(!(Test-Path $folder4Logs)) | |
{ | |
# Create such a directory | |
New-Item -ItemType Directory -Path X:\ -Name AdvancedIISLogs | |
} |
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
# Function which allows for quick set/get of app pool property - make sure you have the newest one :) | |
# available @ https://gist.github.com/RafPe/77d2ff28f7a0014bf0f1 | |
function Invoke-AppPoolSetting | |
{ | |
<# | |
.SYNOPSIS | |
Gets or sets application pool setting | |
.PARAMETER appPoolName |
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
function Get-RemoteRequiredFunctions | |
{ | |
<# | |
.SYNOPSIS | |
Gets required functions | |
.PARAMETER functionName | |
this is object type data coming via pipeline | |
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
# We load our maintanance page | |
$maintanancePage = Get-Content -Raw "C:\Users\rafpe\Desktop\index.html" | |
# we define our countries | |
$pageCountries= @( @{country="NL";locale=@("nl-NL","en-US")}, ` | |
@{country="BE";locale=@("nl-BE","fr-BE","de-DE","en-US")},` | |
@{country="FR";locale=@("fr-FR")},` | |
@{country="DE";locale=@("de-DE")},` | |
@{country="UK";locale=@("en-GB")},` | |
@{country="US";locale=@("en-US")} |
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
$variableToChange = "all lowercase" | |
$result = -join ($variableToChange.Substring(0,1).ToUpper() ,$variableToChange.Substring(1,$variableToChange.Length-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
input { | |
tcp { | |
port => 25826 | |
type => syslog | |
} | |
udp { | |
port => 25826 | |
type => syslog | |
} | |
} |
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
#region Setup subscription and script variables | |
## Get up your credentials (only if using Azure AD ) | |
# credentialSubscription = Get-Credential | |
# Add-AzureAccount -Credential | |
## Enable debugging ? | |
# $DebugPreference ='Continue' | |
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
#!/bin/bash | |
dir=`pwd` | |
if [ $# -lt 1 ]; then | |
echo "Please specify clustername" | |
exit | |
fi | |
sudo mkdir -p ${dir}/elasticsearch/data |
OlderNewer