Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello, we have daily logs for our power bi capability. The refresh on demand appear correctly. We would like to display the scheduled refreshes. For that we use the SetScheduledRefresh command but it doesn't really work. Per day there are less than 5 lines that appear while hundreds of our reports refresh in a scheduled way. Do you have any ideas?
Thank you guys
Hi Charly. Have you tried getting the refresh history from the service with the Rest API?
https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/get-refresh-history-in-group
That might help to get that data.
Regards,
Happy to help!
hi, we use this script with "GetRefreshHistory" but the scheduled refreshes do not go back in the log. see the screen
start-transcript -path "D:\Script PowerShell\MyOffice\audit\Power BI\mh.powerbi.auditdaemon\console.log"
#Requires -Modules "SecureCredentials"
#Requires -Modules "SharePointPnPPowerShellOnline"
Set-Location $PSScriptRoot
. .\Get-AuditLog.ps1
#################################### Configuration Section ###################################################
# $credsPath = "./credentials.txt"
$login = "svc_auditlog@b1envenue.onmicrosoft.com"
$password = Get-Content ".\password.txt" | ConvertTo-SecureString -Key (Get-Content ".\aes.key")
$UserCredential = new-object -typename System.Management.Automation.PSCredential -argumentlist $login,$password
#out-file -filepath ".\debug.txt" -inputobject "$login;$password" -append
$now = [DateTime]::Now
$logFolder = "Logs"
$logFile = "./$($logFolder)/Log_$($now.ToShortDateString().Replace('/','_')).txt"
#[DateTime]$start = "08/23/2022 00:00"
#[DateTime]$end = "08/24/2022 00:00"
$start = [DateTime]::Now.Date.AddDays(-1)
$end = [DateTime]::Now.Date
$outputFolder = "Exports"
$outputFile = "./$($outputFolder)/AuditRecords_$($start.ToShortDateString().Replace('/','_'))-$($end.ToShortDateString().Replace('/','_')).csv"
$record = "PowerBIAudit"
$Operations = @(
"AddGroupMembers",
"CreateApp","CreateDashboard","CreateDataflow","CreateDataset","CreateFolder","CreateGroup","CreateReport",
"CreateDatasetFromExternalApplication","TakeOverDataset",
"DownloadReport",
"EditDataset","EditReport","ExportDataflow","ExportReport",
"Importer","InstallApp",
"PublishToWebReport",
"RenameDashboard",
"RefreshDataset",
"SetScheduledRefreshOnDataflow","SetScheduledRefresh","RequestDataflowRefresh",
"ShareDashboard","ShareReport",
"OptInForProTrial",
"UpdateApp",
"ViewDashboard","ViewReport",
"AssignWorkspaceToPipeline", "CancelDataflowRefresh", "CopyDashboard", "CopyReport", "CreateGoal", "CreateGoalValue", "CreateScorecard", "CreateAlmPipeline", "CreateDatasetFromExternalApplication", "CreateReport 1", "CreateTemplateApp", "CreateTemplateApp", "DeleteAlmPipeline", "DeleteDatasetFromExternalApplication", "DeleteDatasetRows", "DeleteGoal", "DeleteGoal", "DeleteNote", "DeleteScorecard", "DeleteTemplateApp", "DeployAlmPipeline", "EditDatasetFromExternalApplication", "PatchGoal", "PatchGoalValue", "PatchNote", "PatchScorecard", "PublishToWebReport 2", "UnassignWorkspaceFromPipeline", "RefreshDatasetFromExternalApplication", "GetGoal", "GetGoalValues", "GetScorecards", "GetGoal", "GetGoalValue", "GetRefreshHistory", "GetScorecard", "GetScorecardByReportId", "ShareDataset", "TookOverDataflow", "UpdateAlmPipelineAccess", "SetConfigurationAlmPipeline", "UpdateWorkspace", "UpdateWorkspaceAccess"
)
$resultSize = 5000 #100 modifié GPR 25/08/2022
$intervalMinutes = 1440
$retryCount = 3
$SharepointSiteUrl = "*****"
$Folder = "Documents partages/00_REALISATION/Datavista/Utilisation/02_Data/Log PBI"
#$UserCredential = Get-SecureCredentials -Path $credsPath
##debug
#out-file -filepath ".\debug.txt" -inputobject "$outputFile;$UserCredential" -append
#################################### End Configuration Section ###################################################
## Create Log & Exports Folder ##
New-Item -Name $logFolder -ItemType Directory -Force > $null
New-Item -Name $outputFolder -ItemType Directory -Force > $null
## Get-AuditLog ##
Remove-Item -Path $outputFile -Force -ErrorAction SilentlyContinue
Get-AuditLog -logFile $logFile -outputFile $outputFile -start $start -end $end -record $record -Operations $Operations -resultSize $resultSize -intervalMinutes $intervalMinutes -retryCount $retryCount -UserCredential $UserCredential
## Upload export file to SP ##
Connect-PnPOnline -Url $SharepointSiteUrl -Credential $UserCredential
Add-PnPFile -Path $outputFile -Folder $Folder
Disconnect-PnPOnline
stop-transcript
(I specify that the refresh that appears is a refresh on request)
Thank guys !
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
55 | |
39 | |
33 | |
31 | |
25 |