Skip to content

Instantly share code, notes, and snippets.

Dave Ruijter DaveRuijter

Block or report user

Report or block DaveRuijter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DaveRuijter
DaveRuijter / pl_PBI_dataset_refresh.json
Last active Aug 8, 2019
Azure Data Factory pipeline to refresh a Power BI dataset using a Service Principal, and Azure Key Vault.
View pl_PBI_dataset_refresh.json
{
"name": "pipeline1",
"properties": {
"activities": [
{
"name": "Call Dataset Refresh",
"type": "WebActivity",
"dependsOn": [
{
"activity": "Get AAD Token",
@DaveRuijter
DaveRuijter / ADF_Scale_Azure_SQLDB.json
Created Dec 24, 2018
Azure Data Factory pipeline definition with a Web Activity to scale an Azure SQL Database. The pipeline is parameterized. The call to Azure SQL is synchronous, hence it waits for the db scale operation to complete.
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,
@DaveRuijter
DaveRuijter / ADF_Scale_Azure_AS.json
Last active Dec 24, 2018
Azure Data Factory pipeline definition with a Web Activity to scale an Azure Analysis Services server. The pipeline is parameterized. The call to AAS is synchronous, hence it waits for the scale operation to complete.
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.
@DaveRuijter
DaveRuijter / PowerBIEmbeddedScheduledAutoscaling.ps1
Last active Nov 19, 2018
PowerShell script to vertically scale up and down or pause/resume an Azure Power BI Embedded Capacity according to a schedule. You can use this in an Azure Automation Runbook.
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
@DaveRuijter
DaveRuijter / PowerBIEmbeddedResumeCapacity.ps1
Created Nov 19, 2018
PowerShell script that enables resuming of an Azure Power BI Embedded Capacity.
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.
@DaveRuijter
DaveRuijter / Assign AD Users Power BI Free license.ps1
Last active Nov 13, 2018
Use PowerShell to assign the 'Power BI Free' license to all users in the tenant. This makes sure they will not get the 'welcome wizard' to setup their account for the first time.
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
You can’t perform that action at this time.