View RemoveServicePrincipalFromPowerBIWorkspaces.ps1
# ================================================================================================================================================= | |
## This script will remove the given Service Principal from Power BI workspaces | |
## It will first ask for the (correct) ObjectId of the Service Principal | |
## Then it will ask for the credentials of a Power BI Service Administrator | |
# ================================================================================================================================================= | |
## Parameters | |
# Remove the Service Principal from workspaces that are in Premium capacity? | |
$RemoveFromPremiumCapacityWorkspaces = $true |
View AddServicePrincipalToPowerBIWorkspaces.ps1
# ================================================================================================================================================= | |
## This script will add the given Service Principal to Power BI workspaces | |
## It will first ask for the (correct) ObjectId of the Service Principal | |
## Then it will ask for the credentials of a Power BI Service Administrator | |
## Note: this script only works with v2 workspaces (you can't add a Service Principal to a v1 workspace) | |
# ================================================================================================================================================= | |
## Parameters |
View pl_PBI_dataset_refresh.json
{ | |
"name": "pipeline1", | |
"properties": { | |
"activities": [ | |
{ | |
"name": "Call dataset refresh", | |
"type": "WebActivity", | |
"dependsOn": [ | |
{ | |
"activity": "Get AAD Token", |
View ADF_Scale_Azure_SQLDB.json
{ | |
"name": "ADF_Scale_Azure_SQLDB", | |
"properties": { | |
"activities": [ | |
{ | |
"name": "ADF_Scale_Azure_SQLDB", | |
"type": "WebActivity", | |
"policy": { | |
"timeout": "7.00:00:00", | |
"retry": 0, |
View ADF_Scale_Azure_AS.json
{ | |
"name": "ADF_Scale_Azure_AS", | |
"properties": { | |
"activities": [ | |
{ | |
"name": "00_Scale_Azure_AS", | |
"type": "WebActivity", | |
"policy": { | |
"timeout": "7.00:00:00", | |
"retry": 0, |
View PowerBIEmbeddedPauseCapacity.ps1
<# | |
.SYNOPSIS | |
Pause/suspend an Azure Power BI Embedded Capacity using Azure Automation. | |
.DESCRIPTION | |
This Azure Automation runbook enables pausing/suspending of an Azure Power BI Embedded Capacity. | |
.PARAMETER resourceGroupName | |
Name of the resource group to which the capacity is assigned. |
View PowerBIEmbeddedResumeCapacity.ps1
<# | |
.SYNOPSIS | |
Resume an Azure Power BI Embedded Capacity using Azure Automation. | |
.DESCRIPTION | |
This Azure Automation runbook enables resuming of an Azure Power BI Embedded Capacity. | |
.PARAMETER resourceGroupName | |
Name of the resource group to which the capacity is assigned. |
View PowerBIEmbeddedScheduledAutoscaling.ps1
<# | |
.SYNOPSIS | |
Vertically scale up and down or pause/resume an Azure Power BI Embedded Capacity according to a schedule using Azure Automation. | |
.DESCRIPTION | |
This Azure Automation runbook enables vertically scaling or pausing of an Azure Power BI Embedded Capacity according to a schedule. Autoscaling based on a schedule allows you to scale your solution according to predictable resource demand. For example you could require a high capacity (e.g. A5) on monday during peak hours, while the rest of the week the traffic is decreased, allowing you to scale down (e.g. A1). Outside business hours and during weekends you could then suspend the capacity so no charges will be applied. This runbook can be scheduled to run hourly. The code checks the scalingSchedule parameter to decide if scaling needs to be executed, or if the capacity is in the desired state already and no work needs to be done. The script is time zone aware. | |
.PARAMETER resourceGroupName | |
Name of the resource group to which the |
View Assign AD Users Power BI Free license.ps1
# install module | |
Install-Module AzureAD -Scope CurrentUser # if already installed you can skip this line | |
Import-Module AzureAD # if already imported you can skip this line | |
# connect | |
Connect-AzureAD # this will initiate a dialog to enter credentials | |
# Find the SkuID of the license we want to add - in this case the Power BI Free license, which is called "POWER_BI_STANDARD" | |
$PowerBIFreeSKUId = Get-AzureADSubscribedSku | Where-Object {$_.SkuPartNumber -eq "POWER_BI_STANDARD"} | Select -ExpandProperty SkuId |