Skip to content

Instantly share code, notes, and snippets.

View rpothin's full-sized avatar
🔥
Exploring a new idea almost every day!

Raphael Pothin rpothin

🔥
Exploring a new idea almost every day!
View GitHub Profile
@rpothin
rpothin / update-installed-microsoft-business-applications-solution.ps1
Created January 28, 2025 03:58
PowerShell code to update your installation of the Microsoft Business Applications solution when a new version is available
# Source: https://techcommunity.microsoft.com/blog/microsoftsentinelblog/deploy-microsoft-sentinel-using-bicep/4270970
# Connect to Azure CLI with device code
az login --use-device-code
# Get a token to be able to use the https://management.azure.com/ api
$token = az account get-access-token --resource "https://management.azure.com/" --query accessToken -o tsv
#region Navigation to the considered Log Analytics workspace
@rpothin
rpothin / install-microsoft-business-applications-solution-into-microsoft-sentinel-workspace.ps1
Created January 28, 2025 03:53
PowerShell code to install the Microsoft Business Applications solution into a Microsoft Sentinel Workspace
# Source: https://techcommunity.microsoft.com/blog/microsoftsentinelblog/deploy-microsoft-sentinel-using-bicep/4270970
# Connect to Azure CLI with device code
az login --use-device-code
# Get a token to be able to use the https://management.azure.com/ api
$token = az account get-access-token --resource "https://management.azure.com/" --query accessToken -o tsv
#region Navigation to the considered Log Analytics workspace
@rpothin
rpothin / microsoft-sentinel-workspace.bicep
Created January 28, 2025 03:31
Bicep module for the provisioning of a Microsoft Sentinel Workspace
@description('Name of the Log Analytics Workspace')
param logAnalyticsWorkspaceName string
@description('Log Analytics Workspace Pricing Tier')
param logAnalyticsWorkspaceSkuName string = 'PerGB2018'
@description('Resource Group Location')
param location string
@description('Tags for resources')
@rpothin
rpothin / microsoft-purview-profile-data.ps1
Created December 8, 2024 02:30
PowerShell code to profile data from a Data Asset to get insights for the configuration of Data Quality scans in Microsoft Purview
# Login to Azure CLI
az login
# Using Azure CLI get the ID of the current tenant
$tenantId = az account show --query tenantId -o tsv
Write-Host "Tenant ID: $tenantId"
# Get a token for Microsoft Purview API
$token = az account get-access-token --resource "https://purview.azure.net" --query accessToken -o tsv
@rpothin
rpothin / microsoft-purviw-create-connection-to-fabric-for-data-quality-scans.ps1
Created December 7, 2024 05:06
PowerShell code to create a connection to Fabric to be able to run Data Quality scans from Microsoft Purview
# Login to Azure CLI
az login
# Using Azure CLI get the ID of the current tenant
$tenantId = az account show --query tenantId -o tsv
Write-Host "Tenant ID: $tenantId"
# Get a token for Microsoft Purview API
$token = az account get-access-token --resource "https://purview.azure.net" --query accessToken -o tsv
@rpothin
rpothin / microsoft-purview-run-data-quality-scan.ps1
Created December 7, 2024 04:58
PowerShell code to run a Data Quality scan against a Data Asset based on configured rules in Microsoft Purview
# Login to Azure CLI
az login
# Using Azure CLI get the ID of the current tenant
$tenantId = az account show --query tenantId -o tsv
Write-Host "Tenant ID: $tenantId"
# Get a token for Microsoft Purview API
$token = az account get-access-token --resource "https://purview.azure.net" --query accessToken -o tsv
@rpothin
rpothin / microsoft-purview-add-data-quality-rule-to-data-asset.ps1
Created December 7, 2024 04:43
PowerShell code to add a Data Quality rule to a Data Asset in Microsoft Purview
# Login to Azure CLI
az login
# Using Azure CLI get the ID of the current tenant
$tenantId = az account show --query tenantId -o tsv
Write-Host "Tenant ID: $tenantId"
# Get a token for Microsoft Purview API
$token = az account get-access-token --resource "https://purview.azure.net" --query accessToken -o tsv
@rpothin
rpothin / microsoft-purview-add-lakehouse-table-as-data-asset-under-data-product.ps1
Last active December 7, 2024 03:47
PowerShell code to add a Fabric Lakehouse Table to Microsoft Purview as a Data Asset under a Data Product
# Login to Azure CLI
az login
# Using Azure CLI get the ID of the current tenant
$tenantId = az account show --query tenantId -o tsv
Write-Host "Tenant ID: $tenantId"
# Get a token for Microsoft Purview API
$token = az account get-access-token --resource "https://purview.azure.net" --query accessToken -o tsv
@rpothin
rpothin / microsoft-purview-service-principal-connection-to-microsoft-fabric.ps1
Last active December 5, 2024 04:47
PowerShell code for the configuration of a security group, service principal, key vault and Microsoft Fabric access to enable Data Map scans from Microsoft Purview
# Login to Azure CLI
az login
# Prompt the user to ask if they want to create a new security group to manage the access of the Purview account managed identity to the Power BI / Fabric Admin API
$createNewSecurityGroup = Read-Host -Prompt 'Do you want to create a new security group to manage the access of the Purview account managed identity to the Power BI / Fabric Admin API? (Y/N)'
# If the user wants to create a new security group
if ($createNewSecurityGroup.ToUpper() -eq "Y") {
# Prompt user to get the name and the description of the security group to create in Entra ID (aka Azure AD)
$securityGroupName = Read-Host -Prompt 'Enter the name of the security group to create in Entra ID (aka Azure AD)'
@rpothin
rpothin / microsoft-purview-create-new-fabric-connection-if-needed.ps1
Last active December 4, 2024 03:40
PowerShell code to create a new Connection of type Fabric in Microsoft Purview if needed
# Login to Azure CLI
az login
# Using Azure CLI get the ID of the current tenant
$tenantId = az account show --query tenantId -o tsv
Write-Host "Tenant ID: $tenantId"
# Get a token for Microsoft Purview API
$token = az account get-access-token --resource "https://purview.azure.net" --query accessToken -o tsv