AZ 104 Master Cheat Sheet
AZ 104 Master Cheat Sheet
Subscriptions
Resource tagging
💡Always tag!
Tags are additional metadata that can be assigned to resources/resource groups.
o ❗ Child resources do not inherit resource groups tags
o ❗ Max 15 tag name/value pairs.
E.g. CostCenter = YHZ
Why?
o Organize
o Search
o View
o Billing & cost managements
On Portal
o You can search for Tags and see filtered lists.
o ❗ Resources are tagged after resource is created as opposed to PowerShell/CLI.
Spending Limits
pg. 1
SKILLCERTPRO
Identifies wastage
E.g. idle VMs, SQL DBs.
o Can configure automatic shutdown
o Auto-shutdown option in VM.
Recommendations about:
o High availability
o Security
o Performance
o Cost recommendations, e.g.:
Virtual machine reserved instances to reduce costs.
VM resizing: Scale up / down
Remove unprovisioned ExpressRoute circuits.
Configure rule:
o E.g. Average CPU Utilization < 5%
pg. 2
SKILLCERTPRO
Subscription blade
Optimizing VM costs
pg. 3
SKILLCERTPRO
Resource groups
Logical grouping of resources that shares the same lifecycles.
o Resource group holds different unique resources.
o Resource groups can contain resources that reside in different regions.
Location of resource group is just the meta data for the resource group.
Tags
Categorization / organization of resource groups for e.g. billing, management
E.g. Dept: IT
💡 Tags are not inherited
❗ Max 15 tag name/value pairs.
Locks
For accidental deletion or accidental changes to resources within a resource group.
Consists of two locks:
o CanNotDelete
Authorized users can still read and modify a resource, but they can't
delete the resource.
o ReadOnly
Authorized users can read a resource, but they can't delete or update the
resource.
Same as giving everyone a Reader role.
Locks are inherited from resources within the resource group.
IAM
Access control, RBAC
Roles are inherited
Role assignment: Role definition role (role, e.g. Reader) + Person/Scope/Service
Principal + Scope
Policies
Azure entity that controls behaviors within a resource group
o Allow you to keep compliant with corporate standards and SLAs.
o Set in a scope with a name and definition.
pg. 4
SKILLCERTPRO
Events
Create event subscriptions triggered by the resources group in Event Grid.
Automation Script
Can be added to library to be redeployed later on.
o ❗ All resources cannot be redeployed
o 💡 Must change the name to avoid duplicates.
ARM templates for resource groups can also be found on GitHub.
You can Add to library, or click on Deploy to deploy directly.
Moving Resources
You can move resources to another resource group or subscription.
❗ All resources cannot be moved.
Ways of moving
o Using CLI: az resource move --destination-group new-rg --id resourceid
o In portal: Overview → Move
Alerts
1. Target: What resource and where
2. Criteria: What specific action
3. Details: Who, when, where, how
4. Action Group: Who to inform and how to inform them
Metrics
1. Resource group: Where to look at the metric
2. Resource type: The type of resource to look at
3. Available metrics: What specifics about the metrics
pg. 5
SKILLCERTPRO
Roles
Role assignments
Delegated resource administration
Roles organize related resource permissions together
o Depends on resource type
E.g. different for VM and storage.
Scope
o Roles are applied to a scope.
o They're inherited in following order:
Management groups
Subscription
Resource groups
Individual resources
Role can be assigned to:
o Users
o Groups
o Service principal
Application
System Assigned Managed Identity: App Service, Function App, Virtual
Machine, Virtual Machine Scale Set
User Assigned Managed Identity
Role types
Built-in roles
60+
Common roles:
o Owner: Manage resources and resource access
o Contributor: Manage resources but not resource access.
pg. 6
SKILLCERTPRO
Custom roles
{
"Name": "Network Resource Viewer",
"IsCustom": true,
"Description": "Allows reading Azure network resources.",
"Actions": [ "Microsoft.Network/*/read" ],
"NotActions": [ ],
"AssignableScopes": [ "/subscriptions/048.." ]
}
pg. 7
SKILLCERTPRO
Azure AD
pg. 8
SKILLCERTPRO
o If you need separation of roles, you can create a new tenant and assign roles and
permissions on that account.
Custom Domains
You initially get tenantname.onmicrosoft.com
Custom names must be fully qualified: Not a local name but an online name.
Ownership must be verified
o Microsoft gives text records (TXT or MX)
o You put text record in DNS to get verified
You can verify multiple domains
Possible to register subdomains but you register parent domain.
In Portal: Active Directory → Custom domain names → Add custom domain
Multiple Directories
Resource independence
o Resource in one directory does not have access to resource in other directory
o No forests, trusts etc.
Administrative independencies
o ❗ If you're global admin in one directory doesn't mean you have any access in
other directory.
Synchronization independence
o You can synchronize to specific directory and it does not impact other directories.
Switch directory
o In Portal → Active Directory → Overview → Switch directory
Conditional Access
Can be applied on users, locations, devices, applications.
Policies allow you to have
o One application with multiple rules
o One rule with multiple applications
❗ Only available in Azure AD Premium
Condition (if something) → Control (do something)
o Conditions
Users and groups
• Groups • User ID • Locations (IP)
pg. 9
SKILLCERTPRO
Cloud apps
Device platform and state
• Domain Joined • Compliant • Lost or Stolen
Locations (IP)
Client apps
o Control: Allow, Deny, MFA
Multi-factor authentication
Compliant device
Approved client app
Terms of use
Custom and session controls
Manage in AD - Conditional Access
Example policy: "Marketing app from US only"
o Assignments
Users and groups: All users
Cloud apps: Marketing app (registered in Azure AD)
Conditions
Locations: Include any location but exclude Contoso location
Contoso locations is a named location
Set US locations in portal: Active Directory →
Conditional Access → Named locations
Client apps: Apply policy with access from Browser but not from
mobile apps and desktop clients.
o Access controls: Block access
Access Reviews
Access review is created for an identified reviewer.
o Duration can be set
o Usually created by administrators.
o Reviewers can approve or deny.
Access review can be a member of programs.
o A program groups reviews together.
Managed in Access Reviews (separate view, not included in AD)
Administrative Units
Container of resources
pg. 10
SKILLCERTPRO
Used for
o Delegating administrative permissions over subsets of users
o Applying policies to a subset of users
Useful in organizations with independent (autonomous) divisions
An administrative unit is a directory object that can be created and populated with
resources/users.
AD Premium feature
E.g. a central administrator can
o Create an administrative unit for a particular school (Business school)
o Populate it with only the Business school users
o Central administrator can add the Business school IT staff to a scoped role
Grants the IT staff of Business school administrative permissions only over
the Business school administrative unit
Identity Protection
Detection
o Vulnerabilities
E.g. MFA not configured, Unmanaged cloud apps, privileged identity
management (only grant identity to user for a set period of time).
o Risk events (e.g. user sign in in from unknown detection)
E.g. leaked credentials on internet, anonymous IP addresses (VPNs etc.),
suspicious IP addresses, impossible travel (superman event, user logs in
from NY and after 5 minutes logs in from Hong Kong), Unknown
locations, infected devices.
Investigations
o Receive notifications
o Workflows (when, who, what happened)
o Analysis: How can you apply policies to prevent future events?
Policies
o User risk policy: E.g. if user risk event is high, allow access but require password
change
o Sign-in risk: E.g. if sign-in risk is medium, allow access but require MFA.
pg. 11
SKILLCERTPRO
Azure AD Entities
Users
Types of users
Common settings
Usage Location
pg. 12
SKILLCERTPRO
User name
o Required, e.g. [email protected]
Properties: Optional information e.g. first name, last name, job title.
External access
Scenarios
o Allows users to change their passwords
o If you cannot log in somehow
o Helps with account lockout
Authentication methods
o Types:
Text message/Phone call
Secondary email
Security questions
o Administrator requires one or more.
Manage in portal
o Steps: Active Directory → Password Reset
o Configurations
Enable
You can enable for all users or selected users.
💡 Good to first enable for a pilot group to see how it works.
Registration
Require users to register when signin in
Prompts user to fill information for authentication
methods.
After how long user will be prompted to confirm authentication
method information
Notifications
Notify users on password resets
Notify all admins when other admins reset their password
pg. 13
SKILLCERTPRO
User settings
Enterprise applications
o Users can consent to apps accessing company data on their behalf (yes/no)
Yes; users can consent to allow third party and multi-tenant applications
to consent on their own behalf.
o Users can add gallery apps to their Access Panel
No; as an administrator you have to manually integrate the applications
through Access Panel
App registrations
o Users can register applications (yes/no)
Yes; non administrations can register applications to be used within the
directory, no; only administrators can do it
Groups
Types of groups
o Assigned or Dynamic
Assigned: You assign users to groups manually
Dynamic: You select various attributes to make users member of a group
Dynamic query e.g. department Equals marketing
o Security or Office 365
Security groups are for assigning permissions.
Owners and members
o Owners: Can add/remove users from the group.
o Members: cannot manage the group, normal permissions
Expiration of groups
o Groups can automatically expire.
You manage in "Azure Directory → Groups"
o You can assign licenses to a group where each member will get a license.
Good for performing bulk user updates
Self-service group management
o Owners manage groups instead of administrator that manage the group for the
owners.
o Users can request to join in group with providing some business justification.
o Audits & alerts
Everything is logged
You can e.g. trigger alert on frequent activities in a group
Company Branding
o In portal: Active Directory → Users and groups → Company branding
pg. 14
SKILLCERTPRO
o Allows you to customize the pages with e.g. banner, sign-in page text, user name
hint
Devices
Enables more management
Device settings show overview in Portal
o Intune + MDM offer much more control
You can add work or school account to integrate
Registration types
Register Device
Basic registration
Bring your own device (BYOD) scenario
For mobile devices and Windows 10
o Enable/disable and additional management (MDM) for mobile devices like intune.
Enterprise State Roaming
o Users synchronizes their user settings and application settings data to the cloud.
o Supported in Windows 10
o Enhanced security, management and monitoring.
o Separation of corporate and consumer data in cloud.
Join Device
Hybrid Join
pg. 15
SKILLCERTPRO
Manage in Portal
Control permissions
o Who's allowed to access join devices?
Control sync
o Enabled/disabled
Device management through Intune or other MDM
Conditional access
o Whether or not device has access to resources within your organization
Applications
Azure AD IDaaS (Identity Directory as a Service)
Application types
o Third party or internal
pg. 16
SKILLCERTPRO
o Pre-integrated or proxies
Automated user provisioning through SCIM 2.0
o Use provisioning enables synchronization of user account.
o SCIM
System for cross domain identity management.
Defined by IETF
Control users, groups and their relations
o Available on select SaaS apps
In portal, you can assign access to applications
o AD → Applications → Select application → Users and groups
Hybrid Identities
Hybrid (common) identity = Cloud + On Premises identity
Connection is done through Azure AD connect
Four Pillars
Unified Development and DevOps
o A common approach to building applications, and full flexibility to deploy in the
cloud or on-premises
Integrated management and security
o Built-in management and security solutions across full operational lifecycle from
cloud to on-premises
Common Identity
o Enable end-user productivity with single sign on to cloud and on premises
applications while protecting corporate data
o Single identity
Create and manage a single identity for each user across your hybrid
enterprise, keeping users, groups and devices in sync
o Single Sign-on
Provide single sign-on access to your application including thousands of
pre-integrated SaaS apps
o Conditional Access
Protect identities by enforcing risk-based conditional access policies and
multi-factor authentication for both on-premises and cloud applications
pg. 17
SKILLCERTPRO
o Remote Access
Provide secure remote access to on-premises web applications through
Azure AD Application Proxy
o Self Service
Self-service password reset and application access requests for directories
in the datacenter an the cloud
o High Availability
o Collaboration
Enable vendors, contractors and partners to get risk-free access to in-
house resources
o Consistency
Truly consistent capabilities
Consistent Data Platform
o Seamlessly distribute data between cloud and on-premises
o Enrich with analysis and deep learning
Azure AD Connect
Integrate your on-premises AD or LDAP directory to the cloud
Establish a single identity for your users to access on-premises and cloud-based
resources
Connect your users to thousands of SaaS applications published through Azure
Manage in Azure AD Connect → Synchronization Service
Adjust to business changes after Azure AD Connect is installed.
Change the service accounts
Add the Managers OU to be included in the synchronization
Installation settings
o Initially
Custom or Express installation
Installation location
pg. 18
SKILLCERTPRO
pg. 19
SKILLCERTPRO
Password synchronization
Password writeback
Group writeback
Device writeback
Directory extension attribute sync.
Enable single sign on
❗ Requires domain administrator account
Choose staging mode or install it
Staging mode: Synchronization won't synchronize any data to
Azure AD
o Post installation
Install AzureAD PowerShell module
💡 Then enable Azure AD recycle bin
Metaverse
Hybrid Planning
Sign On
pg. 20
SKILLCERTPRO
o Does your company have more than one user with elevated privilege to manage
your identity system?
o Does your company need to delegate access to users to manage specific resources?
o Does each delegated user need the same access?
Synchronization
Directory synchronization
o Do you have a disaster recovery plan for the synchronization server?
o Where will the synchronization server be located?
E.g. if it's behind a firewall, you'll need to open up some ports
o Do you have any other directory on-premises like LDAP or an HR database?
o Does your company use Microsoft Exchange?
Multi Forest synchronization
o Are the UPNs unique in your organization?
More than one forest → You can call people same thing as other people
→ You won't be able to do that in single Azure AD as they need unique
UPNs.
o Will the Azure AD Connect server be able to get to each forest?
o Do you have an account with the correct permissions for all forests you want to
synchronize with?
Password synchronization
o Do you have restrictions on storing passwords in the cloud?
o Will your employees be able to reset their own passwords?
o *What account lockout policy does your company require?
Applications
Applications
o Will users be accessing on-premises applications? In the cloud? Or both?
o Are there plans to develop new applications that will use cloud authentications?
If so, then make sure that authentication can use OAuth, certificates e.t.c.
o Will cloud users be accessing applications on-premises?
o Will on-premises users be accessing applications in the cloud?
Access Control
o Does your company need to limit access to resources according to some conditions?
o Does your company have any application that needs custom control access to some
resources?
pg. 21
SKILLCERTPRO
o Does your company need to integrate access control capabilities between on-
premises and cloud resources?
o Does each user need the same access level?
Domain Structure
Domain Name
o What name will your organization use for your domain in the cloud?
o Does your organization have a custom domain name?
o Is your domain public and easily verifiable via DNS?
Directory Structure
o How many AD forests do you have?
o How many Azure AD directories?
o Will you filter what user accounts are synchronized with the Azure AD?
o Do you have multiple Azure AD Connect servers planned?
o Do you have different directory that users authenticate against?
Federation
o Will you use the Azure Federation or on-premises AD FS?
An option is moving on-premises AD FS to Azure Federation.
o More federation services for identities are provided now through Azure
o Does your organization use smart cards for Multi Factor Authentication
pg. 22
SKILLCERTPRO
o Useful when e.g. some users passwords cannot be written back to the cloud but
another department can do it.
o ❗ Azure AD Connect sync servers must be configured for mutually exclusive
filtering.
o ❗ Users in one Azure AD will only be able to see users from their own Azure AD
instance.
o ❗ A DNS domain can only be registered in a single Azure AD directory.
o ❗ Some write-back features not supported with this topology
No group / device writeback
Multiple Forest to Single Azure AD
o Multiple Forest → One AD Connect → One Azure AD
o ❗ Users must have only one identity across all forests
o The user authenticates to the forest in which their identity is located.
o All forests are accessible by Azure AD Connect
o ❗ Users have only one mailbox
Multiple Forest to Multiple Azure AD
o Multiple Forest → Multiple AD Connects → Multiple Azure ADs
o Useful especially if you need isolation for different forests.
o For each instance of Azure AD, you'll need an installation of Azure AD Connect
o Users in one Azure AD will only be able to see users from their AAD instance.
Single Sign On
Password synchronization
o A copy of password and usernames is synchronized to the cloud.
Pass through authentication
pg. 23
SKILLCERTPRO
pg. 24
SKILLCERTPRO
Policy types
Built-in policies
pg. 25
SKILLCERTPRO
o E.g.: Require SQL Server 12.0, Allowed Storage Account SKU, Allowed Resource
Types, Allowed Locations, Allowed Virtual Machine SKUs, Apply tag and its
default value, Enforce tag and its value, Not allowed resource types
Custom Policies
o JSON format
E.g.
o {
o "policyRule": {
o "if": {
o "not": {
o "field": "location",
o "in": "[parameters('allowedLocations')]"
o }
o },
o "then": {
o "effect": "audit"
o },
o "parameters": {
o "allowedLocations": {
o "type": "Array",
o "metadata": {
o "description": "The list of allowed locations for resources",
o "displayName": "Allowed Locations",
o "strongType": "location"
o }
o }
o }
o }
}
Policy parameters
Passed to policy
Enable policy reuse
o Fewer policies are required.
String or array
pg. 26
SKILLCERTPRO
Policy Effects
Append: Resource policy additions, e.g. tags.
Audit: Logging only, generates a warning.
AuditIfNotExists: Enables audit if resource does not exists
Deny: Denies deployment
o 💡 Existing non-compliant resources are marked but not deleted.
DeployIfNotExists: If resource does not exists, deploy it.
Management Groups
Organizes multiple subscriptions.
Up to 6 hierarchical levels.
Allows to assign policy groups
o 💡 Subscriptions inherit settings
Facilitates RBAC
Subscriptions can be moved to other parts of hierarchy.
Policy exclusions
Called exclusion scopes
Policies can have exclusions in different scopes
Scopes can be e.g. resource groups in subscription, or VMs in resource groups.
3. Monitoring
pg. 27
SKILLCERTPRO
Monitoring
Azure Monitor
Centralized ways of getting insights from application to infrastructure
You can diagnose, trace and debug issues
Uses ML to detect anomalies and reveal hidden patterns
Track how customers interact with the application
Components
o • Alerts • Metrics • Action groups • Monitoring & reporting • Dashboard • Logs
Alerts
Notifies when important conditions are found in the monitoring data
Flow of alerts
o Alert Rule
Target Resource (Signal) → Criteria (Logic Test)
Action Group (Actions to do)
Monitor condition (Alert State)
Alert rules have single of each properties:
o Target resource
Scope & signals for alerting.
E.g. VM
o Signal
Emitted by target resource
pg. 28
SKILLCERTPRO
Log types
Diagnostic Logs
o Non-compute resources: Resource metrics
o Compute resources: Guest OS (e.g. syslog for Linux, event logs for Windows)
o Azure Monitoring Agents
Azure Diagnostics Extension (cloud only)
Windows Server and Linux
useful for basic resource-level monitoring
Deployed automatically to VM when you enable it.
Boot diagnostics (serial console)
Log Analytics Agent (hybrid solution)
pg. 29
SKILLCERTPRO
Metrics
pg. 30
SKILLCERTPRO
Action groups
pg. 31
SKILLCERTPRO
pg. 32
SKILLCERTPRO
Log Analytics
Old: OMS, new: Embedded in Azure Monitor as Logs.
It's a dataware house for telemetry
o It converts any schema to a table schema that allows you to query.
Uses KQL (pipe-based) language to query.
All monitoring roads lead t o Azure Log Analytics
o There's always an integration from an logging Azure component to Log Analytics.
You can download agents in Workspace → Connect
o Agents do not require VPN
o System Center Operations Manager
Can send data to Log Analytics from cloud/on-prem servers.
Azure Data Explorer
o Query language is used & viewed
Alert rule
o Based on each query that run on regular intervals, results are evaluated to trigger
an alert.
o Target
Specific Aure resource
o Criteria
Specific logic to trigger an action
Log Alerts
Describes where signal is custom query based on Log Analytics
o Action
Call to send a notification
o Set-up in Log Analytics → Alerts
Export
o • Excel • PowerBI
Application Insights data is used in a different partition in Log Analytics.
o E.g. requests, traces, usages
o Allows you to cross application queries
Function
o Queries can be saved as functions to be used within another query.
Requires log analytics workspace
pg. 33
SKILLCERTPRO
Storage
Storage services
Storage account is top-level account for following services:
o Blob Storage
o File Storage
o Table Storage
o Queue Storage
Blob Storage
pg. 34
SKILLCERTPRO
Blob Types
Block Blob
o Composed of 100 MB blocks
o Optimized for efficient upload
o Insert, replace, delete, blocks
o ❗ Up to 4.77TB max file size
o ❗ 50.000 max blobs
Append blob
o Can only append blocks
o Ideal for log and audit files
o ❗ 195GB max file size
Page Blob
o Optimized for frequent read/write operations
o Good for VM disks and databases
Foundation for IaaS disks
Stores VHD files.
Underlying storage for Azure SQL
o ❗ Standard (HDD) / Premium (SSD) storage
o ❗ 8 TB max file size
o ❗ Only offered in General Purpose account types
pg. 35
SKILLCERTPRO
Soft Delete
pg. 36
SKILLCERTPRO
Azure Search
pg. 37
SKILLCERTPRO
File Storage
Table Storage
Queue Storage
Message based
For building synchronous applications
URL format: e.g. http://storageaccount.blob.core.windows.net
Account Types
pg. 38
SKILLCERTPRO
General Purpose V1
General Purpose V2
Account Replication
Impacts SLA
Locally Redundant Storage (LRS)
o Three copies of data in single data center.
o Data is spread across multiple hardware racks.
Zone Redundant Storage (ZRS)
o Three copies of data in different availability zones in same region.
o ❗ Only available for GPv2 storage accounts
Geo-redundant Storage (GRS)
o Three copies of data in two different data centers in two different regions.
o ❗ You don't get to choose second region, they're paired regions decided by
Microsoft.
o ❗ Replication involves a delay.
pg. 39
SKILLCERTPRO
Pricing
Data storage cost (capacity)
Data operations
Outbound data transfer (bandwidth)
Geo-replication data transfer
pg. 40
SKILLCERTPRO
AzCopy
Importing data
pg. 41
SKILLCERTPRO
Exporting data
Management Plane
pg. 42
SKILLCERTPRO
Data Plane
Two types:
o Signature is signed with account key and ensures none of the parameters are
tempered.
o To invalidate, you'll need to regenerate storage account key used to sign SAS.
o 💡 Better way: Storage Access Policies
Defined on container level.
pg. 43
SKILLCERTPRO
Example url:
&sp=r Permissions
IP Address /
&sip=168.1.5.60-168.1.5.70
range (optional)
Protocol (optional
&spr=https
)
&sig=pk9oGEPqYyu0K4Gutfreq9n0CJqgnjYgkEwcIEL8I0%3D Signature
pg. 44
SKILLCERTPRO
Every storage account has encryption enabled by default and cannot be disabled.
Required for many compliances e.g. privacy.
pg. 45
SKILLCERTPRO
Configure network
pg. 46
SKILLCERTPRO
Monitoring
Storage Analytics
Type of diagnostic logs
o Enabled in Diagnostic settings
❗ Retention period up to 365 days.
Contains
o Details of read, write, and delete operations
o Reasons for failed requests
Issues can be found through monitoring or reported by users
Data includes: • Type of Operation • Success or Failure • Object Key • HTTP Status Code •
Start Time • Server and E2E Latency • Authentication Type • IP Address of Caller •
Browser Information • Type of Client • Client Operation ID • Server Operation ID
Write blobs to blocks immediately
o ❗ Can take an hour until available as flush is waited.
o Search +/- 15 minutes and based on log metadata
❗ 20 TB limit, independent of Storage Account total limit.
pg. 47
SKILLCERTPRO
You can download Microsoft Message Analyzer and analyze logs in a good UI instead
of text files.
Enabled as default
Integrates with Azure monitor
o ❗ Data is stored 30 days.
Setting up alerts
Sends
o Capacity metrics
For both storage accounts and individual storage services
Sent to Azure monitor every hour
Values are refreshed daily
o Transaction metrics
Successful, failed, errors
Ingress/Egress of data
Service availability
o Performance metrics: Server latency, E2E (end-to-end) latency
Metric dimensions: Response type, API calls, authentication type, geotype
Monitoring costs
Estimating costs
o Azure Pricing Calculator
o Azure Total Cost of Ownership (TCO) Calculator
Calculate the cost savings by migrating from on-premises to Azure
End of month bills
o Invoice, detailed usage CSV file
pg. 48
SKILLCERTPRO
Non-enterprise customers
o Azure Resource RateCard API
Pricelist across different regions/currencies
o Azure Resource Usage API
Enterprise customers
o Balance and Summary API
o Usage Details API
o Marketplace Store Charge API
o Price Sheet API
o Billing Periods API
Azure Files
99.9% SLA with availability, redundancy and disaster recovery.
Typical use cases:
o Lift and shift
pg. 49
SKILLCERTPRO
o Hybrid solutions
o Born-in-cloud applications that require shared storage are
o Storage for cross-platform solutions
o Any workload that currently uses a file server or NAS providing SMB access
REST compatible
SMB-compatible
o File protocol over port 445
o Can be mounted by Linux & windows & macOS compatible
o Versions
SMB 1: Limited block sizes, chatty protocol
SMB 2.1 (Supported by Azure)
No encryption
Better network performance than SMB 1.0
Group file shares, software shares
Supported >Windows 7, > Windows Server 2008
SMB 3 (Supported by Azure)
Active-active support: Clustering with nodes
Transparent failover
RDMA support, multi channel > Lower latency
Enables usage of SQL and Hyper-V
Encryption support
Supported > Windows 8, > Windows Server 2012
o Talks through port 445 and outbound connection
Create Azure File Share
o Multiple Azure File shares can be created under a storage account
o Each has a name and optional quota assigned
Quota limits the size up to 5120 GB
o In portal: Storage → Files → File Share
File access
o Access is via standard SMB client
o Dialect of SMB is negotiated between the client and Azure Files upon connection
o Encryption used if outside the Azure region or if required as part of the storage
account configuration
o SMB access utilizes the storage account name (as user name) and access key (as
password).
o REST access can utilize SAS tokens
pg. 50
SKILLCERTPRO
Replication options
DFS-R (before it was File Replication Service)
xcopy, robocopy
Considerations: locking of files, data consistency, amount of data replicated and
maintaining ACLs.
Enables replication from a single Azure Files share to one or more Windows based file
servers
o Windows service are in a synchronization group.
Utilizes an agent deployed on each Windows Server instance that's then registered with
the Storage Sync service then added to a sync group.
Cloud tiering
Default configuration: Server will consume maximum possible bandwidth for data
transfer via the storage sync service.
Supports network limits to be configured
For a VM based file server, QoS of the hypervisor can be used.
pg. 51
SKILLCERTPRO
Considerations
Avoid actions that'd cause data to be pulled down from the cloud
o E.g. anti-virus scans, backups on-premises
ACL (Access Control Lists) are replicated to the cloud but are not enforced when
accessed via Azure Files.
o 💡 Content should be restored to an IaaS VM file server to enable ACL
enforcement.
Data can be pre-seeded via Azure Databox with some caveats
o Enables pre-seeding instead of full copy over the network.
Be careful when combining other data replication technologies.
pg. 52
SKILLCERTPRO
4 TB maximum space
100 GB maximum file size
64 KB minimum file size to be tiered
Troubleshooting
Azure Backup
Backs up to Recovery Services Vault
Online storage entity in Azure used to hold data such as backup copies, recovery points
and backup policies.
Storage account is automatically created an configured
o Comes with LRS and GRS storage account
Configure in Vault → Backup Infrastructure → Backup Configuration
All backups are listed and globally controlled in Backup Jobs
o You can monitor status and get reports
o You can filter the jobs
Backup policy
o Settings
Policy type
Azure VM
Azure File Share
SQL Server in Azure VM
Backup frequency
Retention range: daily, weekly, monthly, yearly
You can set inbuilt RBAC roles to vault
o Backup Operator
Manage backups but cannot remove backup, create vault, give any roles.
o Others e.g. • Backup Reader • Monitoring Reader
pg. 53
SKILLCERTPRO
Backup Alerts
o Vault → Backup Alerts → Configure notifications → Enable e-mail notifications →
Choose severities (critical, warning, information) → Select notification (per alert or
hourly digest)
Enable MFA
o Properties → Security settings → Enable
o ❗ Cannot be disabled when enabled once.
You generate Security PIN for critical options and Azure Backup will prompt for the pin
(Properties → Security settings)
When creating a VM back-up you can enable back-ups and choose a vault and policy.
o ❗ VM must be in same location as recovery vault
To delete a vault, ensure all backups are stopped, delete backup agents/servers
Azure Backup Reports
o On portal: Vault → Backup Reports → Diagnostic Settings → Turn on diagnostics
o You can save reports in you can archive reports in storage accounts, stream to
event hubs, send to Log Analytics
o After you configure a storage account for reports by using a Recovery Services
vault, you can connect Azure Backup from Power BI and get a dashboard.
Benefits
Automatic storage management
Unlimited scaling
Application-consistent backup
o Each and every recovery point it has information for what it needs to go back to
recovery point
Data encryption both in-rest and and in-transit
Unlimited data transfer
Long-term retention without any time limit
Pricing
Pay as you go storage model
You pay per Protected Instance
o Protected instance is an application server/workload or computer that's been
configured to back up to Microsoft Azure
Components
pg. 54
SKILLCERTPRO
Features
o Policy-driven backup and retention
Scheduled and on-demand backups, multiple recovery points
You can hwoever use to backup directly with Backup Now
o Application-consistent backup
No impact on production environment and no shutdown of VMs
o Fabric level backup
Multiple backups, centralized management, detailed tracking
❗ New VM created by backup won't have backup policy associated with it.
Restoring and file-recovery manually
o Go to back-up blade for VM.
Two alternatives:
a. Back-up items → Select backup → Restore VM → Select snapshot
b. VM → Back-up
o Different alternatives:
a. Restore VM
Two alternatives:
a. Create new VM
b. Restore disks
b. File recovery
. Select recovery point
a. Download script and execute on VM
Mounts disks from the selected recovery point
💡 If files are larger than 100 GB, restore whole VM instead
b. Unmount disks after recovery
pg. 55
SKILLCERTPRO
Centralized installation
o Can be installed on a server in Azure or on-premises
Free
Similar functionality as Data Protection Manager (DPM)
Backup a variety of instances
o Workloads, VMWare and Hyper-V VMs, hosts, files, application workloads and
barebone backups
Flow
i. Create Backup in Site Recovery Service
Go to Vault → Backup
Get link for Azure Backup Server
ii. Install Azure Backup Server
Installs SQL server
iii. Configure Azure Backup Server
a. Select management
b. Protection Servers → Register a server
pg. 56
SKILLCERTPRO
Concepts
Storage resource provider (SRP)
o Disks (blob)
o Storage account
Compute resource provider (CRP)
o VMs
Networking resource provider (NRP)
o NICs, IP addresses, subnets load balancers..
Common VM Operations
Moving a VM
Helps for
o high availability
o reduce latency for serving from VMs closer to users
💡 You can move virtual machines with the managed disks & in Availability Zones across
subscriptions and VMs.
o ❗ Not supported:
Virtual Machine Scale Sets.
Virtual machines created from Marketplace resources with plans attached
❗ To move a virtual machine with a network interface card, you must move all dependent
resources.
pg. 57
SKILLCERTPRO
o E.g. • virtual network for the network interface card • all other network interface
cards for the virtual network • VPN gateways
Virtual networks (classic) can't be moved.
Can move across regions using
o Azure Resource Mover
o Using Azure Site Recovery by copying the data
Stopping a VM
Deallocation
o ❗ If you shut down a VM inside VM, Azure still keeps the resources
💡 Deallocate instead
Auto shutdown
o VM blade in Portal
Removing a VM*
Azure VM Extensions
Extends VM capabilities
Requires Azure VM Agent (different for Windows or Linux)
o Marketplace images already have it
o For lift & shift, install agent first before uploading to cloud
VM Access
o Backdoor to reset VM password reset
o Allows to modify RDP/SSH configurations
VM Backup
o Allows to back-up VMs and configurations to recovery vault
Custom Script
o Allows Desired State Configuration (DSC)
You can script in Linux (bash), Windows (PowerShell)
Puppet, chef etc
Microsoft Monitoring Agent
o Onboards VM in Log Analytics
pg. 58
SKILLCERTPRO
Sizing
Allows vertical scaling, e.g. CPU, RAM and other resources
Types
B, Dsv3, Dv3,
Balanced CPU-to-memory ratio. Ideal for testing and
General DSv2, Dv2,
development, small to medium databases, and low
purpose DS, D, Av2,
medium traffic web servers.
A0-7
Storage High disk throughput and IO. Ideal for Big Data, SQL
Ls
optimized and NoSQL databases.
NV, NC,
GPU NCv2, NCv3, Specialized virtual machines targeted for heavy
ND graphic rendering and viedo editing, as well as model
pg. 59
SKILLCERTPRO
High
Our fastest and most powerful CPU virtual machines
performance H, A8-11
with high-throughput network interfaces (RDMA).
compute
Disk Types
OS Disk
o ❗ Generation 1. VHD only
If you use Generation 2 Hyper-V you need to convert from .vhdx to .vhd.
o Registered as SATA drive
o ❗ Maximum capacity of 1 TB
Data Disk
o Dependent # on VM instance size
o Registered as SCSI disk
o ❗ Max capacity 4 TB
Temprorary Disk
o D: or /dev/sdb1
o Bound to the hardware host
o Do not store permanent data!
Storage
Standard Disks
o Backed by cost-effective HDDs
o High availability: several replication options
o Stored in Azure storage account
o Standard SSD available for managed disks (dev/test/entry elvel production
applications)
o Standard storage provides maximum IOPS values for each VHD
o On portal
pg. 60
SKILLCERTPRO
Unmanaged Disks
o Original method to store VM VHDS
Legacy
o VHDS are stored as page blobs in an Azure storage account
o ❗ Maximum 256 TB of storage per VM
o ❗ You need to manage storage account availability
o ❗ 20,000 IOPS limit across all VM disks in a standard storage account
o In storage account they're in Blob Containers → VHDS container.
They're leased
They a re locked
You need to stop & deallocate VMs to delete them
You can break lease in Storage Explorer by right clicking
Managed Disks
o 💡 Always use
o Azure manages the disks, you don't have to worry about storage account-level
IOPS restrictions.
o Pre-pay for disk size (no need for SA)
pg. 61
SKILLCERTPRO
Costs
Use Azure Pricing Calculator
Optimizing costs
o 💡 Reserved Virtual Instances are the cheapest option.
You pay 1 to 3 year term for a particular VM instance size in aspecific
region.
o 💡 Reuse on-prem Microsoft licensens, up to 49% discount
VM Chooser (azurevmchooser.kvaes.be)
o Open source applications to get recommendations
a. Give total VCPUs, RAMs etc.
b. Select a recommended VM
c. VM optimizer: Choose usage patterns, region etc.
IP addressing
You always have a private IP and you can optionally have a public IP
Public IP addresses
o Best practice is to never have a public IP
Consider a load balancer to map the private IP.
o First 5 public IPs are free then it costs
o You have to NSG with an public IP
o Public IPv4 addresses can be associated with:
VM vNICs, public load balancers, VPN gateways, and application gateways
o Public IP Address SKUs
Basic SKU
Open by default
Static or dynamic allocation
Standard SKU
Secure by default (NSG)
Static allocation only
HA: Availability zone aware, can span to different availability zones
DNS Naming
pg. 62
SKILLCERTPRO
Monitoring
Boot Diagnostics
Guest OS diagnostics
pg. 63
SKILLCERTPRO
High Availability
High Availability = Redundancy
Layers of availability
i. Hardware-level availability
Handled by Azure
ii. Server-level availability
Availability Sets
Ensures 99.95% SLA for VMs in availability set
Provides server level fault tolerance within a single data center
within a single region.
Availability sets are containers/racks that's called Fault Domains.
2 VMs in same Availability Sets = Azure places those in different
availability sets.
Update domains are different domains in different availability sets
(fault Domains) and your VMs are set in different update domains
as well.
Protects availability against VM shutdowns because of
update failures / hardware shutdowns.
❗ Must assign availability set at VM deployment
❗ Scaling (resizing) requires stopping all VMs in the availability set.
For single VM not in availability set you have 99.9% availability if
you use premium storage.
iii. Datacenter-level
Availability Zones
Allows you to place redundant VMs in different regions.
Provides data center level tolerance.
Load balancers are availability zone aware on standard SKU
❗ You have to use managed disks
iv. Region-level
You need recovery service vault (storage for back-ups/replications)
VM backup
Ad-hoc or scheduled
Includes all disks and configurations
Azure Site Recovery
Failover recovery
15 minute RPO (recovery point objective)
Azure-to-Azure (A2A) ASR Architecture
Directly available in VM blade
pg. 64
SKILLCERTPRO
Least preferable
As if VM is replicate
while it was powered
off, no guarantees
App-consistent
Preferable point to
recover
Data and OS back
pg. 65
SKILLCERTPRO
Azure Advisor
Gives recommendation regarding high availability
E.g.:
o Add more virtual machines for improved fault tolerance (medium impact)
o Enable VM backup to protect your data from corruption and accidental
deletion (medium impact)
o Create an Azure service health alert (low impact)
VM Events
Planned maintenance events
Unexpected downtime events
Notification
o In Azure support webpage, status webpage, twitter account
o Administrators get e-mail notifications
Deployment
Deployment tools
o • Azure portal • Azure Cloud Shell • Azure PowerShell • Azure CLI • Azure SDKs •
ARM templates
You can create from
o User images
Uses unmanaged disks
o Marketplace images
Create VM Image
Generalizing VM
pg. 66
SKILLCERTPRO
VM Connection
You have different levels of security NSG, host firewall, options to have public IP or not
pg. 67
SKILLCERTPRO
Just-in-time VM Access
Allowed by Azure Defender (formerly known as Azure Security Center Standard tier)
Locks down all administrator ports as default, when admin requests admin session then
session is bounded by time limit and IP address restriction while granting access.
No need to have management port open all the time
💡 Recommended to enable
pg. 68
SKILLCERTPRO
pg. 69
SKILLCERTPRO
pg. 70
SKILLCERTPRO
Connecting to VMs
In portal: Choose VM → Settings → Instances you can see all the instances
pg. 71
SKILLCERTPRO
To connect to individual instances you need load balancer and NAT (network address
translation)
o You can't RDP/SSH into individual instances directly
o You can connect to load balancer IPs
In portal: Load Balancer → Inbound NAT rules
o NAT maps different VMs on different ports.
Configuring Autoscale
Manual: Through Portal/SDK/CLI/PowerShell
Autoscale
Scheduled: If you know when the load will be high you can plan for that and scale with
time triggers
Metrics: Use various metrics from various sources to determine when to scale in/out
Manage in VMSS → Scaling →
o Enable auto-scaling
o Select scale-mode
o Scale based on metric
Add rule
E.g. increase instance count by 1 when CPU percentage above 70%
💡 You should also create scale mode that bring down the scale count
Properties
Duration: Good to not be confused when scaling out/in, so set a
duration to e.g. 10 minutes
Cooldown: Waits after scale operation before new scale operation
o Scale to specific instance count
Time-based scaling
Set start and end date
Security
pg. 72
SKILLCERTPRO
o A: Authentication (identity)
o A: Authorization (abilities)
o A: Accounting (auditing)
Higher to lower granularity
o Management groups → Subscription → Resource group → Resource
Roles
o Reader: Observers
o Resource-specific or custom role, contributor: Users managing resources
o Owner: Admins
Custom roles are defined in JSON
RBAC focuses on user actions at different scopes.
o By contrast, Azure Policy focuses on resource properties during deployment
Policies e.g. Allowed virtual machine SKUs , Enforce automatic OS
upgrade with app health checks on VMSS
You can manage in Access Control (IAM) blade.
Storage Security
pg. 73
SKILLCERTPRO
Network-level security
Stateful firewalls
Augmented security rules: Have inbound/outbound rules
Can be bound to public addresses, load balancers, subnets and VMs.
Traffic streams are identified with 5-tuple hash: Source, destination, port, protocol, IP
addresses.
Source can be service tags
o In-built e.g. Internet
Or custom (Application Security Group identifiers)
o Simplifies NSGs
o Logically groups VMs e.g. by role
Association is done through NICs
o E.g. AppServers, DatabaseServers
o Flow:
a. Define ASGs
b. Include ASGs in NSGs
Host Firewalls
Jumpbox Architecture
pg. 74
SKILLCERTPRO
Azure Defender
Just-in-time VM Access
Threat protection for Azure VMs and non-Azure servers
Threat protection for PaaS services
Regulatory compliance dashboard and reports
Allowed by Azure Defender for servers (formerly known as Azure Security Center
Standard tier)
Normally to access a VM, you need 3389 for RDP protocol, or 22 to SSH for linux, you
open those ports 7/24.
o Not so secure as they're publicly accessible if IP is public.
JIT locks down inbound administrative port access
Time-restricted access to specific IP address(es)
Backups
VM Disk Snapshots
.VHD files (data + os disks in page blobs) are stored aas page blobs.
Full and incremental point-in-time snapshots
Faster than performing full back-ups
o 💡 The difference is that snapshots are deltas
Supported in
pg. 75
SKILLCERTPRO
Managed disks
Unmanaged disks
o Use AzCopy command line tool to archive to another storage account
❗ Snapshots cannot outlive their sources blob
If you delete VMs, snapshots become irrelevant
o 💡 Consider archiving them
You can create new VM from a snapshot.
In Portal -> VM -> Disks -> Select Disk -> Create Snapshot
In Snaphots -> Find snapshot ->
o Export:
o You export with creating SAS URL (time limited)
o You get direct URL
Azure VM Backup
Azure Backup
pg. 76
SKILLCERTPRO
Consistency levels
Application-consistent
o 💡 Preferred backup type
o Data is consistent with time of backup (VSS)
File-system consistent
o Ensures the VM boots and there is neither corruption nor data loss
o You may need to take further action to bring data current
Crash-consistent
o Least preferred backup type
o Used when you back up a powered down VM
Manage
Restore options
Create a new VM
o Basic VM up and running from a restore point
Restore disk
o Restores a VM disk which can then be used to create a new VM.
o Azure Backup provides a template to help you customize and create a VM.
o Useful if you want to customize the VM, add configuration settings that weren't
there at the time of backup, or add settings that must be configured using the
template or PowerShell.
Replace existing
o You can restore a disk, and use it to replace a disk on the existing VM.
o Supported for unencrypted managed VMs
o ❗ Not supported for unmanaged disks, generalized VMs, or for VMs created using
custom images.
Recovery Options
Entire VM
pg. 77
SKILLCERTPRO
pg. 78
SKILLCERTPRO
pg. 79
SKILLCERTPRO
Role of VNet
You can link app services, storage accounts, VMs
Provides traffic isolation and segmentation
Runs on Azure backbone network
Configure communication with Internet
o 💡 Ensure only VMs that need public IP addresses get one.
You need to link VNets together to allow communication
Control traffic flows into the VNET, within the VNET, and between VNets.
Have IPv4 address space
o Uses CIDR block of private RFC 1918 addresses that are not public/internet
routable themselves
VNets are divided into subnets
o E.g. in multi-tiered application, web-tier, business-tier, data-tier
pg. 80
SKILLCERTPRO
Deploying a VNet
You can use ARM templates e.g. from Github.
o Visual Studio is recommended for editing templates
During deployment:
o Name: Must be unique
o Subnet: Default gives you one subnet, for more you can use ARM template or
PowerShell/CLI
o DDoS protection
Microsoft publishes their datacenter public IP address
Bad actors run port-scanners on those IP addresses all the time
o Service endpoints
Allows you to integrate Azure PaaS services
After deployment:
o Address space
You cannot edit
You need to create new and delete old one.
o Subnets
pg. 81
SKILLCERTPRO
You can always add new subnets & deploy gateway subnet that'll be used
by an Azure gateway.
o DNS server
Default is azure provided
You can use custom by additional DNS servers
Affect all VMs
Still uses Azure DNS when necessary
Used when e.g. site-to-site or point-to-site connections, it'll affect
all VMs.
o Diagram
You can enable network watcher here.
You then load in subscription or RG and enable.
It shows topology
pg. 82
SKILLCERTPRO
Network Interfaces
Assigned to a single subnet.
Have a public or private IP that's dynamic or static.
IP forwarding
o E.g. if you have network appliance and you want to give it ability to forwar traffic
that's not destined for itself
Connecting VNets
You don't need to have a Layer 3 router to route traffic from subnet to subnet
Azure system routes take care of the routing for you automatically
Options
VPN Gateway
pg. 83
SKILLCERTPRO
Inside Azure
VNet-to-VNet VPN
VNet peering
pg. 84
SKILLCERTPRO
o If you peer spoke1 <=> spoke2 and spoke2 <=> spoke3 then spoke1 cannot
communicate with spoke3 automatically.
o Common solution is transiting VNet with Hub and Spoke topology.
Topology is a segmentation
When to segment with VNets and when with subnets?
Depends on bureaucratic reasons
E.g. different VNets when
Different cost centers/groups need management
autonomy
You want to completely isolate different workloads
Name resolution needs configurations
You can't do with Azure provided DNS as all your hosts have
then internal.cloudapp.net
In peering azure provided DNS won't work
Troubleshooting tips
o Azure blocks ICMP between Vnets and the Internet
ICMP is used for ping
Microsoft blocks it because of DDoS attacks.
o Simplify NSGs as much as possible to reduce troubleshooting friction
o Azure portal Diagnose and solve problems/Resource health blade is useful
o Network Watcher and Network Permormance Monitor make troubleshooting
much easier
Network Watcher
Shows where's the traffic is captured/denied
Suite of tools
Topology: e.g. VNETs, subnets, VMs, NICs
Variable Packet Capture: Captures TCP packages at NIC
level as wireshark files.
IP Flow Verify: Troubleshoots NSG
Next hop: Troubleshoots route tables
Connection troubleshoot: Why it does not connect?
Diagnostics Logging
Security Group View
NSG Flow Logging
VPN Gateway Troubleshooting
Network Subscription Limits
Role Based Access Control
In Portal you can search for Network Watcher and enable it on
VMs
pg. 85
SKILLCERTPRO
Hybrid Connections
Site-to-site VPN
pg. 86
SKILLCERTPRO
Point-to-site VPN
Allows access to Azure resources through VPN tunnel from a client agent.
More portable way
Flow
i. On Azure deploy VPN gateway
ii. In Point-to-site configuration blade download VPN client
iii. Deploy agent (a VPN Client) from VPN gateway
iv. Install on individual endpoints (e.g. laptops)
Allows connection outside network perimeter
Express route
pg. 87
SKILLCERTPRO
Azure DNS
Allows VNETs to resolve each others host names.
pg. 88
SKILLCERTPRO
Hybrid Cloud
❗Azure provided DNS won't work with peering.
A potential solution:
o On-prem: Configure own DNS server and configure forward queries to Azure.
o In Azure
Connect VNets (peer or VPN)
Deploy own DNS servers in VNets and configure forwarding there
o ❗ Too much overhead
💡 Use Azure DNS Private Zones instead
o Configure Azure DNS servers specifically for private zones.
o One network: Registration network
Hosts will have their names auto-registered in private zones.
o Other networks: Resolution networks
pg. 89
SKILLCERTPRO
pg. 90
SKILLCERTPRO
pg. 91
SKILLCERTPRO
Application Gateway
OSI Layer 7 application
Application Delivery Controller (ADC) as a service
SSL offload
Has Web Application Firewall (WAF)
Traffic Manager
DNS-level
Geographical load balancing
Offers different routing methods
pg. 92