azure-powershell

Cube refresh with Automation Account in Azure SSAS

坚强是说给别人听的谎言 提交于 2021-01-28 06:05:37
问题 I'm currently trying to create an automation runbook to process a cube in Azure. I've tried multiple PowerShell scripts like this one : $AzureCred = Get-AutomationPSCredential -Name "RefreshTest" Add-AzureRmAccount -Credential $AzureCred | Out-Null Invoke-ProcessASDatabase -databasename "MKTGCube" -server "AzureServerName" -RefreshType "Full" -Credential $AzureCred With that kind of error (despite the fact that I installed the SQLServer module). Invoke-ProcessASDatabase : The term 'Invoke

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

Azure Storage Account with Key Vault to manage its keys

混江龙づ霸主 提交于 2021-01-01 07:11:13
问题 I wanted my blob storage account keys to be managed by Key Vault. I am trying to auto regeneration process between 'key1' and 'key2' with a gap of 1 day. I have followed instructions on Microsoft website https://docs.microsoft.com/en-us/powershell/module/az.keyvault/add-azkeyvaultmanagedstorageaccount?view=azps-2.5.0 I have run the script below and there was no errors: $servicePrincipal = Get-AzADServicePrincipal -ServicePrincipalName cfa8b339-82a2-471a-a3c9-0fc0be7a4093 New-AzRoleAssignment

Azure Storage Account with Key Vault to manage its keys

泄露秘密 提交于 2021-01-01 07:07:03
问题 I wanted my blob storage account keys to be managed by Key Vault. I am trying to auto regeneration process between 'key1' and 'key2' with a gap of 1 day. I have followed instructions on Microsoft website https://docs.microsoft.com/en-us/powershell/module/az.keyvault/add-azkeyvaultmanagedstorageaccount?view=azps-2.5.0 I have run the script below and there was no errors: $servicePrincipal = Get-AzADServicePrincipal -ServicePrincipalName cfa8b339-82a2-471a-a3c9-0fc0be7a4093 New-AzRoleAssignment

Azure Storage Account with Key Vault to manage its keys

大兔子大兔子 提交于 2021-01-01 07:07:03
问题 I wanted my blob storage account keys to be managed by Key Vault. I am trying to auto regeneration process between 'key1' and 'key2' with a gap of 1 day. I have followed instructions on Microsoft website https://docs.microsoft.com/en-us/powershell/module/az.keyvault/add-azkeyvaultmanagedstorageaccount?view=azps-2.5.0 I have run the script below and there was no errors: $servicePrincipal = Get-AzADServicePrincipal -ServicePrincipalName cfa8b339-82a2-471a-a3c9-0fc0be7a4093 New-AzRoleAssignment

Update the Azure Release Variable value in PowerShell

那年仲夏 提交于 2020-12-15 03:33:53
问题 I have Release Variable $(ecomm) = Yes, in Azure Release Pipeline Through Powershell, i want to update the value of $(ecomm) = No Write-Host "Before update: "$(ecomm) Write-Host "##vso[task.setvariable variable=ecomm;]No" Write-Host "After update: "$(ecomm) But the value is not updating. Can you please help me on this. Thanks in advance. 回答1: Repcak is correct. When you use the logging command to set variables in Powershell, you can only change the value of the variable in Pipeline Run

Update the Azure Release Variable value in PowerShell

爷,独闯天下 提交于 2020-12-15 03:32:38
问题 I have Release Variable $(ecomm) = Yes, in Azure Release Pipeline Through Powershell, i want to update the value of $(ecomm) = No Write-Host "Before update: "$(ecomm) Write-Host "##vso[task.setvariable variable=ecomm;]No" Write-Host "After update: "$(ecomm) But the value is not updating. Can you please help me on this. Thanks in advance. 回答1: Repcak is correct. When you use the logging command to set variables in Powershell, you can only change the value of the variable in Pipeline Run

Update the Azure Release Variable value in PowerShell

本小妞迷上赌 提交于 2020-12-15 03:30:40
问题 I have Release Variable $(ecomm) = Yes, in Azure Release Pipeline Through Powershell, i want to update the value of $(ecomm) = No Write-Host "Before update: "$(ecomm) Write-Host "##vso[task.setvariable variable=ecomm;]No" Write-Host "After update: "$(ecomm) But the value is not updating. Can you please help me on this. Thanks in advance. 回答1: Repcak is correct. When you use the logging command to set variables in Powershell, you can only change the value of the variable in Pipeline Run

How can you use secret variables from a linked variable group in an Azure Powershell task in an Azure Release pipeline?

倾然丶 夕夏残阳落幕 提交于 2020-12-07 06:40:49
问题 I have an Azure Release pipeline that I've built using the GUI in Azure DevOps. There is a stage that has a linked variable group (Release scope) with a secret variable in the variable group. The stage has an agent job with an Azure Powershell task that runs a script file. That script file references the secret variable using the syntax $env:MYSECRETVARIABLE but the value is null. When I add an Azure Powershell task for debugging that runs Get-ChildItem -Path Env:\ , I can see that all the