Skip to content

Backup‐PIMAzureResourcePolicy

Loïc MICHEL edited this page Jan 28, 2024 · 5 revisions

Description:

Export the rules of all rolename at the specified subscription/scope to a csv file
Warning This is a long operation > 15min

Samples:

🔷 Export configuration of all roles at a subscription scope to c:\temp\pim.csv

Backup-PIMAzureResourcePolicy -TenantID <tenantID> -SubscriptionId <subscriptionID> -exportFilename c:\temp\RG.csv

🔷 Export configuration of all roles at a Management Group scope to c:\temp\MG.csv

$scope = "providers/Microsoft.Management/managementGroups/MG_All_Subscriptions"
Backup-PIMAzureResourcePolicy -tenantID $tenantID -scope $scope -exportFilename c:\temp\MG.csv

Parameters:

Parameter description
$TenantID Entra ID TenantID
$SubscriptionId Subscription ID
$Scope If you want to manage the role at other scope than subscription
$exportFilename Path to csv file

📝 Documentation

Clone this wiki locally