This repository contains a set of PowerShell cmdlets for developers and administrators to manage Cloud Solution Provider program resources.
Currently, there is only a pre-release version of the Partner Center module available. To install pre-release items using the Install-Module command the latest version of PowerShellGet must be installed. If you do not have the latest version installed, run the following command from an elevated PowerShell session:
Install-Module -Name PowerShellGet -Force
Run the following command in an elevated PowerShell session to install the Partner Center module:
Install-Module -Name PartnerCenter -AllowPrerelease
If you have an earlier version of the Partner Center PowerShell modules installed from the PowerShell Gallery and would like to update to the latest version, run the following commands from an elevated PowerShell session.
Note: Update-Module
installs the new version, however, it does not remove the old version.
# Install the latest version of the Partner Center PowerShell module
Update-Module -Name PartnerCenter
Important: This module only supports the app + user authentication.
You must create and configure an Azure Active Directory (AD) application. To do this, complete the following steps:
- Sign in to the Partner Dashboard using credentials that have Admin Agent and Global Admin privileges
- Click on Dashboard at the top of the page, then click on the cog icon in the upper right, and then click the Partner settings.
- Add a new native application if one does not exist already.
- Sign in to the Azure management portal using the same credentials from step 1.
- Click on the Azure Active Directory icon in the toolbar.
- Click App registrations -> Select All apps from the drop down -> Click on the application created in step 3.
- Click Settings and then click Redirect URIs
- Add urn:ietf:wg:oauth:2.0:oob as one of the available Redirect URIs. Be sure to click the Save button to ensure the changes are saved.
To connect to Partner Center, use the Connect-PartnerCenter
cmdlet.
# Interactive login - a dialog box will appear for you to provide your Partner Center credentials
Connect-PartnerCenter -ApplicationId '<Native-AAD-AppId-for-PartnerCenter>'
# Non-interactive login
$PSCredential = Get-Credential
Connect-PartnerCenter -ApplicationId '<Native-AAD-AppId-for-PartnerCenter>' -Credential $PSCredential
To log into a specific cloud (ChinaCloud, GlobalCloud, GermanCloud, USGovernment), use the Environment
parameter:
# Log into a specific cloud - in this case, the German cloud
Connect-PartnerCenter -Environment GermanCloud
Use the Get-Command
cmdlet to discover cmdlets within a specific module, or cmdlets that follow a specific search pattern:
# View all cmdlets in the Partner Center module
Get-Command -Module PartnerCenter
# View all cmdlets that contain "Customer" in the PartnerCenter module
Get-Command -Module PartnerCenter -Name "*Customer*"
To view the cmdlet help content, use the Get-Help
cmdlet:
# View the basic help content for Get-PartnerCustomer
Get-Help -Name Get-PartnerCustomer
# View the examples for Get-PartnerCustomer
Get-Help -Name Get-PartnerCustomer -Examples
# View the full help content for Get-PartnerCustomer
Get-Help -Name Get-PartnerCustomer -Full