PowerShell module for managing the Microsoft Partner Center
Follow the steps at https://msdn.microsoft.com/library/partnercenter/mt709136.aspx to configure an application within Azure AD for API access.
See the module file itself for examples: https://github.com/corydwood/MicrosoftPartnerCenterAPI/blob/master/MicrosoftPartnerCenterAPI.psm1