azure-automation

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

Accessing an azure vm through Powershell remote from Azure Automation

丶灬走出姿态 提交于 2021-02-10 16:00:46
问题 I am trying to access an azure vm via powershell remoting from azure automation. All our vms inside the subscription do not have public ips (only private ip). I have tried to access by New-Pssession (as below) , but no luck. Could you please let me know what are the other ways to achive this? $connectionName = "AzureRunAsConnection" $SPC = Get-AutomationConnection -Name $connectionName Write-Output $SPC Add-AzureRmAccount -ServicePrincipal -TenantId $SPC.TenantId -ApplicationId $SPC

How to import modules into Azure Automation Account using PowerShell?

爱⌒轻易说出口 提交于 2021-01-27 17:55:35
问题 I am trying to figure out how to install modules into an Azure automation Account from the PowerShell gallery, and I am struggling… New-AzAutomationModule should have been able to do this, but it constantly gives a status of “Failed” in the list of modules in Azure Automation. The command I used is this: $AzMods = Find-Module az.* ForEach ($AzMod in $AZMods) { New-AzAutomationModule -AutomationAccountName $AAccName -Name $AzMod.Name -ContentLinkUri "$($AZMod.RepositorySourceLocation)package/$

Invoke-ASCmd : Authentication failed: User ID and Password are required when user interface is not available

混江龙づ霸主 提交于 2021-01-25 04:02:50
问题 I am trying to refresh credentials of an (already)deployed Tabular Model via CICD using Azure DevOps. Making use of Invoke-ASCmd in PowerShell to refresh the credentials. The script works fine from local when I provide the Tenant ID, App ID and the Key. However it fails when I run it from Azure Devops with error - User ID and Password are required when user interface is not available. Here is the script: $azureTenantId= "TenantId" $azurePassword = ConvertTo-SecureString "Key" -AsPlainText

Invoke-ASCmd : Authentication failed: User ID and Password are required when user interface is not available

这一生的挚爱 提交于 2021-01-25 03:50:29
问题 I am trying to refresh credentials of an (already)deployed Tabular Model via CICD using Azure DevOps. Making use of Invoke-ASCmd in PowerShell to refresh the credentials. The script works fine from local when I provide the Tenant ID, App ID and the Key. However it fails when I run it from Azure Devops with error - User ID and Password are required when user interface is not available. Here is the script: $azureTenantId= "TenantId" $azurePassword = ConvertTo-SecureString "Key" -AsPlainText

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