Power of Microsoft Cloud – Azure

Another session conducted in College of Advanced Scientific Techniques (CAST) on 10th December for ICT students to aware of Power of Microsoft Cloud – Azure.
Response was huge more than expectations. CAST did more than 175 students, entrepreneurs and teachers registration. Agenda for session was

· What is Microsoft Cloud Computing?
· What Microsoft Azure Cloud?
· How world moving towards Microsoft Cloud?
· Microsoft Cloud Job market situation around the world
· How to start while you are in College/University 
· Tip and Tricks

At end of session there was high tea for audience.






Storage Explorer option in Azure Portal

There are couple of ways in order to interact with Azure Storage i.e using Visual Studio, Azure Portal. But Storage Explorer is very good tool in order to explore the Azure Storage. Here is good news Microsoft updated the Azure Portal by providing option to open with Storage Explorer.







Introduction of Microsoft Cloud Computing

 Introduction of Microsoft Cloud Computing to upcoming final year ICT students is really very important. While I was on vacations in middle east and Pakistan I thought to aware the students about Microsoft Cloud independent of location. I conducted 2 sessions on in College of advanced and scientific techniques CAST and other in Govt. College Sahiwal. There were more than 150+ audience including Final year students and teachers in that session. Special thanks to IT Society of Govt.College Sahiwal who arranged this sessions.
More Online Skype sessions will be conducted as discussed with Head of Computer Department of Govt. College Sahiwal.







Azure - VNet-2-VNet Connectivity Using PowerShell Script

The purpose of this script is to create two Azure Virtual Networks in different Azure regions and then make connectivity between them. PowerShell script will create Virtual Networks, Define Virtual Gateways, Virtual Networks Connections and connectivity between them.




DevOps is not a product to install

It is very important to realize that DevOps is not a product.  You cannot buy DevOps and install it. Thanks to Donovan for clarification. Microsoft Visual Studio is powerful and Complete DevOps Solution.

I tried to sketch diagram and simple definitions of DevOps practices.

Continuous Integration: is basically code merging into Source Control e.g (could be on Prem/Off Prem Microsoft Tools/Services) to make sure upcoming changes with other changes.

Continuous Delivery: is to continuous propagation of code changes on (Test, Pre Production/Staging OR Production).


Continuous Deployment: is code deployment on Production as soon as its ready rather than waiting for other changes and releases.


Build Domain Controller with AD Tenant in 60 minutes - Azure

 “Infrastructure as code” true power of Microsoft Azure Cloud. Here I sketched a single file use to Install a domain controller in Microsoft Azure with provision of an Azure AD Tenant. You need to define all parameters first. All AD Groups, AD Test users, AD Members and AD OUs are present in attached .csv files. I passed the example parameters in script. Script will do following in sequence shown below based on your parameters
·        Storage Account
·        Virtual Network and Subnet
·        Cloud Service
·        Virtual Machine
·        Domain and Tenant

Since i am in New Zealand so, i mentioned my closest Microsoft data center location "Australia East" in script everywhere. Place all files in one folder for example in my case all files residing at location in folder C:\DC\
DC is folder name here, all files with given below names are attached
--------------------------------------------------------------------------------------
File to create domain controller: DomainController.ps1
File to create VNet and Subnet: CreateVNetSubNet.xml
File to create AD Groups: AD_Groups.csv
File to create AD members: AD_Members.csv
File to create AD OUs: AD_OUs.csv
File to create AD Users: AD_Users.csv
--------------------------------------------------------------------------------------

Click here to download all files.


Here are steps to execute scrip with mentioned files.

1. Open PowerShell ISE with Administrator Account 
2. Add-Azure Account as shown below




3. Pass Azure Account Credentials in prompt window





4. Run command Get-AzureSubscription in order to see subscription is valid or not



5. Select the DomainController.ps1 from location C:\DC\ and open in PowerShell


  



6. Run the script and it will look like below, note script is start executing in sequence



7. Here you can see the progress






8. After completion of above following will be created



9. Click on VM i.e "MyTestVMforAD"






10. Press "Connect" to take session




11. After log-in, go to server administrative tools and click "Active Directory Users and Computers"




12. WOW, domain controller has been provisioned and users imported :)





How to create and apply Network Security Group/Rules Using PowerShell in Azure

What is NSG in Azure?
NSG is the region specific and can be used only within the region specified at creation time.



You can create network security group (NSG) using the PowerShell script. Here are some steps to create and apply NSG

1. Create a new NSG. Since I am in New Zealand and closet data centre for me is "Australia East" so i will use this in example
New-AzureNetworkSecurityGroup -Name "WFE_NSG" -Location " Australia East" -Label "WebFrontEnd NSG in Australia East"

2. Apply the rule to the NSG. Rule will allows all traffic from the Internet
Get-AzureNetworkSecurityGroup -Name "WFE_NSG" | Set-AzureNetworkSecurityRule -Name WEB -Type Inbound -Priority 100 -Action Allow -SourceAddressPrefix 'INTERNET' -SourcePortRange '*' -DestinationAddressPrefix '*' -DestinationPortRange '*' -Protocol TCP

3. Enabling inbound SQL communication
Get-AzureNetworkSecurityGroup -Name "WFE_NSG" | Set-AzureNetworkSecurityRule -Name SQL -Type Inbound -Priority 110 -Action Allow -SourceAddressPrefix '10.0.1.0/24' -SourcePortRange '*' -DestinationAddressPrefix '10.0.2.0/24' -DestinationPortRange '1433' -Protocol TCP

4. Applying Network Security Group (NSG)
Get-AzureVM -ServiceName $service -Name $VM | Set-AzureNetworkSecurityGroupConfig -NetworkSecurityGroupName "WFE_NSG"

5. Apply NSG to a virtual subnet
Get-AzureNetworkSecurityGroup -Name "WFE_NSG" | Set-AzureNetworkSecurityGroupToSubnet -VirtualNetworkName 'MyTestVNet' -SubnetName 'WFE_Subnet'
Get-AzureNetworkSecurityGroup -Name "WFE_NSG" | Set-AzureNetworkSecurityRule -Name RDPIN -Type Inbound -Priority 101 -Action Allow -SourceAddressPrefix 'INTERNET' -SourcePortRange '*' -DestinationAddressPrefix '*' -DestinationPortRange '3389' -Protocol '*'

Awesome MS Ignite 2016 - Auckland New Zealand

Thank you Microsoft for rocking MS Ignite 2016 in New Zealand. It was awesome experience with tech super stars in SkyCity Auckland. I really enjoyed technical sessions most specifically New in OMS, Azure IoT, DevOps, HoloLens last but not least Azure Security. 




Copying Objects (Blob) in cross Azure Subscriptions

In Azure copying objects from one subscription to another subscription OR within same subscription is very easy without any complexity. In this copy you don’t need to provide subscription ID or address etc.

To access storage accounts in Azure a key is required. Key you can get from Azure portal (As shown below in properties of Azure Storage Account). 







DevOps - ALM Training

Daniel Larsen from Microsoft gave us 4 days session on DevOps and Application Life Cycle Management training. It was fantastic to have one to one session with him. We learned ALM cycle.




Azure Automation - Automate your Development VMs


Microsoft is offering more than 200 cloud services. Azure Automation is very powerful service in Microsoft Cloud to automate other services.
For example Azure Automation can help in order to automate


  • Auto space provisioning/ Backup Restore space
  • VM’s availability in specific hours (On Prem/Cloud)
  • Notify users of underutilized VMs and perform remediation
  • Alert on a VM then turn on tracing, collect logs, upload to Azure Storage and make available in Visual Studio for troubleshooting
  • Deploy a new service to Azure and configure the end points for CPU and Memory alerts


There are many stuff you can automate but in below i will automate on scenario

Scenario: Azure Dev VM's required only in office hours (9:00 AM - 5:00 PM). That automation will save your VM consumption time significantly. You don't need to Start/Stop manually VM's daily. Here is step by step guide


1. Open  Azure Portal with URL https://portal.azure.com















2. Click on more services






































3. Search with name "Automation" you will found (Automation Account)



4. Click "Add" to create new "Automation Account"


5. Provide necessary details like name, Subscription, Resource Group, Location etc as in example its "TariqAzureAutomationAccount"


6. After you press create button you can see bell sign for status either created or not yet
7. In below image Automation Account created


8. Click on created automation account for details and here you can see "RunBooks", Click on "RunBooks"


9. This will redirect to page shown below to create new "RunBook"

10. Provide details like Name, Type as shown below



11. After some seconds you can see "RunBook" created

12. Click on newly created RunBook as in my example is "MyTestRunBook", click Edit button 

13. This is called Canvas where you can write code, here i pasted Connection String. This will handle authentication with Automation Run As account

 $Conn = Get-AutomationConnection -Name AzureRunAsConnection 
 Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID `
 -ApplicationId $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint


14. On left side you can find PowerShell commands available for further actions

15. In my example we want to start Azure Development VM, so selected "Start VM" command by doing right click and add to canvas

16. This will looks like this




17. Put your VM name and Resource Group Name as shown below








18. After save, click on start



19. After some moments this will show you status like below 


20. Now save and click Publish












21. Once you click Publish option will give you alert










22. Window will looks like below and you can set schedule for your job














23. Click on Schedule in order to create new schedule



24. In below example name of schedule is "StartDailyVMs" and start time is 9:00 AM






25. You can see schedule has been created and "Status" is On












26. Schedule is already done and job will be executed next day morning at 9:00AM but here you run job forcefully also





 27. After job i can see status of my existing virtual machine "TestVM1" is changed from "Stopped" to "Starting"