Skip to content

Instantly share code, notes, and snippets.

@lazywinadmin
Created March 25, 2019 23:45
Show Gist options
  • Save lazywinadmin/0d6ff188488ff4f409424c5b6943b06f to your computer and use it in GitHub Desktop.
Save lazywinadmin/0d6ff188488ff4f409424c5b6943b06f to your computer and use it in GitHub Desktop.
Export MVP Contributions in CSV
#https://lazywinadmin.com/2018/01/MVPModule-BackupMyEntries.html#backup-per-year
# Connect to api
$Key = '<Your Secret key>'
Set-MVPConfiguration -SubscriptionKey $Key
# Get All contributions
$AllContrib = Get-MVPContribution -limit 1000
# Retrieve important data and select the useful properties that
# we can use for the next import
$AllContrib|Select-Object -Property
startdate,title,description,referenceurl,AnnualQuantitySecond,AnnualQuantity,AnnualReach,
@{L='Visibility';E={$_.visibility.description}},
@{L='ContributionType';E={$_.contributiontype.name}},
@{L='ContributionTechnology';E={$_.contributiontechnology.name}} |
# Export to CSV
Export-Csv .\AllMyContributionsBackup_$(Get-Date -Format yyyyMMdd).csv -NoTypeInformation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment