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
$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 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 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 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 Export-FunctionRemote | |
{ | |
<# | |
.SYNOPSIS | |
Exports function to String ScriptBlock | |
.PARAMETER functionName | |
this is object type data coming via pipeline | |
.DESCRIPTION |
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 Get-RemoteRequiredFunctions | |
{ | |
<# | |
.SYNOPSIS | |
Gets required functions | |
.PARAMETER functionName | |
this is object type data coming via pipeline | |
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
# 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 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
$tfsurl = 'https://tfs.someservername:8088/tfs/SomeAwesomeCollection' | |
$username = 'administrator' | |
$domain = 'MyCompany' | |
$password = 'Password1' | |
# Create URI | |
$tfs_uri = [System.Uri]::new( $tfsurl ) |
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
$dllBytes = [System.IO.File]::ReadAllBytes( "C:\NLog.dll") | |
[System.Reflection.Assembly]::Load($dllBytes) | |
# Create object that we will use to send customized info | |
# This is to be used if you use ${event-context:item=MyValue} in your config ! | |
$cos = new-object NLog.LogEventInfo | |
$cos.Level = [NLog.LogLevel]::Info | |
$cos.Message = 'executing something really cool' | |
# Load XML configuration and use it |
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
$variableToChange = "all lowercase" | |
$result = -join ($variableToChange.Substring(0,1).ToUpper() ,$variableToChange.Substring(1,$variableToChange.Length-1 ) ) |
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
input { | |
tcp { | |
port => 25826 | |
type => syslog | |
} | |
udp { | |
port => 25826 | |
type => syslog | |
} | |
} |
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
elasticsearch-central: | |
image: elasticsearch:2 | |
container_name: elasticsearch-central | |
volumes: | |
- _replaceme_/elasticsearch/data:/usr/share/elasticsearch/data | |
- _replaceme_/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml | |
environment: | |
- ES_CLUSTERNAME=_clustername_ | |
command: elasticsearch | |
ports: |
OlderNewer