Using the PowerShell MVP module

The renewal season is opened and it’s time to use the PowerShell module designed to interact with the Microsoft MVP website François-Xavier Cat and I released last year when the Microsoft MVP Rest API was made available.

François-Xavier already published some very useful posts and demoed how to use the MVP module for:

This year, I only used the module to insert and review my contributions.
To start using the module, you basically need to install the module, import it and set your subscription key with the Set-MVPConfiguration function. See first the following post from François-Xavier to achieve these steps.

Now I’d like to show you some code snippets I used along this contributions submission process.

First, I needed to find what contribution I submitted last year and filter out what PGI I attended.
To quickly do that I used:

Get-MVPContribution -Limit 100 | 
Where { $_.ContributionType.Name -notmatch 'PGI' } | 
Out-GridView -PassThru 

I first get the out-gridview window where I can list, search and select contribution(s):

If I select a previous one:

After I reviewed my old contribution, I gather updated numbers for the new period and prepare the following to submit an activity:

$splat = @{
 startdate ='2017/07/01'
 Title='Type your title here'
 Description = @'
Enter a full description about this activity
 AnnualReach = '1000'
 Visibility = (
  Get-MVPContributionVisibility | 
  Out-GridView -Title 'Select visibility' -PassThru
 ContributionType = (
  Get-MVPContributionType | 
  Out-GridView -Title 'Select Contribution Type' -PassThru
 ContributionTechnology = (
  Get-MVPContributionArea -All | 
  Out-GridView -Title 'Select Contribution Area' -PassThru

# Review one more time

# Submit activity
New-MVPContribution @splat

Note that a new contribution ID is returned when it’s submitted using the New-MVPContribution function.
I take a note of its ID and use the following to be able to query this activity later on when/if needed.

Get-MVPContribution -ID 547174

After I entered all the activities, I use this code snippet to see what I submitted:

Get-MVPContribution -Limit 100 | 
Where { $_.ContributionType.Name -notin @(
 'Product Group Interaction (PGI)',
 'Forum Participation (Microsoft Forums)') } | 
ForEach-Object {
 $_ | 
 Add-Member -MemberType NoteProperty -Name Date -Value (Get-Date $_.StartDate) -PassThru
} | Where { 
 $_.Date -ge (Get-Date '2017-07-01T00:00:00') 
} | 
Sort -Property Date | 

3 thoughts on “Using the PowerShell MVP module

  1. Pingback: Dew Drop - February 22, 2018 (#2670) - Morning Dew

  2. Reblogged this on The Dynamics GP Geek blog and commented:
    To all my Dynamics GP buddies out there.. this time of the year where you have to submit your activities to Microsoft, since they are now all due for March 31st as deadline (don’t wait the last minute!). This set of PowerShell scripts is going to help if you have a long list to enter.
    Enjoy and looking forward to see most of you in Seattle from March 4th to 8th for the annual MVP Summit 2018.
    Until next time..

  3. Pingback: Using the PowerShell MVP module - Microsoft Dynamics GP Community

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s