SlideShare a Scribd company logo
aOS 2017Canadian Tour
Fueled by
Quebec
Montreal
Ottawa
Toronto
February 6
February 7
February 8
February 10
Manage AzureRM
Virtual Machines
with PowerShell
Using the Windows PowerShell Cmdlet to
Manage, Access and Control Resources in
the Azure Resource Model
Sean Kearney @energizedtech
Senior Solutions Architect
Cistel Technology Inc.
Thank you !
Get-Content 'C:Sean Kearney.txt'
• Sean Kearney – MVP Sean Kearney is a Senior Solutions Architect at Cistel
Technology Inc. He lives in the world of Automation leveraging technologies
providing Automation to clients in whatever way shape or form he can. He will break
out into song when the word “PowerShell” is used.
He is a Windows PowerShell MVP, Charter Member of the Springboard Technical
Experts Program and an Honorary Scripting Guy who regularly contributes content to
Microsoft's own "Scripting Guys" website.​
In his spare time, he composes songs and Holiday specials about PowerShell and is
working on a sonnet about Satya Nadella.​
What can we say, he’s a complete Nerd about technology and he loves it.
• You can reach him at skearney@cistel.com / sean@powershell.ca
or Twitter @energizedtech – He’s on that Facebook and LinkedIn thing too ;) .
On the Agenda
• High level view of Azure and IAAS
• Visiting the AzureRM Modules and Cmdlets
• Preparing your Virtual Machine Infrastructure
• Creating your Virtual Machines
• Obtaining Azure Resources
• Using Azure Automation
Microsoft Azure
Overview Azure IAAS
What *IS* Azure IAAS?
• Remotely Hosted Highly Scalable Virtualization Datacenter
• Plenty of Virtual Machine Templates provided
• Supporting Windows and various versions of Linux as well as Oracle
• Works with PowerShell Desired State Configuration files (DSC) and
other technologies such as Chef
Automation Options
• Windows PowerShell Cmdlets
• PowerShell Workflows
• Azure Automation Services
Available Cmdlets
• Almost everything in Microsoft Azure has Cmdlets
• Current List http://bit.ly/AzureCmdletList
• www.powershellgallery.com
• Search AzureRM download and install
• Presently 27 Modules classified by purpose
• 884 Cmdlets at your disposal (*klunk!*)
Available Modules
AzureRM.ApiManagement AzureRM.HDInsight AzureRM.Resources
AzureRM.Automation AzureRM.Insights AzureRM.SiteRecovery
AzureRM.Backup AzureRM.KeyVault AzureRM.Sql
AzureRM.Batch AzureRM.Network AzureRM.Storage
AzureRM.Compute AzureRM.NotificationHubs AzureRM.StreamAnalytics
AzureRM.DataFactories AzureRM.OperationalInsights AzureRM.Tags
AzureRM.DataLakeAnalytics AzureRM.profile AzureRM.TrafficManager
AzureRM.DataLakeStore AzureRM.RecoveryServices AzureRM.UsageAggregates
AzureRM.Dns AzureRM.RedisCache AzureRM.Websites
Connect to Azure RM with
PowerShell
Azure Virtual Machines
Build your Base Infrastructure
Build Your Base Infrastructure
• On Premise Solution Requirements
• Servers and Storage
• Networking
Build Your Base Infrastructure
• Azure Virtual Machine Requirements
• Servers and Storage
• Networking
• Service Point
Build Your Base Infrastructure
• Azure Virtual Machines
• Define Azure Resource Group
• Location, Reference Name
• Define our Storage
• Location, Reference Name, Storage Type
• Define our Network
• Virtual Network - Location, Resource Name, Address Range/Subnet
• Virtual Network Subnet – Resource Name, Address Range/Subnet
Build Your Base Infrastructure
• Azure Virtual Machines using Windows PowerShell
• Define Azure Resource Group
• New-AzureRM
• Define our Storage
• New-AzureRMStorage
• Define our Network
• New-AzureRMVirtualNetworkSubnetConfig
• New-AzureRMVirtualNetwork
Build your Base
Infrastructure
Azure Virtual Machines
Creating a Virtual Machine
Creating a Virtual Machine
• On Premise Solution Requirements
• Operating System
• Memory
• Virtual Disk(s)
• CPU Count and Speed
• Network Connection(s)
• Virtual Network Wire
• Firewall Rule(s)
Creating a Virtual Machine
• Azure Virtual Machine Requirements
• Operating System
• Memory
• Virtual Disk(s) (Cannot Assign Letter D)
• CPU Count and Speed
• Network Connection (Dynamic IP)
• Virtual Network Wire
• Firewall Rule(s)
Creating a Virtual Machine
• Azure Virtual Machines
• Quick Create or From Gallery
• DNS Name
• O/S Image
• Size (Predefined VM Template config)
• UserName (Default Admin)
• Password (Default Password)
• Location
Creating a Virtual Machine
• Azure Virtual Machines using PowerShell
• Create AzureRM Configuration
• New-AzureRMVMConfig
• Create network card
• New-AzureRMPublicIPAddress, New-AzureRMNetworkInterface, Add-
AzureRMVMNetworkInterface
• Define Operating System
• Set-AzureRMVMOperatingSystem, Set-AzureRMVMSourceImage
• Define attached OS Disk and Data Disk
• Set-AzureRMVMOSDisk, Set-AzureRMVMDataDisk
• Create Firewall Rules
• New-AzureRMNetworkSecurityRuleConfig
• New-AzureRMNetworkSecurityGroup
• Create the Virtual Machine
• New-AzureRMVM
Creating a Virtual Machine
• A quick way to grab the JSON configuration
• Get-AzureRMVM
• Set-AzureRMVM –generalized
• Save-AzureRMVM
• *OR*
• View before provisioning in AzureRM GUI Portal
Creating a Virtual Machine
Azure Virtual Machines
Azure Resources through
PowerShell
Azure Resources through PowerShell
• Resources you will need to get names for
• Virtual Machine Template name / VHD Filename
• Geographic Locations
• Virtual Machine Role Sizes
• Service Names
• Storage Accounts
• Networks
Azure Resources through PowerShell
• Access those needed resources with Cmdlets
• Get-AzureRMVMImage
• Get-AzureRMResourceGroup
• Get-AzureRMStorageAccount
• Get-AzureRMVirtualNetwork
• Get-AzureRMNetwork
• Get-AzureRMVM
• Access properties of a VM to get all resource data
Azure Resources through
PowerShell
Azure Virtual Machines
Leveraging Azure Automation
Virtual Machine States
• Three possible states
• Running
• Operating System is up and Resouces Allocated
• Costing Money
• Deallocated
• Operating System is down and Resourcs are Deallocated
• Not Costing Money
• StoppedVM
• (Operating System if off, Resources are still Allocated)
• Costing Money
Scheduling PowerShell Scripts
• On Premise Server connecting through the Internet
• Requires Internet
• Scripts can be used immediately
• Azure Automation hosted within Azure
• No Internet required
• Some reconfiguration needed
Using Azure Automation
• Build an Automation account
• Create Automation Credentials
• Populate Scripts within the Runbook
• Build Variables within Azure Automation
• Setup a schedule
Leveraging Azure
Automation
Take aways
• AzureRM Virtual Machines are just Hyper-V “in the cloud”
• You can access all resources from just PowerShell alone
• Create a Virtual Machine in the Web console first, then use
PowerShell to identify all your needed Azure resources
• Azure Automation allows you to schedule and manage Virtual
Machines without the need for Internet
Questions?
Azure PowerShell Resources
• Sample JSON Templates for AzureRM
• http://bit.ly/AzureRMJson
• Azure RM Cmdlets
• http://bit.ly/AzureRMPowerShell
• http://bit.ly/GHAzureRM
• Scripting Guys articles on Azure Automation
• http://bit.ly/PowerShell-AzureAutomation
• Look for a series on Azure RM and Virtual Machines with PowerShell THIS
Month on Scripting Guys!
Thanks Everybody!
• www.powershell.org
• www.scriptingguys.com
• Download Sample PowerShell scripts here for
Presentation
• https://1drv.ms/u/s!Aknz413LlS-VkJ4q3TWnUIhWm-daAA
• Email: skearney@cistel.com www.cistel.com
• Email: sean@powershell.ca www.powershell.ca
• Twitter: @energizedtech
Thank you !

More Related Content

What's hot

Integrating AngularJS with Drupal 7
Integrating AngularJS with Drupal 7Integrating AngularJS with Drupal 7
Integrating AngularJS with Drupal 7
andrewmriley
 
Chugalug
ChugalugChugalug
Chugalug
jwallace41
 
High Performance Rails with MySQL
High Performance Rails with MySQLHigh Performance Rails with MySQL
High Performance Rails with MySQL
Jervin Real
 
Azure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentAzure Templates for Consistent Deployment
Azure Templates for Consistent Deployment
José Maia
 
Fluxible
FluxibleFluxible
Fluxible
Taylor Lovett
 
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
Sencha
 
Drupal & AngularJS - DrupalCamp Spain 2014
Drupal & AngularJS - DrupalCamp Spain 2014Drupal & AngularJS - DrupalCamp Spain 2014
Drupal & AngularJS - DrupalCamp Spain 2014
Juampy NR
 
Infrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with GitInfrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with Git
Danilo Poccia
 
My first powershell script
My first powershell scriptMy first powershell script
My first powershell script
David Cobb
 
NET Conf CL v2018 Infrastructure as Code on Azure
NET Conf CL v2018 Infrastructure as Code on AzureNET Conf CL v2018 Infrastructure as Code on Azure
NET Conf CL v2018 Infrastructure as Code on Azure
Victor Silva
 
Agile sites311training
Agile sites311trainingAgile sites311training
Agile sites311training
Michele Sciabarrà
 
Transforming WordPress Search and Query Performance with Elasticsearch
Transforming WordPress Search and Query Performance with Elasticsearch Transforming WordPress Search and Query Performance with Elasticsearch
Transforming WordPress Search and Query Performance with Elasticsearch
Taylor Lovett
 
Android testing-with-selenium-webdriver Online Training
Android testing-with-selenium-webdriver Online TrainingAndroid testing-with-selenium-webdriver Online Training
Android testing-with-selenium-webdriver Online Training
Nagendra Kumar
 
Xitrum @ Scala Conference in Japan 2013
Xitrum @ Scala Conference in Japan 2013Xitrum @ Scala Conference in Japan 2013
Xitrum @ Scala Conference in Japan 2013
Ngoc Dao
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
Eamonn Boyle
 
Building An Application For Windows Azure And Sql Azure
Building An Application For Windows Azure And Sql AzureBuilding An Application For Windows Azure And Sql Azure
Building An Application For Windows Azure And Sql Azure
Eric Nelson
 
Adobe AEM CQ5 - Developer Introduction
Adobe AEM CQ5 - Developer IntroductionAdobe AEM CQ5 - Developer Introduction
Adobe AEM CQ5 - Developer Introduction
Yash Mody
 
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen AnhOGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
Buff Nguyen
 
SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...
SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...
SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...
Sencha
 
Selenium Online Training
Selenium Online Training Selenium Online Training
Selenium Online Training
Nagendra Kumar
 

What's hot (20)

Integrating AngularJS with Drupal 7
Integrating AngularJS with Drupal 7Integrating AngularJS with Drupal 7
Integrating AngularJS with Drupal 7
 
Chugalug
ChugalugChugalug
Chugalug
 
High Performance Rails with MySQL
High Performance Rails with MySQLHigh Performance Rails with MySQL
High Performance Rails with MySQL
 
Azure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentAzure Templates for Consistent Deployment
Azure Templates for Consistent Deployment
 
Fluxible
FluxibleFluxible
Fluxible
 
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
 
Drupal & AngularJS - DrupalCamp Spain 2014
Drupal & AngularJS - DrupalCamp Spain 2014Drupal & AngularJS - DrupalCamp Spain 2014
Drupal & AngularJS - DrupalCamp Spain 2014
 
Infrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with GitInfrastructure as Code: Manage your Architecture with Git
Infrastructure as Code: Manage your Architecture with Git
 
My first powershell script
My first powershell scriptMy first powershell script
My first powershell script
 
NET Conf CL v2018 Infrastructure as Code on Azure
NET Conf CL v2018 Infrastructure as Code on AzureNET Conf CL v2018 Infrastructure as Code on Azure
NET Conf CL v2018 Infrastructure as Code on Azure
 
Agile sites311training
Agile sites311trainingAgile sites311training
Agile sites311training
 
Transforming WordPress Search and Query Performance with Elasticsearch
Transforming WordPress Search and Query Performance with Elasticsearch Transforming WordPress Search and Query Performance with Elasticsearch
Transforming WordPress Search and Query Performance with Elasticsearch
 
Android testing-with-selenium-webdriver Online Training
Android testing-with-selenium-webdriver Online TrainingAndroid testing-with-selenium-webdriver Online Training
Android testing-with-selenium-webdriver Online Training
 
Xitrum @ Scala Conference in Japan 2013
Xitrum @ Scala Conference in Japan 2013Xitrum @ Scala Conference in Japan 2013
Xitrum @ Scala Conference in Japan 2013
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
 
Building An Application For Windows Azure And Sql Azure
Building An Application For Windows Azure And Sql AzureBuilding An Application For Windows Azure And Sql Azure
Building An Application For Windows Azure And Sql Azure
 
Adobe AEM CQ5 - Developer Introduction
Adobe AEM CQ5 - Developer IntroductionAdobe AEM CQ5 - Developer Introduction
Adobe AEM CQ5 - Developer Introduction
 
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen AnhOGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
OGDC Datastorage Solution_Mr.Dung, Dinh Nguyen Anh
 
SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...
SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...
SenchaCon 2016: Advanced Techniques for Buidling Ext JS Apps with Electron - ...
 
Selenium Online Training
Selenium Online Training Selenium Online Training
Selenium Online Training
 

Viewers also liked

Construisez votre intranet avec microsoft office 365 sans code a os canadia...
Construisez votre intranet avec microsoft office 365 sans code   a os canadia...Construisez votre intranet avec microsoft office 365 sans code   a os canadia...
Construisez votre intranet avec microsoft office 365 sans code a os canadia...
Samuel Lévesque
 
Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)
Vincent Biret
 
From classification to protection of your data, secure your business with azu...
From classification to protection of your data, secure your business with azu...From classification to protection of your data, secure your business with azu...
From classification to protection of your data, secure your business with azu...
Joris Faure
 
Tournee Canadienne aOS - Montreal - Qu'est-ce que VOUS obtenez d'un environn...
Tournee Canadienne aOS - Montreal  - Qu'est-ce que VOUS obtenez d'un environn...Tournee Canadienne aOS - Montreal  - Qu'est-ce que VOUS obtenez d'un environn...
Tournee Canadienne aOS - Montreal - Qu'est-ce que VOUS obtenez d'un environn...
Vlad Catrinescu
 
Vincent biret azure functions et flow (montreal)
Vincent biret azure functions et flow (montreal)Vincent biret azure functions et flow (montreal)
Vincent biret azure functions et flow (montreal)
Vincent Biret
 
aOS Canadian Tour 2017 - Toronto- What do YOU get from SharePoint Hybrid?
aOS Canadian Tour 2017 - Toronto-   What do YOU get from SharePoint Hybrid?aOS Canadian Tour 2017 - Toronto-   What do YOU get from SharePoint Hybrid?
aOS Canadian Tour 2017 - Toronto- What do YOU get from SharePoint Hybrid?
Vlad Catrinescu
 
aOS Canadian Tour - Toronto - From SharePoint to Office 365 Development
aOS Canadian Tour - Toronto - From SharePoint to Office 365 DevelopmentaOS Canadian Tour - Toronto - From SharePoint to Office 365 Development
aOS Canadian Tour - Toronto - From SharePoint to Office 365 Development
Sébastien Levert
 
AOS Canadian Tour SharePoint ECM
AOS Canadian Tour SharePoint ECMAOS Canadian Tour SharePoint ECM
AOS Canadian Tour SharePoint ECM
Serge Tremblay
 
Office365 backup and Restore
Office365 backup and RestoreOffice365 backup and Restore
Office365 backup and Restore
came12
 
SPS Reston SharePoint Alwyays On
SPS Reston SharePoint Alwyays OnSPS Reston SharePoint Alwyays On
SPS Reston SharePoint Alwyays On
Mike Maadarani
 
Office 365 for Business Demystified for the average Technology and Business P...
Office 365 for Business Demystified for the average Technology and Business P...Office 365 for Business Demystified for the average Technology and Business P...
Office 365 for Business Demystified for the average Technology and Business P...
Noorez Khamis
 
AOS mtl-qc ged SharePoint pourquoi pas
AOS  mtl-qc ged SharePoint pourquoi pasAOS  mtl-qc ged SharePoint pourquoi pas
AOS mtl-qc ged SharePoint pourquoi pas
Serge Tremblay
 
Cloud PBX with Office 365 Webinar Slides
Cloud PBX with Office 365 Webinar SlidesCloud PBX with Office 365 Webinar Slides
Cloud PBX with Office 365 Webinar Slides
Arrow Systems Integration
 
What's new in sharepoint 2016
What's new in sharepoint 2016What's new in sharepoint 2016
What's new in sharepoint 2016
Mike Maadarani
 

Viewers also liked (14)

Construisez votre intranet avec microsoft office 365 sans code a os canadia...
Construisez votre intranet avec microsoft office 365 sans code   a os canadia...Construisez votre intranet avec microsoft office 365 sans code   a os canadia...
Construisez votre intranet avec microsoft office 365 sans code a os canadia...
 
Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)Vincent biret azure functions and flow (ottawa)
Vincent biret azure functions and flow (ottawa)
 
From classification to protection of your data, secure your business with azu...
From classification to protection of your data, secure your business with azu...From classification to protection of your data, secure your business with azu...
From classification to protection of your data, secure your business with azu...
 
Tournee Canadienne aOS - Montreal - Qu'est-ce que VOUS obtenez d'un environn...
Tournee Canadienne aOS - Montreal  - Qu'est-ce que VOUS obtenez d'un environn...Tournee Canadienne aOS - Montreal  - Qu'est-ce que VOUS obtenez d'un environn...
Tournee Canadienne aOS - Montreal - Qu'est-ce que VOUS obtenez d'un environn...
 
Vincent biret azure functions et flow (montreal)
Vincent biret azure functions et flow (montreal)Vincent biret azure functions et flow (montreal)
Vincent biret azure functions et flow (montreal)
 
aOS Canadian Tour 2017 - Toronto- What do YOU get from SharePoint Hybrid?
aOS Canadian Tour 2017 - Toronto-   What do YOU get from SharePoint Hybrid?aOS Canadian Tour 2017 - Toronto-   What do YOU get from SharePoint Hybrid?
aOS Canadian Tour 2017 - Toronto- What do YOU get from SharePoint Hybrid?
 
aOS Canadian Tour - Toronto - From SharePoint to Office 365 Development
aOS Canadian Tour - Toronto - From SharePoint to Office 365 DevelopmentaOS Canadian Tour - Toronto - From SharePoint to Office 365 Development
aOS Canadian Tour - Toronto - From SharePoint to Office 365 Development
 
AOS Canadian Tour SharePoint ECM
AOS Canadian Tour SharePoint ECMAOS Canadian Tour SharePoint ECM
AOS Canadian Tour SharePoint ECM
 
Office365 backup and Restore
Office365 backup and RestoreOffice365 backup and Restore
Office365 backup and Restore
 
SPS Reston SharePoint Alwyays On
SPS Reston SharePoint Alwyays OnSPS Reston SharePoint Alwyays On
SPS Reston SharePoint Alwyays On
 
Office 365 for Business Demystified for the average Technology and Business P...
Office 365 for Business Demystified for the average Technology and Business P...Office 365 for Business Demystified for the average Technology and Business P...
Office 365 for Business Demystified for the average Technology and Business P...
 
AOS mtl-qc ged SharePoint pourquoi pas
AOS  mtl-qc ged SharePoint pourquoi pasAOS  mtl-qc ged SharePoint pourquoi pas
AOS mtl-qc ged SharePoint pourquoi pas
 
Cloud PBX with Office 365 Webinar Slides
Cloud PBX with Office 365 Webinar SlidesCloud PBX with Office 365 Webinar Slides
Cloud PBX with Office 365 Webinar Slides
 
What's new in sharepoint 2016
What's new in sharepoint 2016What's new in sharepoint 2016
What's new in sharepoint 2016
 

Similar to Aos canadian tour (YOW) @energizedtech - Manage AzureRM with powershell

Sitecore 8.2 Update 1 on Azure Web Apps
Sitecore 8.2 Update 1 on Azure Web AppsSitecore 8.2 Update 1 on Azure Web Apps
Sitecore 8.2 Update 1 on Azure Web Apps
Rob Habraken
 
Become an Automation Ninja in 60 Minutes
Become an Automation Ninja in 60 MinutesBecome an Automation Ninja in 60 Minutes
Become an Automation Ninja in 60 Minutes
Michael Rüefli
 
PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...
PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...
PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...
Puppet
 
Automation 2.0 - Automation Tools for Hybrid Cloud Environments
Automation 2.0 - Automation Tools for Hybrid Cloud EnvironmentsAutomation 2.0 - Automation Tools for Hybrid Cloud Environments
Automation 2.0 - Automation Tools for Hybrid Cloud Environments
Michael Rüefli
 
Windows Azure
Windows AzureWindows Azure
Windows Azure
Rishu Mehra
 
Microsoft Azure Hybrid Cloud - Getting Started For Techies
Microsoft Azure Hybrid Cloud - Getting Started For TechiesMicrosoft Azure Hybrid Cloud - Getting Started For Techies
Microsoft Azure Hybrid Cloud - Getting Started For Techies
Aidan Finn
 
Azure Automation and Update Management
Azure Automation and Update ManagementAzure Automation and Update Management
Azure Automation and Update Management
Udaiappa Ramachandran
 
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
Amazon Web Services Korea
 
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup
 
Exploring Opensource on Microsoft Azure
Exploring Opensource on Microsoft AzureExploring Opensource on Microsoft Azure
Exploring Opensource on Microsoft Azure
Abdul Rasheed Feroz Khan
 
IaaS azure_vs_amazon
IaaS azure_vs_amazonIaaS azure_vs_amazon
IaaS azure_vs_amazon
Udaiappa Ramachandran
 
TechBeats #2
TechBeats #2TechBeats #2
TechBeats #2
applausepoland
 
Tokyo azure meetup #8 - Azure Update, August
Tokyo azure meetup #8 - Azure Update, AugustTokyo azure meetup #8 - Azure Update, August
Tokyo azure meetup #8 - Azure Update, August
Kanio Dimitrov
 
Tokyo azure meetup #8 azure update, august
Tokyo azure meetup #8   azure update, augustTokyo azure meetup #8   azure update, august
Tokyo azure meetup #8 azure update, august
Tokyo Azure Meetup
 
Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros
Usama Wahab Khan Cloud, Data and AI
 
Azure Service Fabric Mesh
Azure Service Fabric MeshAzure Service Fabric Mesh
Azure Service Fabric Mesh
Udaiappa Ramachandran
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Amazon Web Services
 
VMware Automation, PowerCLI presented at the Northern California PSUG
VMware Automation, PowerCLI presented at the Northern California PSUGVMware Automation, PowerCLI presented at the Northern California PSUG
VMware Automation, PowerCLI presented at the Northern California PSUG
Alan Renouf
 
Azure provisioning at your control
Azure provisioning at your controlAzure provisioning at your control
Azure provisioning at your control
Govind Kanshi
 
SCCM on Microsoft Azure
SCCM on Microsoft AzureSCCM on Microsoft Azure
SCCM on Microsoft Azure
Mohamed Tawfik
 

Similar to Aos canadian tour (YOW) @energizedtech - Manage AzureRM with powershell (20)

Sitecore 8.2 Update 1 on Azure Web Apps
Sitecore 8.2 Update 1 on Azure Web AppsSitecore 8.2 Update 1 on Azure Web Apps
Sitecore 8.2 Update 1 on Azure Web Apps
 
Become an Automation Ninja in 60 Minutes
Become an Automation Ninja in 60 MinutesBecome an Automation Ninja in 60 Minutes
Become an Automation Ninja in 60 Minutes
 
PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...
PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...
PuppetConf 2017: Unlocking Azure with Puppet Enterprise- Keiran Sweet, Source...
 
Automation 2.0 - Automation Tools for Hybrid Cloud Environments
Automation 2.0 - Automation Tools for Hybrid Cloud EnvironmentsAutomation 2.0 - Automation Tools for Hybrid Cloud Environments
Automation 2.0 - Automation Tools for Hybrid Cloud Environments
 
Windows Azure
Windows AzureWindows Azure
Windows Azure
 
Microsoft Azure Hybrid Cloud - Getting Started For Techies
Microsoft Azure Hybrid Cloud - Getting Started For TechiesMicrosoft Azure Hybrid Cloud - Getting Started For Techies
Microsoft Azure Hybrid Cloud - Getting Started For Techies
 
Azure Automation and Update Management
Azure Automation and Update ManagementAzure Automation and Update Management
Azure Automation and Update Management
 
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
 
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
 
Exploring Opensource on Microsoft Azure
Exploring Opensource on Microsoft AzureExploring Opensource on Microsoft Azure
Exploring Opensource on Microsoft Azure
 
IaaS azure_vs_amazon
IaaS azure_vs_amazonIaaS azure_vs_amazon
IaaS azure_vs_amazon
 
TechBeats #2
TechBeats #2TechBeats #2
TechBeats #2
 
Tokyo azure meetup #8 - Azure Update, August
Tokyo azure meetup #8 - Azure Update, AugustTokyo azure meetup #8 - Azure Update, August
Tokyo azure meetup #8 - Azure Update, August
 
Tokyo azure meetup #8 azure update, august
Tokyo azure meetup #8   azure update, augustTokyo azure meetup #8   azure update, august
Tokyo azure meetup #8 azure update, august
 
Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros
 
Azure Service Fabric Mesh
Azure Service Fabric MeshAzure Service Fabric Mesh
Azure Service Fabric Mesh
 
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity PlanDay 5 - AWS Autoscaling Master Class - The New Capacity Plan
Day 5 - AWS Autoscaling Master Class - The New Capacity Plan
 
VMware Automation, PowerCLI presented at the Northern California PSUG
VMware Automation, PowerCLI presented at the Northern California PSUGVMware Automation, PowerCLI presented at the Northern California PSUG
VMware Automation, PowerCLI presented at the Northern California PSUG
 
Azure provisioning at your control
Azure provisioning at your controlAzure provisioning at your control
Azure provisioning at your control
 
SCCM on Microsoft Azure
SCCM on Microsoft AzureSCCM on Microsoft Azure
SCCM on Microsoft Azure
 

Recently uploaded

GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 

Recently uploaded (20)

GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 

Aos canadian tour (YOW) @energizedtech - Manage AzureRM with powershell

  • 1. aOS 2017Canadian Tour Fueled by Quebec Montreal Ottawa Toronto February 6 February 7 February 8 February 10
  • 2. Manage AzureRM Virtual Machines with PowerShell Using the Windows PowerShell Cmdlet to Manage, Access and Control Resources in the Azure Resource Model Sean Kearney @energizedtech Senior Solutions Architect Cistel Technology Inc.
  • 4. Get-Content 'C:Sean Kearney.txt' • Sean Kearney – MVP Sean Kearney is a Senior Solutions Architect at Cistel Technology Inc. He lives in the world of Automation leveraging technologies providing Automation to clients in whatever way shape or form he can. He will break out into song when the word “PowerShell” is used. He is a Windows PowerShell MVP, Charter Member of the Springboard Technical Experts Program and an Honorary Scripting Guy who regularly contributes content to Microsoft's own "Scripting Guys" website.​ In his spare time, he composes songs and Holiday specials about PowerShell and is working on a sonnet about Satya Nadella.​ What can we say, he’s a complete Nerd about technology and he loves it. • You can reach him at skearney@cistel.com / sean@powershell.ca or Twitter @energizedtech – He’s on that Facebook and LinkedIn thing too ;) .
  • 5. On the Agenda • High level view of Azure and IAAS • Visiting the AzureRM Modules and Cmdlets • Preparing your Virtual Machine Infrastructure • Creating your Virtual Machines • Obtaining Azure Resources • Using Azure Automation
  • 7.
  • 8. What *IS* Azure IAAS? • Remotely Hosted Highly Scalable Virtualization Datacenter • Plenty of Virtual Machine Templates provided • Supporting Windows and various versions of Linux as well as Oracle • Works with PowerShell Desired State Configuration files (DSC) and other technologies such as Chef
  • 9. Automation Options • Windows PowerShell Cmdlets • PowerShell Workflows • Azure Automation Services
  • 10. Available Cmdlets • Almost everything in Microsoft Azure has Cmdlets • Current List http://bit.ly/AzureCmdletList • www.powershellgallery.com • Search AzureRM download and install • Presently 27 Modules classified by purpose • 884 Cmdlets at your disposal (*klunk!*)
  • 11. Available Modules AzureRM.ApiManagement AzureRM.HDInsight AzureRM.Resources AzureRM.Automation AzureRM.Insights AzureRM.SiteRecovery AzureRM.Backup AzureRM.KeyVault AzureRM.Sql AzureRM.Batch AzureRM.Network AzureRM.Storage AzureRM.Compute AzureRM.NotificationHubs AzureRM.StreamAnalytics AzureRM.DataFactories AzureRM.OperationalInsights AzureRM.Tags AzureRM.DataLakeAnalytics AzureRM.profile AzureRM.TrafficManager AzureRM.DataLakeStore AzureRM.RecoveryServices AzureRM.UsageAggregates AzureRM.Dns AzureRM.RedisCache AzureRM.Websites
  • 12. Connect to Azure RM with PowerShell
  • 13. Azure Virtual Machines Build your Base Infrastructure
  • 14. Build Your Base Infrastructure • On Premise Solution Requirements • Servers and Storage • Networking
  • 15. Build Your Base Infrastructure • Azure Virtual Machine Requirements • Servers and Storage • Networking • Service Point
  • 16. Build Your Base Infrastructure • Azure Virtual Machines • Define Azure Resource Group • Location, Reference Name • Define our Storage • Location, Reference Name, Storage Type • Define our Network • Virtual Network - Location, Resource Name, Address Range/Subnet • Virtual Network Subnet – Resource Name, Address Range/Subnet
  • 17. Build Your Base Infrastructure • Azure Virtual Machines using Windows PowerShell • Define Azure Resource Group • New-AzureRM • Define our Storage • New-AzureRMStorage • Define our Network • New-AzureRMVirtualNetworkSubnetConfig • New-AzureRMVirtualNetwork
  • 19. Azure Virtual Machines Creating a Virtual Machine
  • 20. Creating a Virtual Machine • On Premise Solution Requirements • Operating System • Memory • Virtual Disk(s) • CPU Count and Speed • Network Connection(s) • Virtual Network Wire • Firewall Rule(s)
  • 21. Creating a Virtual Machine • Azure Virtual Machine Requirements • Operating System • Memory • Virtual Disk(s) (Cannot Assign Letter D) • CPU Count and Speed • Network Connection (Dynamic IP) • Virtual Network Wire • Firewall Rule(s)
  • 22. Creating a Virtual Machine • Azure Virtual Machines • Quick Create or From Gallery • DNS Name • O/S Image • Size (Predefined VM Template config) • UserName (Default Admin) • Password (Default Password) • Location
  • 23. Creating a Virtual Machine • Azure Virtual Machines using PowerShell • Create AzureRM Configuration • New-AzureRMVMConfig • Create network card • New-AzureRMPublicIPAddress, New-AzureRMNetworkInterface, Add- AzureRMVMNetworkInterface • Define Operating System • Set-AzureRMVMOperatingSystem, Set-AzureRMVMSourceImage • Define attached OS Disk and Data Disk • Set-AzureRMVMOSDisk, Set-AzureRMVMDataDisk • Create Firewall Rules • New-AzureRMNetworkSecurityRuleConfig • New-AzureRMNetworkSecurityGroup • Create the Virtual Machine • New-AzureRMVM
  • 24. Creating a Virtual Machine • A quick way to grab the JSON configuration • Get-AzureRMVM • Set-AzureRMVM –generalized • Save-AzureRMVM • *OR* • View before provisioning in AzureRM GUI Portal
  • 26. Azure Virtual Machines Azure Resources through PowerShell
  • 27. Azure Resources through PowerShell • Resources you will need to get names for • Virtual Machine Template name / VHD Filename • Geographic Locations • Virtual Machine Role Sizes • Service Names • Storage Accounts • Networks
  • 28. Azure Resources through PowerShell • Access those needed resources with Cmdlets • Get-AzureRMVMImage • Get-AzureRMResourceGroup • Get-AzureRMStorageAccount • Get-AzureRMVirtualNetwork • Get-AzureRMNetwork • Get-AzureRMVM • Access properties of a VM to get all resource data
  • 31. Virtual Machine States • Three possible states • Running • Operating System is up and Resouces Allocated • Costing Money • Deallocated • Operating System is down and Resourcs are Deallocated • Not Costing Money • StoppedVM • (Operating System if off, Resources are still Allocated) • Costing Money
  • 32. Scheduling PowerShell Scripts • On Premise Server connecting through the Internet • Requires Internet • Scripts can be used immediately • Azure Automation hosted within Azure • No Internet required • Some reconfiguration needed
  • 33. Using Azure Automation • Build an Automation account • Create Automation Credentials • Populate Scripts within the Runbook • Build Variables within Azure Automation • Setup a schedule
  • 35. Take aways • AzureRM Virtual Machines are just Hyper-V “in the cloud” • You can access all resources from just PowerShell alone • Create a Virtual Machine in the Web console first, then use PowerShell to identify all your needed Azure resources • Azure Automation allows you to schedule and manage Virtual Machines without the need for Internet
  • 37. Azure PowerShell Resources • Sample JSON Templates for AzureRM • http://bit.ly/AzureRMJson • Azure RM Cmdlets • http://bit.ly/AzureRMPowerShell • http://bit.ly/GHAzureRM • Scripting Guys articles on Azure Automation • http://bit.ly/PowerShell-AzureAutomation • Look for a series on Azure RM and Virtual Machines with PowerShell THIS Month on Scripting Guys!
  • 38. Thanks Everybody! • www.powershell.org • www.scriptingguys.com • Download Sample PowerShell scripts here for Presentation • https://1drv.ms/u/s!Aknz413LlS-VkJ4q3TWnUIhWm-daAA • Email: skearney@cistel.com www.cistel.com • Email: sean@powershell.ca www.powershell.ca • Twitter: @energizedtech

Editor's Notes

  1. Connect First Time​ $AccountData=Add-AzureRMAccount​ Login Interactively​ ​ Store data away for later user​ Get-AzureRMSubscription | export-clixml Subscription.xml​ Get-AzureRMTenant | export-clixml Tenant.xml​ ​ OR​ ​ $AccountData.Context.Tenant.TenantId​ $account.Context.Subscription.SubscriptionId​ ​ $UserID=‘aosyow2017@outlook.com’​ $Password=‘aosP@ssw0rd’​ $SecurePassword=Convertto-SecureString $Password –asplaintext -force​ ​ #$Credential=New-PsObject System.Management.Automation.PSCredential ($UserID,$SecurePassword)​ $Credential=Get-Credential –credential azureauto@ye110wbeardhotmail.onmicrosoft.com​ ​ $TenantID=‘121c55b0-c349-4796-99a3-8b40f5cdb3f8’​ $SubscriptionID=‘81596357-d210-45be-84b5-db0bfad11580’ ​ ​ Add-AzureRMAccount –tenantid $TenantID –subscriptionid $SubscriptionID –credential $Credential​ ​ ​ ​ ​
  2. Manage AzureRM Virtual Machines​ $Credential=Get-Credential –credential azureauto@ye110wbeardhotmail.onmicrosoft.com​ $TenantID=‘121c55b0-c349-4796-99a3-8b40f5cdb3f8’​ $SubscriptionID=‘81596357-d210-45be-84b5-db0bfad11580’ ​ Add-AzureRMAccount –tenantid $TenantID –subscriptionid $SubscriptionID –credential $Credential​ ​ # Create new​ # Resource Group​ $RGName='MVPDAYSAzureRG'​ $Location='eastus'​ New-AzureRmResourceGroup -Name $RGName -Location $Location​ ​ # Storage Account​ $SAName='mvpdaysstorageaccount'​ $AccountType='Standard_LRS'​ New-AzureRmStorageAccount -Name $SAName -ResourceGroupName $RGName -Location $Location -Type $AccountType​ $StorageURI=(Get-AzureRmStorageAccount -Name $SAName -ResourceGroupName $RGName).PrimaryEndpoints.blob.Host​ ​ # Virtual Network​ $VNAddressPrefix='10.0.0.0/16'​ $VNName='mvpdaysvirtualnetwork'​ ​ $SNName='VMSubnet'​ $SNAddressPrefix='10.0.0.0/24'​ ​ $Subnet=New-AzureRmVirtualNetworkSubnetConfig -Name $SNName -AddressPrefix $SNAddressPrefix​ $AzureNet=New-AzureRmVirtualNetwork -Name $VNName -ResourceGroupName $RGName -Location $location -AddressPrefix $VNAddressPrefix -Subnet $Subnet​ $SubnetID=$AzureNet.Subnets[0].id ​ ​ ​ ​
  3. Create Azure Virtual Machine​ ​ $Credential=Get-Credential –credential azureauto@ye110wbeardhotmail.onmicrosoft.com​ $TenantID=‘121c55b0-c349-4796-99a3-8b40f5cdb3f8’​ $SubscriptionID=‘81596357-d210-45be-84b5-db0bfad11580’ ​ Add-AzureRMAccount –tenantid $TenantID –subscriptionid $SubscriptionID –credential $Credential​ ​  # Create AzureVM​ # Base config​ $VMName='MVPDAYS2016'​ $VMSize='Basic_A0'​ $AzureVM = New-AzureRmVMConfig -VMName $VMName -VMSize $VMSize​ ​ ​ ​ # Add Network card​ $PublicIP = New-AzureRmPublicIpAddress -ResourceGroupName $RGName -Name "vip1" -Location $Location -AllocationMethod Dynamic -DomainNameLabel $VMName.ToLower()​ $NIC = New-AzureRmNetworkInterface -Force -Name $VMName -ResourceGroupName $RGName -Location $Location -SubnetId $subnetId -PublicIpAddressId $PublicIP.Id​ $AzureVM = Add-AzureRmVMNetworkInterface -VM $AzureVM -Id $NIC.Id​ ​                               ​ ​ # Setup OS & Image​ # Name the Physical Disk for the O/S, Define Caching status and target URI​ $osDiskName = $VMname+'_osDisk'​ $osDiskCaching = 'ReadWrite'​ $osDiskVhdUri = 'https://'+$StorageURI+'/vhds/'+$vmname+'_os.vhd'​ ​ # Define Default User ID and Password for VM​ $user = 'MVPDAYSAdmin'​ $password = 'MVPDAYSUb3rS3cr3tP@ssw0rd'​ $securePassword = ConvertTo-SecureString $password -AsPlainText -Force​ ​ #$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword)​ Get-Credential -UserName $user -Message 'Please Enter the Password for the Azure Virtual Machine' ​ ​ $AzureVM = Set-AzureRmVMOperatingSystem -VM $AzureVM -Windows -ComputerName $VMname -Credential $cred​ $AzureVM = Set-AzureRmVMSourceImage -VM $AzureVM -PublisherName $Publisher -Offer $Offer -Skus $Sku -Version $VMImage.Version​ $AzureVM = Set-AzureRmVMOSDisk -VM $AzureVM -VhdUri $osDiskVhdUri -name $osDiskName -CreateOption fromImage -Caching $osDiskCaching​                               ​ # Create Virtual Machine​ New-AzureRmVM -ResourceGroupName $RGName -Location $Location -VM $AzureVM ​  ​ ​
  4. $Credential=Get-Credential –credential azureauto@ye110wbeardhotmail.onmicrosoft.com​ ​ $TenantID=‘121c55b0-c349-4796-99a3-8b40f5cdb3f8’​ $SubscriptionID=‘81596357-d210-45be-84b5-db0bfad11580’ ​ ​ Add-AzureRMAccount –tenantid $TenantID –subscriptionid $SubscriptionID –credential $Credential​ ​ Get-AzureRmResource | Ft ResourceName,ResourceGroupName,ResourceType  Get-AzureRmResourcegroup | ft ResourceGroupName, Location, ResourceID ​ ​ Get-AzureRmNetworkInterface | ft Name,Location,ResourceGroupName ​ ​ Get-AzureRmVirtualNetwork | Select Name, ResourceGroupName, Subnets​ ​ ​ $VM=get-azurermvm -ResourceGroupName MVPDAYSAzureRG -name MVPDAYS2016 ​ ​ $VMSize=$vm.HardwareProfile.VmSize​ $ResourceGroup=$vm.ResourceGroupName​ $VMStorageURL=($vm.StorageProfile.OsDisk.Vhd).uri​ $StorageGroupURL=$VMStorageURL.substring(0,(($VMStorageURL| Select-String -Pattern '/' -AllMatches).Matches[-1].Index)+1)​ $location =$VM.Location​ $Publisher=$VM.StorageProfile.ImageReference.Publisher​ $Offer=$VM.StorageProfile.ImageReference.Offer​ $Sku=$VM.StorageProfile.ImageReference.Sku​ $Version=$VM.StorageProfile.ImageReference.Version​ ​ $AzureImage = Get-AzureRmVMImage -Location $location -PublisherName $Publisher -Offer $Offer -Skus $Sku -Version $Version​                               ​  ​ ​
  5. Feedback http://tinyurl.com/MVPDaysYYZ  (Toronto) http://tinyurl.com/MVPDaysYOW  (Ottawa) http://tinyurl.com/MVPDaysYUL  (Montreal)