Skip to content

Instantly share code, notes, and snippets.

@istairbn
Last active August 29, 2015 14:21
Show Gist options
  • Save istairbn/abb2f7e5c7c333ea1139 to your computer and use it in GitHub Desktop.
Save istairbn/abb2f7e5c7c333ea1139 to your computer and use it in GitHub Desktop.
Microsoft HPC Server 2012 - Set all your Azure Nodes Online
$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"
@istairbn
Copy link
Author

When it runs, it creates a small log file to keep a record of when it was run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment