page contents My title page contents A Blog on Tools, Techniques and Announcements

Wednesday, December 20, 2017

Implementing Azure Virtual Machine using ARM


Note that the command are listed below
Login-
AzureRmAccount
Get-AzureRmSubscription
Select-AzureRmSubscription –SubcriptionName ‘Test’
Get-Command –Module AzureRM.compute
image

Reference :https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-ps-create/#example

Step 1: Install Azure PowerShell

This is something that we have covered in  the previous chapters

Step 2: Create a resource group

Get-AzureRmLocation | sort Location | Select Location
Choose one of the Locations
Then Save the LocationName in a Variable
$locName = "centralus"
Replace the value of $rgName with a name for the new resource group. Create the variable and the resource group.
$rgName = "mygroup1"
New-AzureRmResourceGroup -Name $rgName -Location $locName

Step 3: Create a storage account

A storage account is needed to store the virtual hard disk that is used by the virtual machine that you create.
Replace the value of $stName with a name for the storage account. Test the name for uniqueness.
$stName = "999storage"
Get-AzureRmStorageAccountNameAvailability $stName
If this command returns True, your proposed name is unique within Azure. Storage account names must be between 3 and 24 characters in length and may contain numbers and lowercase letters only.
Then Run  the Command to create the storage
$storageAcc = New-AzureRmStorageAccount -ResourceGroupName $rgName -Name $stName -SkuName "Standard_LRS" -Kind "Storage" -Location $locName
 

Step 4: Create a virtual network

All virtual machines are part of a virtual network.
Virtual Networks Have Subnets,
you cannot proceed further without a Subnet, hence it is important to create a Virtual network and  then  a Subnet
New-AzureRmVirtualNetwork -ResourceGroupName mygroup1 -Name TestVNet ` -AddressPrefix 192.168.0.0/16 -Location centralus  
Save the Value of the Virtual Network in a Variable
$vnet = Get-AzureRmVirtualNetwork -ResourceGroupName mygroup1 -Name TestVNet
Create a Subnet
Add-AzureRmVirtualNetworkSubnetConfig -Name FrontEnd `-VirtualNetwork $vnet -AddressPrefix 192.168.1.0/24

Step 5: Create a public IP address and network interface

To enable communication with the virtual machine in the virtual network, you need a public IP address and a network interface.
  1. Replace the value of $ipName with a name for the public IP address. Create the variable and the public IP address.

    $ipName = "myIPaddress1"
    $pip = New-AzureRmPublicIpAddress -Name $ipName -ResourceGroupName $rgName -Location $locName -AllocationMethod Dynamic
  2. Replace the value of $nicName with a name for the network interface. Create the variable and the network interface.

    $nicName = "mynic1"
    $nic = New-AzureRmNetworkInterface -Name $nicName -ResourceGroupName $rgName -Locat


Step 6: Create a virtual machine

Now that you have all the pieces in place, it's time to create the virtual machine.
  1. Run the command to set the administrator account name and password for the virtual machine.

    $cred = Get-Credential -Message "Type the name and password of the local administrator account."
    The password must be at 8-123 characters long and meet three out of the four complexity requirements: one lower case character, one upper case character, one number, and one special character. See more about username and password requirements.
  2. Replace the value of $vmName with a name for the virtual machine. Create the variable and the virtual machine configuration.

    $vmName = "myvm1"
    $vm = New-AzureRmVMConfig -VMName $vmName -VMSize "Standard_A1"
    See Sizes for virtual machines in Azure for a list of available sizes for a virtual machine.
  3. Replace the value of $compName with a computer name for the virtual machine. Create the variable and add the operating system information to the configuration.

    $compName = "myvm1"
    $vm = Set-AzureRmVMOperatingSystem -VM $vm -Windows -ComputerName $compName -Credential $cred -ProvisionVMAgent -EnableAutoUpdate
  4. Define the image to use to provision the virtual machine.

    $vm = Set-AzureRmVMSourceImage -VM $vm -PublisherName MicrosoftWindowsServer -Offer WindowsServer -Skus 2012-R2-Datacenter -Version "latest"
    See Navigate and select Windows virtual machine images in Azure with PowerShell or the CLI for more information about selecting images to use.
  5. Add the network interface that you created to the configuration.

    $vm = Add-AzureRmVMNetworkInterface -VM $vm -Id $nic.Id
  6. Replace the value of $blobPath with a path and filename in storage that the virtual hard disk will use. The virtual hard disk file is usually stored in a container, for examplevhds/WindowsVMosDisk.vhd. Create the variables.

    $blobPath = "vhds/WindowsVMosDisk.vhd"
    $osDiskUri = $storageAcc.PrimaryEndpoints.Blob.ToString() + $blobPath
  7. Replace The value of $diskName with a name for the operating system disk. Create the variable and add the disk information to the configuration.

    $diskName = "windowsvmosdisk"
    $vm = Set-AzureRmVMOSDisk -VM $vm -Name $diskName -VhdUri $osDiskUri -CreateOption fromImage
  8. Finally, create the virtual machine.

    New-AzureRmVM -ResourceGroupName $rgName -Location $locName -VM $vm














image


You can  finally verify the machine using the variable
image
image




Read More »

Thursday, September 22, 2016

What’s new in System Center 2016 Technical Preview 5


Overall, System Center 2016 will be a significant upgrade over System Center 2012 R2 to manage key aspects of your applications and infrastructure, including client and server configuration management, monitoring and alerting, orchestration and automation, event and incident management, data protection, and virtual machine and infrastructure fabric management.
Here’s a summary of some of the key innovations in this latest version of System Center.

 

Manage your virtualized datacenter using Virtual Machine Manager

System Center Virtual Machine Manager 2016 will provide a comprehensive solution for deploying and managing your Windows Server 2016-based software-defined datacenter. With Virtual Machine Manager, you will be able to manage your fabric as well as workloads in one place. You can try the following with Technical Preview 5:
Compute
  • Deploy compute and storage clusters from bare metal machines
  • Manage the lifecycle of the new, minimal-footprint Nano Server-based hosts and VMs
  • Perform rolling upgrade of Windows Server 2012 R2 clusters to Windows Server 2016 clusters with no downtime for the hosted workloads
  • Take application-consistent VM checkpoints (production checkpoints)
  • Change memory and virtual network adapter configuration of a running VM
Networking
  • Easily deploy Software Defined Networking (SDN) components like Network Controller, Gateway, and Software Load Balancer (SLB) using pre-defined and customizable service templates
  • Create and configure all SDN entities, such as virtual networks and virtualized network functions (e.g., gateways, SLB) via the Network Controller
  • Create and manage flexible gateway pools instead of traditional gateway clusters to achieve higher availability with fewer virtual machines
  • Control network traffic coming in and out of a VM using port access control lists (port ACLs)
Storage
  • Deploy and manage storage clusters with Storage Spaces Direct (S2D) in disaggregated and hyper-converged topology. S2D reduces storage costs by building highly available and scalable storage systems using industry-standard servers with local storage
  • Replicate storage volumes synchronously using Storage Replica (SR) instead of expensive storage-based replication
  • Enforce Quality of service (QoS) for virtual machine storage to avoid the noisy neighbor problem.
Security
  • Manage the lifecycle of guarded hosts that provide the infrastructure for shielded VMs; these hosts protect VM data against snooping and tampering by fabric administrators or malicious software
  • Create shielded VMs using the Virtual Machine Manager console and Windows Azure Pack (WAP)
  • Convert non-shielded virtual machines to shielded virtual machines using the Virtual Machine Manager console and WAP

Monitor your datacenter infrastructure and applications using Operations Manager

System Center Operations Manager 2016 will expand the surface area of monitoring, and enhance the experience of monitoring infrastructure and applications across public and private clouds. The new version of Operations Manager will also ease the discovery and maintenance of management packs, provide better support for Linux environments, and integrate with the Operations Management Suite to provide richer analytics and improved diagnostics. You can try the following with Technical Preview 5:
  • Monitor a broad range of network devices without requiring Operations Manager certification
  • Monitor Nano Server deployments, including DNS and IIS roles
  • Realize more than 2X scale improvement in monitoring UNIX/Linux servers
  • Experience a more responsive application console, including the ability to navigate across different views and pivots without having to wait for the data to load
  • Seamlessly discover, install and update required management packs right from the administration console
  • Tune management packs, and alter the monitors and alerting rules – either at source level or group level – to reduce alert noise
  • Plan and schedule maintenance windows for workloads without generating spurious alerts in Operations Manager console
  • Utilize the Preferred Partner program to discover third-party management packs, authoring tools, dashboard utilities, etc., right from the Operations Manager console

Deploy, configure, and keep your Windows and mobile devices up to date using Configuration Manager

System Center Configuration Manager provides a unified management console with an automated set of administrative tools to deploy software, protect data, monitor health, and enforce compliance across all devices in your organization. New enhancements in Configuration Manager make deploying and managing Windows easier than ever before with new improvements including the support of the latest Windows 10 features, Windows in-place upgrade, more frequent and easier updates, unified end-user portal, and more. You can try the following with Technical Preview 5:
  • Deploy, upgrade, and provision Windows with modern methods such as in-place upgrade and provisioning packages and profiles
  • Keep Windows up to date with new configurable deployment rings, servicing dashboard, and cluster-aware settings
  • Manage Windows in a way that works the best for your business through the Configuration Manager agent, on-premises MDM, and the cloud when Configuration Manager is connected with Microsoft Intune
  • Manage iOS, Android, and Windows devices via MDM with improved mobile device and application management capabilities when Configuration Manager is connected with Microsoft Intune
  • Get more frequent and easier to install updates directly in the management console to support new Windows, Configuration Manager, and mobile device management capabilities
  • Allow users to access all of their applications from a unified end user portal
  • Run Configuration Manager in Azure Virtual Machines
  • Manage Office 365 desktop client updates using the Software Update Management (SUM) workflow

Automate your datacenter tasks using Orchestrator and Service Management Automation

You can choose to use System Center Orchestrator or Service Management Automation to automate your datacenter tasks. Service Management Automation will incorporate improved experiences for authoring, testing, debugging and executing runbooks. You can try the following with Technical Preview 5:
  • Create runbooks with native PowerShell scripts and execute runbooks more predictably without heavy pre-compilation steps
  • Utilize an Integrated Scripting Environment (ISE) plugin for authoring and testing runbooks locally
  • Utilize Windows Management Framework 5.0 for authoring runbooks with PowerShell 5.0 scripts

Protect your datacenter using Data Protection Manager

Windows Server 2016 Hyper-V includes new features that improve security, stability and availability, and helps in reducing overall TCO of private cloud deployments. System Center Data Protection Manager has introduced support for protecting VMs deployed on these new Windows Server 2016 Hyper-V scenarios in Technical Preview 5. You can try the following with Technical Preview 5:
  • Continue doing VM backup in the presence of Hyper-V node crash or VM storage migration using the new Resilient Change Tracking (RCT) protection technology
  • Maintain Hyper-V VM backup even as Windows cluster upgrade is in progress
  • Backup and recover shielded VMs
  • Protect VMs deployed on Storage Spaces Direct configuration

Automate Service Delivery using Service Manager

The main focus of System Center Service Manager 2016 is improved performance and usability, which are key customer asks. You can try the following with Technical Preview 5:
  • Deploy HTML5 based self-service portal with updated UX and better performance
  • Experience up to 10x improvement in console performance when creating/updating work items, up to 2x gain in workflow processing, and up to 4x improvement in incident processing capacity
  • Get Configuration Manager and Active Directory (AD) data through connectors up to 67% and 50% faster, respectively, with Entity Change Log (ECL) log disabling
  • Complete incident workflows up to 50% faster
  • Be able to schedule AD group expansion workflows and get up to 75% faster performance
  • Perform ECL grooming up to three times faster
  • Create rich reports and slice data based on Year, Quarter, Month, and Day using new date dimensions in Service Manager data warehouse cubes
  • Use Lync 2013 and Skype for business with Service Manager

More Information on :
https://rcpmag.com/articles/2016/04/27/windows-server-system-center-tp5.aspx







Read More »

Friday, September 2, 2016

How to install and configure Azure PowerShell - Microsoft Azure


What is Azure PowerShell?

Azure PowerShell is a set of modules that provide cmdlets to manage Azure with Windows PowerShell. You can use the cmdlets to create, test, deploy, and manage solutions and services delivered through the Azure platform. In most cases, the cmdlets can be used for the same tasks as the Azure Management Portal, such as creating and configuring cloud services, virtual machines, virtual networks, and web apps.

Step 1: Install

Following are the two methods by which you can install Azure PowerShell. You can install it either from WebPI, or the PowerShell Gallery:
Installing Azure PowerShell from WebPI
Installing Azure PowerShell 1.0 and greater from WebPI is the same as it was for 0.9.x. Download Azure PowerShell and start the install. If you have Azure PowerShell 0.9.x installed, version 0.9.x will be uninstalled as part of the upgrade. If you installed Azure PowerShell modules from PowerShell Gallery, the installer automatically removes the modules before installation to ensure a consistent Azure PowerShell environment.
image[3]
Run the File
image
 
PowerShell for Azure has been Installed
image
Reboot,
Power has Azure Modules Imported, you can also verify the version
image
Make sure that you update PowerShell
PS C:\> update-help –Force
Check some of the Azure Commands with using the noun
image

PS C:\Add-AzureAccount
This opens a windows which will prompt you to enter the credentials

image
Once you enter the credentials, you would see your subscription information
image
View Additional Information on your subscription, Always check this before executing any commands
Currently I am using a trail Subscription and it shows the details below
image

If you Wish to sign out of this Azure Account, use the command Below :-
PS C:\Remove-Azureaccount -name v_2maxa@live.com
image
Thanks for Reading









Read More »

Tuesday, August 30, 2016

Azure DevTest Labs available in new Canada, India, and US regions


Azure DevTest Labs is available in the following new regions of Canada, India, and the US that support the required Azure resources used in the labs:
  • Canada Central
  • Canada East
  • US West 2
  • US West Central
  • India Central
  • India South
Customers can use DevTest Labs to create a lab in any of these locations, in addition to the other 15 regions that are supported.
Azure DevTest Labs is a service that helps developers and testers quickly create environments in Azure while minimizing waste and controlling cost. You can test the latest version of your application by provisioning Windows and Linux environments through reusable templates and artifacts. Easily integrate your deployment pipeline with DevTest Labs to provision on-demand environments. Scale up your load testing by provisioning multiple test agents, and create pre-provisioned environments for training and demos.

Read More »

Monday, August 29, 2016

Preparing for the Azure Exam 70-533


Prepare to pass the Microsoft Azure 70-533 exam

So the Primary focus should be on the topics mentioned below, this is as per the blue print listed on the Microsoft website for the certification 70-533

  • Implement Websites
  • Implement Virtual Machines
  • Implement Cloud Services
  • Implement Storage
  • Implement an Azure Active Directory
  • Implement Virtual Network

You need to have a good Understanding of  Cloud Computing and Microsoft Azure

Microsoft has several Datacenter accross the world, these are listed on the azure portal

Services offfered :-
On-Demand Self Service
-Don't have to be an admin
-end user can do it, create, Delete, provision
-App Developers can use this

Broad Network Access
Requires LAN/WAN
-You need High speed Network Connection on premises

Resource Pooling
Cloud Provider abstract Infrastructure
-Cloud computing tenant
-pay as you need (Disk, Memory, CPU)

Rapid Elasticity
Scale up and down to meet demand
Automatically- you can host business website online and  do not pay for tha less load
pay for load as per usage
-pay only for the services

Measured Service
Pay for the resources you use
if you buy a Computer-OEM, also gets junk software that get them money


Cloud Computing –Some of the Leading Providers
  • Microsoft Azure
  • Office 365
  • Amazon Web Services
  • Google Cloud Platform (Developer focused)
  • Salesforce (Pioneer of the public cloud)..SAAD
  • Dropbox (generated a lot of business-Cloud based storage)

Cloud Service Models
SaaS
Audience :  End Users
Examples :
  • Office 365
  • Dropbox

PaaS
Audience : Software Developer
Examples :
  • Mobile Apps (iOS, Android, Windows)
  • API Services

Back-end VMs are abstracted away, developers can use its seemlessly

IaaS
Audience: System Administrator
Direct access to VMs and Virtual networks

Premises is a location
Premise is an Idea

Cloud Deployment Types
Microsoft Describes Azure as a combination of IaaS and PaaS
Public Cloud
Azure, AWS

Private Cloud
Take as much of the Public cloud ideas,
  • scale
  • self service
  • resource pooling
Replicate a public cloud in your data center would be expenses
System center or Azure Stack could be used here
Hybrid Cloud
  • on premises
  • Domain Controller
  • Exchange
  • File Services
  • Extending on premises to cloud

Demo:
Registering a Azure Account
Search for Azure Credit
Trail :
You need a credit card for subscription
You could avail around $200 a month during the trail period to evaluate and user the Azure services
Microsoft Certified Trainers, MVP also get these free credits as a reward

There is a Calculator you could use,
Spending limit to control your expenses on your subscription
Let’s sign-up
https://azure.microsoft.com


image
Sign-Up with a Credit Card
MS will not accept Prepaid cards
Post Completion of Phone Verification
Remember you will not be charged till you explicitly  upgrade to a paid offer
it will take you to Portal.azure.com
image
the other one that you need to know is manage.windowsazure.com
you can always keep a track of the credit status, this will get used up based on the services you use
image




Understand the Difference Between ASM Vs ARM


Azure Service Managementmanage.windowsazure.com Azure Resource Manager
portal.azure.com
XML-based REST API JSON-based REST API
Separate Xplat-CLI modes, Portals, PowerShell modules Resources are JSON template-based container
    Taxonomic tagging(Costs)
     Download pre-build services (ARM templates)
Resources are created and managed separately in cloud services Role Based access control (RBAC)
Look for “Classic” in the new portal you can manage resource groups  as a single unit

Azure Resource Manager*
Focus more in Production


Demo:

Visit the Classic Azure Portal
and then compare it with the new Azure Portal
manage.windowsazure.com
image
know the console better
Global Navigation  on  the  left
portal.azure.com
image
a lot of java script libraries are present
Dashboard and tiles are customizable
the list is customizable
image

the options on the navigation bar and sub categories are awesome, Microsoft call them blades
always keep an eye on the Bell Icon to read the notification

Tip : Understanding Cloud Computing and PowerShell Automation ensures your future viability in the IT Market place
Read More »

Thursday, August 25, 2016

PowerShell-Day7


Understanding the GM,
When you run the command Get-Service,  you get the results as mentioned below
image
you can see the only three columns displayed are Status, Name and DisplayName,
Now this is because Microsoft has configured some configuration files which tells the command only to display certain columns, this could be cause certain commands have a lot of data
that can be displayed and will fill the entire screen with the  output.
There other Columns that are hidden for the service, Eg : Dependent service, Logon  Name, Etc.
if you want to see those columns then you need you need to know their property names
this is only possible using the Get-Member Command
image

Method : A way of telling an object of doing something /Actions, Eg : telling a service to Stop/Start
Event  : Fire off when something happens with service
Property : Columns available with the commands
TypeName : ServiceController,
Every different object will have a different Type Name associate with it, So the get-Service produces objects related to service Controllers.
Read More »

Wednesday, August 24, 2016

PowerShell-Day6


Using the Get-Member Command (gm)
Lets look at an example
image
Now look at the output above, the command will give you the output as per the instructions of the config file, you need to decide and filter or sort the data as per you need
So we need to know what are the columns available that are available for use with the above command

Each Row in an Object
image
and each Column is a Property
image
So lets see the Property using the same cammand
imageGet-EventLog -LogName System -Newest 50 | Get-Member
or
Get-EventLog -LogName System -Newest 50 | gm
The output would be the same
image
Even if it says ScriptProperty it’s still a Property
EventID is InstanceID as shown below
image
you can use the GM command with any command that can be piped
Eg :
Get-Process | gm
Get-Service | gm
Read More »

Tuesday, August 23, 2016

PowerShell-Day5


You Always need to focus on Neat Typing
PowerShell will allow you to use spaces as seen in the command below
image
Even if the command does not have spaces, it will still give you the same results
image

What’s important here is the using the spaces between the Parameter and the commands and the spaces between two Parameters,
Hence instead of remembering where to use spaces and where to skip, its better to use spaces to make it look Neat
Read More »