Questions tagged [azure-automation]

Azure Automation handles the creation, deployment, monitoring, and maintenance of Azure resources and third-party applications. It uses uses Windows PowerShell scripts or Azure Runbooks to achieve this.

azure-automation
Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

scale up the azure vm config (environment )automatically while running jmeter load test in azure pipelines [closed]

In jmeter I am pointing script to our environment which in hosted on azure vm.. in vm we can scale up the config...we usually scale up vm config manually before running load test...whether we can ...
SWAPNIL KULKARNI's user avatar
0 votes
1 answer
51 views

Integrating Allure Reporting into Playwright Tests Azure Pipeline

I am practicing with Playwright automation and learning to integrate it with CI/CD pipelines in Azure. I have managed to create a Repo and Pipeline in Azure that runs my Playwright code, but I am a ...
Amar's user avatar
  • 45
0 votes
1 answer
69 views

I need to get the ResourceGroup and ResourceID of the Associated Azure VM of my DSC node

I have two nodes registered in resourcegroup1 when I run Get-AzAutomationDSCNode. Both nodes have the same name "Node1" but belong to different resource groups. Node1 - resourcegroup1 Node1 -...
Ayanda ezekiel's user avatar
0 votes
0 answers
18 views

Azure Function Automation Stops After Pull Request Is Merged

I'm new to Azure Functions. We have an automation that runs 22 hours a day with a 2 hour break in order to prevent the temp files from taking up all the storage space on the app host and preventing it ...
AsDareFew's user avatar
0 votes
1 answer
44 views

Add an entry to the Entra ID (Azure AD) audit log from a PowerShell script in Azure Automation

My company uses an MSP for the daily care and feeding of our M365 tenant. After more than a few "issues" with offboarding employees, I've written an offboarding script to run via Azure ...
Shawn's user avatar
  • 3
1 vote
2 answers
76 views

Azure Automation Custom Module not Exporting Commands

I am trying to use a custom PowerShell module in an Azure Automation account. I have prepared the module and tested it locally. It is loaded and the commands can be used. However, when I pack and ...
magichappenz's user avatar
0 votes
1 answer
40 views

Get-Service command giving me the error Cannot open Service Control Manager on computer 'xx'. This operation might require other privileges

I am trying to disable MicrosoftMonitoringAgent on VM. I am using Automation account system assigned managed identity which has virtual machine contributor role. I am executing the below command using ...
Narendra's user avatar
0 votes
1 answer
52 views

VS Code Azure Automation Runbook Python Packages not recognized

I am unable to view my python packages through visual studio code. Verified on Azure portal that all the necessary packages are uploaded. I use python 3.8.10 on my local machine as the interpreter as ...
Swann_'s user avatar
  • 23
0 votes
0 answers
36 views

Why am I getting "could not find file" errors when using Remove-Item in PowerShell? [duplicate]

I am running the following in my PowerShell script: Get-ChildItem -LiteralPath $source -Force -Recurse -Directory | ForEach-Object { Write-Output "Removing files in folder $($_.FullName)"...
Josh's user avatar
  • 3
0 votes
1 answer
49 views

Issue with wg-easy VPN service and setting up auto reboot using Powershell script on Automation Accounts

I am experiencing issues with the wg-easy VPN service, as the VPS containers seem to go down frequently. I have set up a cron job to reboot every 2 hours, but it doesn't seem to help much. I am also ...
organicnz's user avatar
0 votes
0 answers
54 views

Powershell runbooks on hybrid workers can access other jobs variables if too many jobs are running at the same time

We have some user onboarding/offboarding scripts that run on hybrid workers. Sometimes, when there are several jobs running at the same time on the same hybrid worker, a script will eventually be able ...
Guilherme Noronha's user avatar
0 votes
1 answer
30 views

Bad request at Azure Automation Tasks Preview

I've created a bunch of tasks to stop, deallocate and restart some VMs at Azure, and they work but all of them are reported as a failure because the execution block on the logic app workflow keeps ...
Lincoln Barbosa's user avatar
0 votes
1 answer
71 views

How to deploy a "Logic App Standard" with multiple workflows via arm template

I cannot figure out how to define workflows within the arm template that successfully deploys a Logic App Standard of resource type/kind: "type": "Microsoft.Web/sites", "kind&...
Tyler's user avatar
  • 1
0 votes
1 answer
97 views

$DebugPreference = "Continue" not working when running a powersehll runbook in azure automation account's test pane

Earlier when I used to use command $DebugPreference="Continue" within the powershell script, this used to print the output with all the debugging lines. Now I am not able to see debug ...
Srishti garg's user avatar
0 votes
1 answer
135 views

Azure powershell failing with error: One or more errors occurred while using Get-AzRecoveryServicesVault cmdlet

I am trying to execute a powershell script in azure automation account runbook test pane. In my powershell script, I am importing the modules, connecting automation account using managed identity and ...
Srishti garg's user avatar
0 votes
1 answer
96 views

Azure Automation Account Powershell runbook exception errors with Azure Snapshots

I am trying to write a script that automatically start or stop Azure VMs in a resource group by finding their tags with the authentication part done by a managed identity. Also, as a VM starts the ...
Wablood's user avatar
0 votes
1 answer
83 views

PowerShell code runs considerably slower in Automation Account hybrid worker than it does directly on the hybrid worker server

I have a web scraping and HTTP posting automation written in PowerShell that I developed partially locally and partially on my hybrid worker with the authoring toolkit. During development and testing ...
Drogen24's user avatar
0 votes
1 answer
83 views

Logic app, convert run query json results to usuable / readable output (html/excelish?)to use in Sentinel comments for enrichment

i have created a logic app to use in Sentinel for enrichment and automation. In this case its an automation app for identity based incidents, namely 'unfamiliar signins' The app is actually working ...
D3F3ND3R's user avatar
1 vote
1 answer
109 views

Azure: How to use custom module in State Configuration

I created a class based DSC Resource as a Powershell Module and successfully uploaded it to Azure Automation/Modules. It has a green icon and seems to be added successfully. Now I want to use this ...
Alex F's user avatar
  • 3,343
0 votes
1 answer
208 views

Powershell script with automation account and managed identity Unauthorized when sending e-mail

I have been struggling with this script in Azure Automation to send a report to an e-mail but won't work. I have granted the required permission to the servicePrincipal but I get all the time The ...
Mycha's user avatar
  • 133
0 votes
1 answer
92 views

How to Kill sessions running for last 5 minutes automatically in azure analysis services?

I have a requirement to kill the active sessions currently running on Azure Analysis Services which are consuming high QPU and are running for more than 5 minutes. I came across below article : which ...
Learn2Code's user avatar
0 votes
2 answers
75 views

Azure automation Jobs that completed with errors - JobStreams data not forwarded to Azure Monitor

Background: I have an Automation Account with one Runbook configured. The runbook initiates a job which is a one PowerShell line that is syntactically wrong on purpose (Write-Hos "Hello error&...
Yousef Imran's user avatar
  • 1,123
0 votes
1 answer
57 views

Trouble calling runbook when name is a variable

Facing some unexpected behavior in Azure Automation that I just can't figure out. I have a runbook called "Test2" with just 1 line in it, so I can see if it runs: Write-Output "this ...
Jon Lobsien's user avatar
1 vote
1 answer
76 views

Azure Automation Runbook - Returning incorrect resource group name. 'Resource group '{resource-group-name}' could not be found'

We use the following code in a runbook and it is returning an incorrect value for the Resource Group Name. $AzureVMs = Get-AzVM "SH-COMPANY-AD-0" $AzureVMs | ForEach-Object { $AzureVM = ...
jymmyboi's user avatar
0 votes
1 answer
195 views

Errors using Azure Managed Identity to connect to Azure Automation from VS Code

About 8 months ago I built several automation runbooks that successfully run using a System-Assigned Managed Identity. I used this code excerpt from this thread, Accessing Azure AD using a Managed ...
Shawn's user avatar
  • 3
0 votes
1 answer
433 views

Azure Update Manager - email notifications upon successful completion?

Does anyone have a good step-by-step for creating email alerts with Azure Update Manager? I've tried ot use the 'built in' alert, for example 'Pending Security and critical updates' or 'Patch ...
SwinstyReservoir's user avatar
1 vote
1 answer
176 views

Schedule a python file to run automatically every week

My python code involves picking up a file from Azure Blob storage, making changes to the file and then send it back to the Azure storage. I have a working code to do this task. Now I need to schedule ...
Blue_098's user avatar
0 votes
0 answers
89 views

I want a print out of App Registration with expiry days of secrets and certificates and the owners associated with App registrations

I want an email print out of all the app registrations associated with my Azure Entra ID. In the list I want a remaining of days left until secrets or certificates have expired. In addition I want in ...
Jude Clermont's user avatar
0 votes
1 answer
329 views

Get Azure Automation Runbook Credential in Python

I'm trying to get an Automation Account credential in my Python 3.8 runbook using a managed identity. The current code looks like this. from azure.identity import ManagedIdentityCredential from azure....
ChristofferL's user avatar
0 votes
1 answer
243 views

Unable to install Hybridworker extension seamlessly

I have a good code to create VM and also install the Hybrid worker and Hybrid Worker extension however it gives an error when trying to install the hybrid worker extension. $maxRetryCount = 3 $...
Ayanda ezekiel's user avatar
0 votes
0 answers
165 views

Set-PnPListPermission failing from Azure Automation Runbook on List (Document Library works fine)

I am encountering an error running Set-PnPListPermission from an Azure Automation runbook which is "The list is not DocumentLibrary, VersionPolicies is not supported." The error is accurate, ...
Neil's user avatar
  • 1
1 vote
0 answers
155 views

Error running openai python script on Azure Automation runbook

I'm just starting out with Azure Automation runbooks, because I would like to schedule some python scripts, which will use openAI GPT via the official openai Python package. I have this script working ...
Arvid0's user avatar
  • 11
0 votes
1 answer
382 views

Azure resources auto Tagging with Created By and Created Date using PowerShell

How to automatically add tags : CreatedBy and createdDate Here what i am trying to do The idea is to create a scheduled runbook. It will run every 10 minutes. Which will get all the untagged ...
Nish's user avatar
  • 81
0 votes
0 answers
36 views

IRunbookManager HybridWorkerGroup.HybridRunbookWorkers count = 0 while I do have a Hybrid Worker

Hopefully you can help me, because I'm out of ideas... I have a Blazor app where I use the Runbookmanager interface to make a connection to my Azure Automation environment. I want to show the ...
baswijdenesdotcom's user avatar
0 votes
1 answer
68 views

How to dynamically update parameter in Power BI to xlsx automation

I have a Power BI report that I'm trying to export to a XLSX file on Sharepoint each month. The data is being pulled from an Azure SQL database and the query is: ''' select * From [Reporting].[...
Michael Shepard's user avatar
0 votes
1 answer
85 views

How to create an Azure logic app with a standard plan using azure-sdk-python

I am trying to automate my logic app creation process using azure-sdk-for-python. Here's my python script. import schedule import time from azure.identity import DefaultAzureCredential from azure.mgmt....
Jasneet Singh's user avatar
0 votes
1 answer
83 views

Psql used with Azure runbook can't handle UTF-8 encoding

The setup is like this, we have an Azure runbook which is using a hybrid worker with psql to insert data in to a CosmosDB running PostgreSQL. The issue is that the data contains Swedish characters ...
Erik Andersson's user avatar
0 votes
1 answer
209 views

Azure powershell - application id and client secret login problem

I try to use my application ID and client secret token to login in PowerShell. But I got the error message in following content. What should I do to mke it have enough permission? My script: $password ...
北山硝子's user avatar
1 vote
1 answer
169 views

Azure PowerShell - Restart-AzWebApp : Object reference not set to an instance of an object

I try to use the following content to restart my webapp-service in Azure. And I deploy this script in Azure Automation Runbook. Connect-AzAccount -Identity Set-AzContext -Tenant "<secret-uuid&...
北山硝子's user avatar
0 votes
2 answers
80 views

Invoke-AzVMRunCommand does not return the expected value when running Get-NetFirewallProfile

I am trying to use the Invoke-AzVMRunCommand on a VM in my Azure subscription. My powershell looks like this Invoke-AzVMRunCommand -VMName $vm.Name -ResourceGroupName $vm.ResourceGroupName -CommandId '...
user182595's user avatar
0 votes
0 answers
150 views

Creating a Jira Automation Rule trigger for when a Pull request goes from draft to published and sending a slack message

I'm working on setting up an Automation rule in Jira. In this rule, my aim is to create a trigger that activates when a pull request transitions from the "Draft" state to "Published&...
user3312266's user avatar
0 votes
2 answers
198 views

How can I retrieve output from Azure PowerShell child Runbook (7.2) started by 'Start-AutomationRunbook' from within parent Runbook (also 7.2)?

Title says it all, I guess. I am trying to modularize my runbooks and all I want to do is start child RBs using the internal Automation module 'Start-AutomationRunbook' AND get back the result. This ...
Wrstkpp's user avatar
  • 101
0 votes
1 answer
178 views

Azure Automation PowerShell read CSV file from SharePoint

Add the moment I am able to read files from our SharePoint with Azure Automation. The problem for me is when I do the import I loss all the property values on the CSV. So the following file has the ...
Jeroen Budding's user avatar
0 votes
0 answers
112 views

How to call API from an Azure Powershell Runbook? Getting Error

I'm trying to call an API within an Azure Automation Account by using a Powershell Runbook and I'm getting A 405 error when I attempt a GET method and a 499 eroror when I attempt a POST. $uri = "...
Michael Shepard's user avatar
0 votes
2 answers
157 views

Azure Automation Account PowerShell Runbook Restarting Itself

I have an Automation Account in Azure, with a few PowerShell Runbooks. The runbooks run on a Windows Hybrid Worker VM also in Azure. All my runbooks except for one run without issue. The problem ...
Leshawn Rice's user avatar
0 votes
1 answer
617 views

Azure Automation Runbook: Connect-AzAccount Error using Managed Identity

Looks like 'Run-as' accounts are retired, so I am trying to use Managed Identity to establish connection to my Azure resources in a Runbook (part of Azure Automation account). I am following the ...
thedataguy's user avatar
0 votes
0 answers
84 views

Is a time-based trigger possible with Azure Sentinel / Logic Apps

I am hoping to use built in automation rules / playbook in Azure Sentinel specifically "Isolate MDE Machine - Alert Triggered". I need a condition similar to "If incident is created ...
Jay Sterling's user avatar
0 votes
1 answer
188 views

Getting list of billing accounts in Azure using C# and new Azure.ResourceManager.Billing Namespace

I am trying to use the new Azure Resource SDK in C# and I am just not coming right. The old deprecated namespace Microsoft.Azure.Management.Billing namespace was simple to achieve this ie: var ...
BrettL's user avatar
  • 3
0 votes
2 answers
135 views

Azure Sentinel: Be notified when a playbook run fails or playbook action is disconnected

Within Azure Sentinel, I have several automation rules set up that respond with various playbooks/logic apps. I want to be notified or know how to search the logs to find all the failed runs failed ...
HarriS's user avatar
  • 726
-1 votes
1 answer
163 views

Unable to list applications from Azure Active Directory using Powershell in Azure Automation Account

I have created an Automation Account runbook with Powershell 5.1 . I have a service principal with the following permissions linked to it using a connection called "local" My code is as ...
lviswanath's user avatar

1
2 3 4 5
20