Forum Discussion
ChrisRenlund
5 years agoAdvocate I
PowerShell script example on how to run full refresh of incremental dataset?
Is there anyone who can provide a code example on how to write a Powershell script that runs a full refresh of a dataset that is configured for incremental refresh? We refresh our datasets by pow...
- 5 years ago
Found out how to pull it off.
You create a .json file with this information:
{ "refresh": { "type": "full", "applyRefreshPolicy": false, "objects": [ { "database": "Your Dataset Name" } ] } }Then you create an Powershell script-file:
#Set Credentials $userName = "[email protected]" $password = ConvertTo-SecureString -String "YourPassword" -AsPlainText -Force $Credential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $userName, $password #Execute refresh $InputFileRefresh ="D:\MyJsonFile.json" invoke-ascmd -Server "powerbi://api.powerbi.com/v1.0/myorg/Your Workspace Name" -InputFile $InputFileRefresh -Credential $CredentialThat runs a full refresh of the dataset (but you won't see it running in the Power BI service and the Last Refresh Date in the PBI service will not be updated, just the data in the dataset).
v-easonf-msft
5 years agoCommunity Support
Hi, ChrisRenlund
If you still have this issue for Power BI, you'd better open a support ticket to contact MSFT for professional help.
https://powerbi.microsoft.com/en-us/support/
Best Regards,
Community Support Team _ Eason