If you have any feedback from the session today, we'd love to hear it - Click here to provide feedback
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 the Service Principal, generates a random password | |
$sp = New-AzADServicePrincipal -DisplayName ServicePrincipalName | |
# Export the random password that was generated on creation | |
$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($sp.Secret) | |
$UnsecureSecret = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR) | |
$UnsecureSecret |
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
az ad sp create-for-rbac --name ServicePrincipalDisplayName |
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 the Service Principal, generates a random password, grants the Service Principal Contributor access to only a single resource group | |
$sp = New-AzADServicePrincipal -DisplayName ServicePrincipalName -Role Contributor -Scope /subscriptions/zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz/resourceGroups/myResourceGroup | |
# Export the random password that was generated on creation | |
$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($sp.Secret) | |
$UnsecureSecret = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR) | |
$UnsecureSecret |
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
name: GitHub for IT Pro CI/CD Pipeline | |
env: | |
OUTPUT_PATH: ${{ github.workspace }} | |
on: [push] | |
jobs: | |
# Deploy VM in Azure |
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 Resource Group called "rg-smoketest" within the East US region | |
az group create --name rg-smoketest --location "East US" --tags 'Usage=Test' | |
#Create an Azure App Service Plan called SmokeTestASP within the rg-smoketest Resource Group and use the Free tier | |
az appservice plan create --name SmokeTestASP --resource-group rg-smoketest --sku FREE --tags 'Usage=Test' | |
#Create an Azure Web App called smoke-test app within the rg-smoketest resource group and attach it to the SmokeTestASP plan | |
az webapp create --name smoketest-web --resource-group rg-smoketest --plan SmokeTestASP |
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
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE TABLE [dbo].[SpeakingLogs]( | |
[LogId] [int] IDENTITY(1,1) NOT NULL, | |
[TalkDate] [date] NOT NULL, | |
[EventName] [varchar](255) NOT NULL, | |
[City] [varchar](255) NULL, | |
[Country] [varchar](255) 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
#Create the resource group | |
az group create \ | |
--name rg-photostorage \ | |
--location UKSouth | |
#Create the storage account | |
az storage account create \ | |
--name sarahsphotos \ | |
--resource-group rg-photostorage \ | |
--location UKSouth \ |
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
azcopy sync "C:\Users\salean\Pictures\2019" "https://sarahsphotos.blob.core.windows.net/2019-photos?sv=2019-10-10&ss=bfqt&srt=sco&sp=rwdlacupx&se=2020-05-05T17:44:25Z&st=2020-05-22T09:44:25Z&spr=https&sig=m9mbnOaFs0eCNhcuTa9dOsWcXqKySg0xC5PwqVfFvvQ%3D" |
OlderNewer