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
# Microsoft Virtual Academy | |
# Automatisierte Konfiguration in Azure im Überblick | |
# 203 - http://aka.ms/mva-1505-203 | |
#region Create VM | |
# Settings | |
$subscriptionName = "MSFT MVA Live" # Get-AzureSubscription | |
$location = "West Europe" # Get-AzureLocation | |
$serviceName = "mvaconfig203" |
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
# Microsoft Virtual Academy | |
# Automatisierte Konfiguration in Azure im Überblick | |
# 202 - http://aka.ms/mva-1505-202 | |
#region Create VM | |
# Settings | |
$subscriptionName = "MSFT MVA Stage" # Get-AzureSubscription | |
$location = "West Europe" # Get-AzureLocation | |
$serviceName = "mvaconfig204" |
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
# Microsoft Virtual Academy | |
# Automatisierte Konfiguration in Azure im Überblick | |
# 201 - http://aka.ms/mva-1505-201 | |
#region Create VM | |
# Settings | |
$subscriptionName = "MSFT MVA Stage" # Get-AzureSubscription | |
$location = "West Europe" # Get-AzureLocation | |
$serviceName = "mvaconfig202" |
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
# Microsoft Virtual Academy | |
# Automatisierte Konfiguration in Azure im Überblick | |
# 200 - http://aka.ms/mva-1505-200 | |
# Settings | |
$subscriptionName = "MSFT MVA Live" # Get-AzureSubscription | |
$location = "West Europe" # Get-AzureLocation | |
$serviceName = "mvaconfig200" | |
$storageAccountName = $serviceName | |
$adminUsername = "adm_demo" |
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
# 101 | |
# Settings | |
$subscriptionName = "MSFT MVA Stage" # Get-AzureSubscription | |
$location = "West Europe" # Get-AzureLocation | |
$serviceName = "mvaconfig101" | |
$storageAccountName = $serviceName | |
$adminUsername = "adm_demo" | |
$adminPassword = "Azureisttoll!" | |
$imageFamily = "Windows Server 2012 R2 Datacenter" |
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
# step 1: get file | |
$blobFile = Get-AzureStorageBlob -Container source | Where-Object -Property Name -eq "version.txt" | |
# step 2: create snapshot | |
$cloudBlob = $blobFile.ICloudBlob | |
$cloudBlob.CreateSnapshot() | |
# step 3: get snapshots | |
$snapshot = Get-AzureStorageBlob -Container source | Where-Object -Property SnapshotTime |
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
workflow Stop-ITCampManagementVMs | |
{ | |
Param ( | |
# Name of the target Azure subscription. | |
[Parameter(Mandatory=$True)] | |
[String]$SubscriptionName = "MSFT IT Camp Stage", | |
[Parameter(Mandatory=$False)] | |
[String]$NamePrefix = "itc0203" | |
) |
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
workflow Start-ITCampManagementVMs | |
{ | |
Param ( | |
# Name of the target Azure subscription. | |
[Parameter(Mandatory=$True)] | |
[String]$SubscriptionName = "MSFT IT Camp Stage", | |
[Parameter(Mandatory=$False)] | |
[String]$AdminUsername = "adm_camp", | |
[Parameter(Mandatory=$False)] | |
[String]$AdminPassword = "Azureisttoll!", |
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
Get-AzureStorageBlobCopyState -Blob copy2.vhd -Container destination | |
<# Output | |
CopyId : 0c61d2d2-5cc8-4936-8800-1690b17d71f3 | |
CompletionTime : 05.01.2015 15:53:08 +00:00 | |
Status : Success | |
Source : https://pkdestination.blob.core.windows.net/backup/fixedvhd2.vhd | |
BytesCopied : 20972032 | |
TotalBytes : 20972032 |
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
# Get all BLOBs from source container and start copy operation asynchronously for all files based on $fileFilter. | |
Get-AzureStorageBlob -Context $sourceStorageContext -Container $sourceStorageContainer -Blob $fileFilter | | |
Start-AzureStorageBlobCopy -DestContext $destinationStorageContext -DestContainer $destinationStorageContainer | |
# Check copy state in destination container. | |
$waitTime = 5 # Initial wait time. | |
do { | |
# Wait some time before refresh of copy state, except on first iteration. | |
if ($copyState) { | |
Write-Host "Refresh in $waitTime seconds." |