I'm working on a tabular model deployed on Azure Analysis Service.
We use Microsoft SSIS to load the DW and process the tabular model.
We now want to increase the QPU via SSIS or with a PowerShell script.
I found a script on SSIS http://microsoft-bitools.bl...
running a Powershell script via Runbook directly on Azure.
1- What's the difference between a Powershell script and a Powershell runbook script?
2- Do you know how I can do this task?
Thank you for your help.
For Q1, from the functional point of view, there is no difference between scaling up an Azure Analysis service using local Powershell script or using Azure automation Powershell runbook. Both of them will need to import Azure PowerShell modules and call functions.
For local Powershell script, you should install modules you need with command: Install-Module, and for Azure automation Powershell runbook, if you need some module, you can manage your modules on the Azure portal
For Q2, if you want to change your Analysis service pricing tier(SKU) to get more QPU, you can just use the PowerShell command below:
Set-AzAnalysisServicesServer -sku <sku name, such as B1,B2> -Name <your service name> -ResourceGroupName <the resource group name>
This is the reference of this command.
If you are not sure about how to use Azure PowerShell command, please see this official guide.
Related
I have an Azure Release Pipeline with an Azure Powershell Task inline script that fails. I am running a self hosted build agent. The Powershell command works fine when I execute it locally from Windows Powershell. The task is attempting to start a DataFactory SSIS Integration Runtime:
Start-AzDataFactoryV2IntegrationRuntime -ResourceGroupName "MyResourceGroup"
-DataFactoryName "my-data-factory"
-Name "myIntegrationRuntime1"
-Force
Firstly I get a warning:
WARNING: AzureRM.Profile already loaded. Az and AzureRM modules cannot
be imported in the same session or used in the same script or runbook.
If you are running PowerShell in an environment you control you can
use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from
your machine. If you are running in Azure Automation, take care that
none of your runbooks import both Az and AzureRM modules. More
information can be found here: https://aka.ms/azps-migration-guide.
And then the error:
The 'Start-AzDataFactoryV2IntegrationRuntime' command was found in the
module 'Az.DataFactory', but the module could not be loaded. For more
information, run 'Import-Module Az.DataFactory'.
When I look at the installed modules, I see both AzureRM and Az are installed, and although I run the command Import-Module Az.DataFactory I do not see it in the list of installed modules.
WARNING: AzureRM.Profile already loaded. Az and AzureRM modules cannot
be imported in the same session or used in the same script or runbook.
From last year, Az published as a new cross-platform PowerShell module that is completely independent of AzureRM. Since Az and AzureRM use the same dependencies with different versions, it's impossible to run Az and AzureRM side by side in the same PowerShell session. That's why you receive the first error message.
The first solution is remove all AzureRM modules if you don't have script that use AzureRM.
But, if you continue want to use AzureRM for part of scripts while also writing another scripts with Az. You can execute with Azure Powershell task V4.0.
Azure have a built-in PowerShell in it's portal and you can write your commands directly from Portal without installing PowerShell in your system.
how I can write (execute) my PowerShell commands inside the function Apps?
This blog post may be able to help.
https://blogs.msdn.microsoft.com/powershell/2017/02/24/using-powershell-modules-in-azure-functions/
I was trying to create a RunBook in Azure Automation and I chose to use a Powershell script (Cmdlet). But the creation failed with an error because azure couldn't directly convert it and a manual edit is required to make it a "workflow". I am not a pro on PS and I understand you need to know how a workflow works. But my immediate goal is to get the Runbook working and hence trying to figure out an easy way to convert a PS script to a PS workflow for the purpose of runbook... Appreciate any help
Please see this blog post for info on PowerShell script to PowerShell Workflow conversion: http://azure.microsoft.com/blog/2014/11/25/introducing-the-azure-automation-script-converter/
However, regardless of conversion, you can't interact with local files on your computer from Azure Automation, so this script won't work. See https://social.msdn.microsoft.com/Forums/en-US/03a7aace-4e3e-4dab-9a8f-4ed1002fde4e/how-to-upload-files-from-users-machine-to-blob-storage-using-azure-automation?forum=azureautomation for more details.
I am using PowerShell to automate the creation of a virtual machine in Azure, then using Remote PowerShell to run commands on that machine. I can run any PowerShell command that ships with Windows perfectly well, but when I try to run something like:
Set-AzureSubscription or Get-AzureStorageBlobContent
I get the following message:
The term 'Set-AzureSubscription' is not recognized as the name of a cmdlet, function, script file, or operable program.
Of course, because the Azure module is not preloaded on the VM in Azure. Is it possible to copy the Azure Module up to the VM using PowerShell? Or any other way to go about this assuming everything must be automated with PowerShell (so I can't log into the VM to run the Azure PowerShell installer or copy and paste over a remote desktop session)?
Did use the Azure Powershell? If not you can install it here:
http://azure.microsoft.com/en-gb/documentation/articles/install-configure-powershell/
This is because you don't have Azure module installed
Try this to check:
Get-AzureModule Azure
You shoud get the module here:
http://azure.microsoft.com/en-us/downloads/#cmd-line-Tools
Is there any PowerShell Command to restart the WebRole or Worker Role . Please let me know
-Mahender
If you're looking at Windows Azure PowerShell Cmdlets, the Command you want to use is Reset-AzureRoleInstance (http://msdn.microsoft.com/en-us/library/jj152835.aspx). If you're looking for 3rd party Cmdlets, you can check out Cerebrata's Azure Management Cmdlets as well. The Cmdlet to use there is "Restart-Role" (http://www.cerebrata.com/Products/AzureManagementCmdlets/Details.aspx?t1=0&t2=3)
Hope this helps.