Loading...

Use PowerShell and Graph to Export Proactive Remediation script to a CSV - the native way

In this post I will show you how to use PowerShell and MS Graph to export your Proactive Remediation script to a csV format as it can be done through the portal.


Context

- You have a Proactive Remediation script

- You want to export its content to a CSV


The uservoice

8 months ago I created a uservoice to ask the ability to export Proactive Remediation to a CSV directly from a button.

Now as you can see below, it's available, so cool.



The other way

Before it was implemented I already created another script to export Proactve Remediation script to a CSV.

See the poste here.


The new way

Now let's use native Graph functionnalities that have been implemneted with the new Export button.

You can find how to get the appropriate Graph query corresponding to a button or resource using this post.


Exporting a Proactive Remediation script to a CSV can be achieved in 6 steps:

1. Getting the Proactive Remediation ID

2. Initializing the export

3. Getting the export ID

4. Initializing the URL request

5. Getting the URL

6. Downlading the export


The resource corresponding to Proactive Remediation export is: deviceManagement/reports/exportJobs


You can find in my script below how to export a Proactive Remediation to a CSV.



Enregistrer un commentaire

Accueil item

Award

Join me soon

Join me soon

Endpoint Manager award

Mes articles en français

Author of Books

PowerShell GUI & WPF Group

PowerShell GUI & WPF Group

Join the FPSUGR

Join the FPSUGR

Stats