azure-runbook

Azure Automation: Runbook, RunAs Account: How to allow access to AAD (e.g. for Get-AzADUser)?

不想你离开。 提交于 2021-02-20 05:14:59
问题 Good afternoon I have selected stackoverflow for this question because probably mainly programmers are confronted with this question: This is the issue: If we call Get-AzADUser to get all AAD Users in the Azure Automation Runbook, then we get: Error 'Insufficient privileges' We do it like this: We have an Automation Account with an "Azure Run As Account" In the PowerShell Runbook we call: # Connect to AAD $Conn = Get-AutomationConnection -Name AzureRunAsConnection $account = Connect-AzAccount

Azure Automation: Runbook, RunAs Account: How to allow access to AAD (e.g. for Get-AzADUser)?

一个人想着一个人 提交于 2021-02-20 05:12:33
问题 Good afternoon I have selected stackoverflow for this question because probably mainly programmers are confronted with this question: This is the issue: If we call Get-AzADUser to get all AAD Users in the Azure Automation Runbook, then we get: Error 'Insufficient privileges' We do it like this: We have an Automation Account with an "Azure Run As Account" In the PowerShell Runbook we call: # Connect to AAD $Conn = Get-AutomationConnection -Name AzureRunAsConnection $account = Connect-AzAccount

Azure Automation: Runbook, RunAs Account: How to allow access to AAD (e.g. for Get-AzADUser)?

允我心安 提交于 2021-02-20 05:11:18
问题 Good afternoon I have selected stackoverflow for this question because probably mainly programmers are confronted with this question: This is the issue: If we call Get-AzADUser to get all AAD Users in the Azure Automation Runbook, then we get: Error 'Insufficient privileges' We do it like this: We have an Automation Account with an "Azure Run As Account" In the PowerShell Runbook we call: # Connect to AAD $Conn = Get-AutomationConnection -Name AzureRunAsConnection $account = Connect-AzAccount

Azure Automation: Runbook, RunAs Account: How to allow access to AAD (e.g. for Get-AzADUser)?

岁酱吖の 提交于 2021-02-20 05:09:35
问题 Good afternoon I have selected stackoverflow for this question because probably mainly programmers are confronted with this question: This is the issue: If we call Get-AzADUser to get all AAD Users in the Azure Automation Runbook, then we get: Error 'Insufficient privileges' We do it like this: We have an Automation Account with an "Azure Run As Account" In the PowerShell Runbook we call: # Connect to AAD $Conn = Get-AutomationConnection -Name AzureRunAsConnection $account = Connect-AzAccount

How can I copy the contents of a .csv file placed in a azure file storage, to a powershell variable?

房东的猫 提交于 2021-02-04 21:31:06
问题 I am creating a runbook for automating a monotonous DB task. My master.csv file gets updated every hour with the details of all the resources in our Infrastructure and is placed in an Azure file storage system. I am trying to take the name of a resource(DB) as an input from a user and verify if it exists on my Azure infrastructure by checking against a master inventory file. My main concern is if I will be able to get the contents of this CSV(<100KB) in a variable so that I use it for

How can I copy the contents of a .csv file placed in a azure file storage, to a powershell variable?

﹥>﹥吖頭↗ 提交于 2021-02-04 21:30:31
问题 I am creating a runbook for automating a monotonous DB task. My master.csv file gets updated every hour with the details of all the resources in our Infrastructure and is placed in an Azure file storage system. I am trying to take the name of a resource(DB) as an input from a user and verify if it exists on my Azure infrastructure by checking against a master inventory file. My main concern is if I will be able to get the contents of this CSV(<100KB) in a variable so that I use it for

Onboard Azure VMs to Update Management using runbook

折月煮酒 提交于 2021-01-29 10:34:21
问题 I've created a runbook to onboard Azure VMs to Update Management. The idea was taken from the MS provided runbook (https://github.com/azureautomation/runbooks/blob/master/Utility/ARM/Enable-AutomationSolution.ps1). The MS runbook uses old AzureRM modules, doesn't meet my needs and didn't work straight out of the box anyway. My runbook in essence does the same thing, looks for VMs with a tag, installs the Microsoft Monitoring Agent and configures it to report to the workspace. It then updates

Start-AzVM : Cannot bind parameter 'DefaultProfile' when running an Azure runbook

故事扮演 提交于 2021-01-07 03:52:41
问题 I am working on this official tutorial from MS Azure team to run a PowerShell Workflow runbook to start a VM . But when I start the following runbook (from step 6 of the tutorial), I get the error shown below. Question : What I may be missing, and how can we resolve the issue? Remark : Start-AzVM is from Az.Compute module that I have already imported. runbook code : workflow MyFirstRunbook-Workflow { # Ensures that you do not inherit an AzContext in your runbook Disable-AzContextAutosave

Cannot find the 'Start-AzVM' command when used in a runbook

陌路散爱 提交于 2021-01-05 08:53:20
问题 I am working on this official tutorial from MS Azure team to run a PowerShell Workflow runbook to start a VM . But when I start the following runbook (from step 6 of the tutorial), I get the error shown below. Question : What I may be missing, and how can we resolve the issue? rinbook code : workflow MyFirstRunbook-Workflow { # Ensures that you do not inherit an AzContext in your runbook Disable-AzContextAutosave –Scope Process $Conn = Get-AutomationConnection -Name AzureRunAsConnection

Powershell copy-item not working with azure automation

给你一囗甜甜゛ 提交于 2020-06-17 09:43:30
问题 Trying to execute ps script on azure vm's using azure automation using the approach defined at https://stackoverflow.com/a/62258063/1014275. Script below does copy files between azure vm's. Both Vm's are in same subnet and if we run the copy-item command from VM powershell it copies the files to target VM folder. The same script executes successfully with azure automation runbooks, but without copying files. Script used: Copy-Item -Path C:\folder\sample.txt -Destination \\\VmHostname\C$