Last active
August 29, 2015 14:21
-
-
Save istairbn/abb2f7e5c7c333ea1139 to your computer and use it in GitHub Desktop.
Microsoft HPC Server 2012 - Set all your Azure Nodes Online
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 | |
} | |
Add-PsSnapin Microsoft.HPC | |
$NODE = Get-HpcNode -GroupName AzureNodes -ErrorAction Stop | |
#Change the Node Template name if you have multiple templates | |
$TEMPLATE = Get-HpcNodeTemplate -Name "Default AzureNode Template" | |
LogWrite "INFO, Setting AzureNodes to Deployed, State:Transition" | |
Start-HpcNodeSet -Template $TEMPLATE | |
LogWrite "INFO, SUCCESS AzureNodes set to Deployed, State:Completion" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When it runs, it creates a small log file to keep a record of when it was run