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
$Logfile = "./"+$MyInvocation.MyCommand.Name+".log" | |
Function LogWrite | |
{ | |
Param ([string]$logstring) | |
$DATE = Get-Date -Format "yyyy/MM/dd HH:mm:ss zzz" | |
$LOG = $Date + ", " + $logstring | |
Add-content $Logfile -value $LOG | |
} |
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
$Logfile = "./"+$MyInvocation.MyCommand.Name+".log" | |
Function LogWrite | |
{ | |
Param ([string]$logstring) | |
$DATE = Get-Date -Format "yyyy/MM/dd HH:mm:ss zzz" | |
$LOG = $Date + ", " + $logstring | |
Add-content $Logfile -value $LOG | |
} |
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
Add-PsSnapin Microsoft.HPC | |
$NODE = Get-HpcNode -State Online -HealthState Error -GroupName ComputeNodes -ErrorAction Stop | |
Set-HpcNodeState -Node $NODE -State Offline -Force -Confirm:$False |
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
Add-PsSnapin Microsoft.HPC | |
$NODE = Get-HpcNode -State Offline -HealthState OK -GroupName ComputeNodes -ErrorAction Stop | |
Set-HpcNodeState -Node $NODE -State Online -Confirm:$False |
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
#------------------------------------------------------------------------------ | |
#Script: Azure-GrowShrinkOnDemand.ps1 | |
#Author: Benjamin Newton - Excelian - Code Adapted from AzureAutoGrowShrink.ps1 | |
#Version 1.0.0 | |
#Keywords: HPC,Azure Paas, Auto grow and Shrink, Calls | |
#Comments:This adaptation takes Call queue and Grid time into consideration | |
#------------------------------------------------------------------------------- | |
<# | |
.Synopsis |
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 PingIt{ | |
<# | |
.SYNOPSIS | |
Pings a list of computers, returns if they are offline or online and provides MS return time and status code | |
.FUNCTIONALITY | |
Simply used as a status indicator of machines as opposed to applications | |
.DESCRIPTION | |
Puts out the status of the hosts requested |
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
#------------------------------------------------------------------------------ | |
#Script: KeepItAuto.ps1 | |
#Author: Benjamin Newton - Excelian | |
#Version 1.0.0 | |
#Keywords: DesiredState,Environment Management | |
#Comments:This script keeps services on Automatic and Alive! | |
#------------------------------------------------------------------------------- | |
<# | |
.Synopsis |
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
String firstInput = args[0] | |
String cleanedComparison = args[1] | |
def StringCleaner(String input,String comparison){ | |
input = input.toLowerCase().replaceAll("[^a-zA-Z ]", "").replaceAll("\\s","") | |
comparer = comparison.toLowerCase().replaceAll("[^a-zA-Z ]", "").replaceAll("\\s","") | |
def finder = (comparer =~ input) | |
assert finder | |
println finder | |
} |
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
#------------------------------------------------------------------------------ | |
#Script: Get-HPCData.ps1 | |
#Author: Benjamin Newton - Excelian | |
#Version 1.0.0 | |
#Keywords: HPC,Environment Management | |
#------------------------------------------------------------------------------- | |
<# | |
.Synopsis | |
This 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
//OutputTester.groovy - Used to output data at specific times. Useful for testing monitors | |
def counter = 0 | |
outputLine = args.length > 0 ? args[0] : "App:LogscapeSmokeTest Counter:$counter The Service has successfully deployed" | |
while(1){ | |
def timestamp = new Date().format ("yyyy-MM-dd HH:mm:ss,SSS") | |
def nowMins = new Date().format("mm").toInteger() | |
def nowSecs = new Date().format("ss").toInteger() | |
def nowMillis = new Date().format("SS").toInteger() |
OlderNewer