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 module or binary module file associated with this manifest | |
ModuleToProcess = 'Microsoft.ResourceManagement.Automation.dll' | |
# Version number of this module. | |
ModuleVersion = '1.0' | |
# ID used to uniquely identify this module | |
GUID = '73fec12a-fd2a-4ffc-a9e3-9ad6f78bf78b' |
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 Show-Message | |
{ | |
[cmdletbinding()] | |
Param( | |
[Parameter(ValueFromPipeLine)] | |
$Message | |
, | |
[Parameter(ParameterSetName="Win10")] | |
$DisplayDuration = 10 | |
, |
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
{ | |
"itemDisplayName": "Blank Template", | |
"description": "A blank template and empty parameters file.", | |
"summary": "A blank template and empty parameters file. Use this template as the framework for your custom deployment.", | |
"githubUsername": "bmoore-msft", | |
"dateUpdated": "2016-09-28" | |
} |
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
# Create a new empty template | |
New-ArmTemplate | |
# Creates a new variable named Region | |
New-ARMvariable -Name Region -Value "East US" | Add-ARMvariable | |
$newVar = @{ | |
Name = "Region2" | |
Value = "North Europe" | |
} |
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
# Import an ARM template from file | |
Import-ARMtemplate -FileName C:\tmp\armTemplate.json | |
# Import an ARM template from the clipboard | |
Get-Clipboard | Import-ARMtemplate |
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
$resource = @{ | |
type = "Microsoft.Storage/storageAccounts" | |
name = "StorageSimpleVM" | |
apiVersion = "2016-01-01" | |
location = "North Europe" | |
sku = @{ | |
name = "Standard_LRS" | |
} | |
kind = "Storage" | |
properties = @{} |
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
$newParm = @{ | |
Name = 'adminUsername' | |
Type = 'string' | |
Description = 'Username for the Virtual Machine.' | |
} | |
# Creates a new parameter named adminUsername | |
New-ARMparameter @newParm | Add-ARMparameter |
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
# Create a new empty template | |
New-ArmTemplate | |
# Creates a new variable named Region | |
New-ARMvariable -Name Region -Value "East US" | Add-ARMvariable | |
$newVar = @{ | |
Name = "Region2" | |
Value = "North Europe" | |
} |
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
# Added from http://bretty.me.uk/save-money-using-citrix-octoblu-automation-for-power-management/ | |
# Author: Dave Brett | |
function Lab-Startup { | |
$ErrorActionPreference = 'Continue' | |
import-module XenServerPSModule | |
connect-xenserver -url http://xs.bretty.local -username USERNAME -password PASSWORD | |
$file = "c:\Scripts\vmlist.txt" | |
$VMNames = Get-Content $file | |
foreach($VMName in $VMNames) | |
{ |