Forum Discussion
My workspace(reports) download using PowerShell
Guys, Iam using the below code, to download the reports, it says "Personal workspace 'My Workspace' not found."
Question_1
Can someone please let me know is this correct code or iam missing something...
Question_2
As a Power BI Admin, If there are 10 personal workspace, what tenant settings should be done to allow admins to view and manage the Personal workspace.
# Install-Module -Name MicrosoftPowerBIMgmt
# Connect to Power BI
Connect-PowerBIServiceAccount
# Get the personal workspace (replace "My Workspace" if your personal workspace has a different name)
$personalWorkspace = Get-PowerBIWorkspace -Name "My Workspace"
# Check if the personal workspace exists
if ($personalWorkspace) {
Write-Host "Found personal workspace: $($personalWorkspace.Name)"
# Get reports within the personal workspace
$reports = Get-PowerBIReport -Scope Individual -WorkspaceId $personalWorkspace.Id
# Download reports
foreach ($report in $reports) {
Write-Host "Downloading report: $($report.Name)"
Export-PowerBIReport -Scope Individual -WorkspaceId $personalWorkspace.Id -Id $report.Id -Path "C:\Path\To\Download\" -Overwrite
}
} else {
Write-Host "Personal workspace 'My Workspace' not found."
}
Thanks,
You need to set up the option 2
This is how to get access to a personnal workspace when someone leaves your organizatrion
On the other hand, you can see that the type is Personal Group and not workspace (for your powershell script)
6 Replies
- CookistadorSuper User
According to Microsoft documentation, for the scope, you have to use Individual instead of organization
- Akash_VarunaSuper User
Hi YashikaAgrawal The code needs adjustment, as "My Workspace" isn't explicitly named. Use Get-PowerBIWorkspace -Scope Individual to fetch the personal workspace. For tenant settings, enable "Personal workspaces (My Workspace)" in the Power BI Admin Portal and assign Power BI Service Administrator in Azure AD.
- YashikaAgrawalPost Patron
Which option to select here
It this the option, can you please check..
- CookistadorSuper User
You need to set up the option 2
This is how to get access to a personnal workspace when someone leaves your organizatrion
On the other hand, you can see that the type is Personal Group and not workspace (for your powershell script)
- v-venuppuCommunity Support
Hi YashikaAgrawal ,
Thank you for reaching out to Microsoft Fabric Community.
Thank you Akash_Varuna Cookistador for the prompt response.
I want to check if you had the opportunity to review the information provided and resolve the issue.If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
- v-venuppuCommunity Support
Hi YashikaAgrawal ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.