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
############################################################ | |
# Dockerfile Downcount ASP.NET Core Service | |
# Based on Ubuntu | |
############################################################ | |
# Set the base image to Ubuntu | |
FROM microsoft/aspnetcore:lts | |
# File Author / Maintainer | |
MAINTAINER sd software |
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
<# | |
.SYNOPSIS | |
Start or stop the specfied ARM VMs in parallel using background jobs | |
.DESCRIPTION | |
Start or stop the specfied ARM VMs in parallel using background jobs | |
.PARAMETER Subscription | |
The Azure subscription |
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
cls | |
$numThreads = 5 | |
$ScriptBlock = { | |
Param ( | |
[string]$string1, | |
[string]$string2 | |
) | |
$concatenatedString = "$string1$string2" | |
return New-Object PSObject -Property @{ |
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
cls | |
# create an array and add it to session state | |
$arrayList = New-Object System.Collections.ArrayList | |
$arrayList.AddRange(('a','b','c','d','e')) | |
$sessionstate = [system.management.automation.runspaces.initialsessionstate]::CreateDefault() | |
$sessionstate.Variables.Add( | |
(New-Object System.Management.Automation.Runspaces.SessionStateVariableEntry('arrayList', $arrayList, $null)) | |
) | |
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
cls | |
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition | |
$folderLocation = [System.IO.Path]::Combine($scriptPath, "PowerShellMultiThreading_LockExample") | |
if (Test-Path $folderLocation) | |
{ | |
Remove-Item $folderLocation -Recurse -Force | |
} | |
New-Item -Path $folderLocation -ItemType directory -Force > $null | |
$summaryFile = [System.IO.Path]::Combine($folderLocation, "summaryfile.txt") |
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
cls | |
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition | |
$folderLocation = [System.IO.Path]::Combine($scriptPath, "PowerShellMultiThreading_SimpleExample") | |
if (Test-Path $folderLocation) | |
{ | |
Remove-Item $folderLocation -Recurse -Force | |
} | |
New-Item -Path $folderLocation -ItemType directory -Force > $null | |
# This script block will download a file from the web and create a local version |
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
$Credential = Get-Credential | |
StartStop-AzureRMVMsWorkflow.ps1 ` | |
-Subscription "mySubscription" ` | |
-Credential $Credential ` | |
-ResourceGroupName "myResourceGroupName" ` | |
-VMNames "VMName1", "VMName2", "VMName3" ` | |
-Action Stop |
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
<# | |
.SYNOPSIS | |
Start or stop the specfied ARM VMs in parallel using background jobs | |
.DESCRIPTION | |
Start or stop the specfied ARM VMs in parallel using background jobs | |
.PARAMETER Subscription | |
The Azure subscription |
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
$profilePath = "C:\profiles\profile.json" | |
Save-AzureRmProfile -Path $profilePath -Force | |
StartStop-AzureRmVmsUsingBackgroundJobs.ps1 ` | |
-Subscription "mySubscription" ` | |
-ProfilePath $profilePath ` | |
-ResourceGroupName "myResourceGroupName" ` | |
-VMNames "vmName1", "vmName2", "vmName3" ` | |
-Action Stop |
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
<# | |
.SYNOPSIS | |
Start or stop the specfied ARM VMs in parallel using background jobs | |
.DESCRIPTION | |
Start or stop the specfied ARM VMs in parallel using background jobs | |
.PARAMETER Subscription | |
The Azure subscription |
NewerOlder