Azure Automation
10 TopicsAzure decommissioning - December 2023
Hi there I know that 2023 is over, but if you missed them, here are the decommissions announced by the Azure teams during the month of December: 1). 5G & Space Azure Object Anchors The service will be withdrawn on May 20, 2024. So for those like me, who don't know this service, it allows you to create 3D content objects through virtual points on physical objects. Azure Spatial Anchors Same punishment for the Azure Spatial Anchors service which will be withdrawn on November 20, 2024. Just like the previous one, I didn't know it, and it allows developers to generate mixed reality applications. -- 2). Containers Azure Container Apps On the Azure Container Apps side, the product team has decided to remove the plane 2023-04-01-preview control API from March 6, 2024. You simply need to switch to the latest stable version of the API i.e. 2023-05-01 Azure Kubernetes Service On the AKS side, the Pod Security Policy functionality which was in preview, will be removed as of August 1, 2024. Instead, Microsoft encourages you to use the Pod security admission controller functionality or the Azure policy service. -- 3). Management and Governance Azure Automation On August 31, 2024, change tracking and inventory with the Log Analytics agent will be removed. Instead you are encouraged to migrate to change tracking and inventory in Azure Monitoring Agent. The removal of the Update Management features, as well as the Log Analytics agent as of August 31, 2024. Azure Update Manager is the perfect replacement for Update Management, in fact I'm going to take a look at it because I might have some needed on one of my projects. Azure Monitor The removal of custom alerts from Container insights recommended alerts on May 31, 2024, instead of March 14, 2026. You are therefore encouraged to use the Prometheus rules instead. -- 4). Network VPN Gateway The withdrawal of the Standard and High Performance SKUs for the VPN gateway service on September 30, 2025. You will therefore need to consider using another SKU before this date to avoid any impact on your infrastructure. See you soon 😉633Views0likes0CommentsSend message to Teams from Azure Function or Azure Automation
I put together two videos that show how to send a message to Microsoft Teams whenever a specified resource is created in an Azure Subscription. One using Azure Functions, the other Azure Automation. Short blog post and link to the videos below. https://www.ciraltos.com/azure-automation-azure-functions-teams-and-event-grid/17KViews1like0CommentsAzure runbook restart during execution
Hello, I have a runbook to read all site collections from multi geolocation and get sca. There are more than 200000 site collection which needs to be processed. I am calling a child runbook from the partent runbook to get SCAs in batch of 500 site collections each. There should be around 450~500 child runbook jobs created during the excution of parent runbook. While I am executing the parent runbook, it is getting restarted from the begning during its execution. The total duration of execution of parent runbook in only 30 mins. Can anyone will help me in understaning why the parent runbook execution is getting resatrted from the begning in between? Does a fair share limit has to do with the restart of parent runbook? Regards, Ratnesh1.2KViews0likes1CommentClassic WVD autoscale modification
Hi, I have a WVD classic environment and I need to implement the autoscaling feature for it. I've checked MS documentation and found the Autoscale automation which implements Automation Accounts and Logic apps to run during peak hours, check the amount of sessions and spin more VMs if necessary. Then, during off hours, it shut downs VMs to a minimum. This is good...but not what I need. I need the automation to add more VMs when needed, but also to shut down VMs when not, during a 24x7 schedule. I don't want it to shutdown VMs only outside working hours. I tried to check how to add this functionality but I can't seem to find a way of doing it and I can't find the source code that does it to modify it. Has anyone have a similar problem?1.6KViews0likes4CommentsAzure Automation: issues connecting to security and compliance center in remote session
I'm at a loss here. I'm trying to use a Azure Automation PowerShell runbook to connect to the Security and Compliance Center. Specifically I am looking to use the Get-RetentionCompliancePolicy and Set-RetentionCompliancePolicy commands. I've tried a number of different modules to attempt to connect but none seem to work. I have code that works locally, but when put into a runbook and load the same module there, it won't connect properly. Instead it redirects and seems to loop on the connect and import step. When I finally got it to appear to connect and import once (not loop), it does not recognize the Get-RetentionCompliancePolicy command and I can't find it in a Get-Commands call. Any tips on how to get this to work? below is the code I'm using to connect and import. $cred = Get-AutomationPSCredential -Name "Admin" $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $cred -Authentication Basic -AllowRedirection Import-PSSession $Session -DisableNameChecking -AllowClobber | Out-Null Get-RetentionCompliancePolicy Get-PSSession | Remove-PSSessionSolved2.5KViews0likes1CommentAzure Automation DSC agent not working
Hi All, I was trying to setUp OMS agent using Azure DSC following this below link -: https://docs.microsoft.com/en-us/azure/automation/automation-dsc-getting-started#importing-a-configuration-into-azure-automation It takes a lot of time for the VM to register and then says Agent is a problem . Please help4.7KViews0likes1CommentAzure Automation VM Start and Stop in Python runbook
Hello , We are trying to do VM Start and Stop by using Python. And we did for single VM and we tested it in Azure Portal, It was successfully done both start and stop. Now we have to do for Multiple VMS, start and stop. Can anyone please help us to do for multiple VMS, start and stop in Python. Please find the attached script for the single VM. source from - https://docs.microsoft.com/en-us/azure/automation/automation-first-runbook-textual-python2 Python Script: import os import traceback import os import sys from azure.mgmt.compute import ComputeManagementClient import azure.mgmt.resource import automationassets def get_automation_runas_credential(runas_connection): from OpenSSL import crypto import binascii from msrestazure import azure_active_directory import adal # Get the Azure Automation RunAs service principal certificate cert = automationassets.get_automation_certificate("AzureRunAsCertificate") pks12_cert = crypto.load_pkcs12(cert) pem_pkey = crypto.dump_privatekey(crypto.FILETYPE_PEM,pks12_cert.get_privatekey()) # Get run as connection information for the Azure Automation service principal application_id = runas_connection["ApplicationId"] thumbprint = runas_connection["CertificateThumbprint"] tenant_id = runas_connection["TenantId"] # Authenticate with service principal certificate resource ="https://management.core.windows.net/" authority_url = ("https://login.microsoftonline.com/"+tenant_id) context = adal.AuthenticationContext(authority_url) return azure_active_directory.AdalAuthentication( lambda: context.acquire_token_with_client_certificate( resource, application_id, pem_pkey, thumbprint) ) # Authenticate to Azure using the Azure Automation RunAs service principal runas_connection = automationassets.get_automation_connection("AzureRunAsConnection") azure_credential = get_automation_runas_credential(runas_connection) # Initialize the compute management client with the RunAs credential and specify the subscription to work against. compute_client = ComputeManagementClient( azure_credential, str(runas_connection["SubscriptionId"]) ) # Resource Group resource_group_name = str(sys.argv[1]) vm_name = str(sys.argv[2]) # Start the VM print('\nStart VM') async_vm_start = compute_client.virtual_machines.start(resource_group_name, vm_name) async_vm_start.wait() In the below mentioned screen shot, if we enter the multiple parameter/VM name, it is taking only the first name (parameter/VM name) Please Suggest.11KViews0likes0CommentsGlobally-Distributed Applications with Microsoft Azure - Ebook
Dear all, I would like to share with you my new e-book Globally-Distributed Applications with Microsoft Azure. The book is backed by an open-source repository built with .NET Core and Angular, designed to easily scale across multiple azure regions. It explains how to use and combine Azure Services such as Redis Cache, Azure Cosmos DB, Azure Search, Storage Accounts, SQL Active Geo-Replication, Azure Traffic Manager, CDN and several others to handle high loads and allow easier scaling. You will also find a release plan and lots of very useful PowerShell scripts that automate release process with zero downtime.1.3KViews0likes0Comments