Skip to content

JimBobUKII/Partner-Center-PowerShell

 
 

Repository files navigation

Microsoft Partner Center PowerShell

Build status

This repository contains a set of PowerShell cmdlets for developers and administrators to manage Cloud Solution Provider program resources.

Installation

PowerShell Gallery

Run the following command in an elevated PowerShell session to install the Partner Center module:

Install-Module -Name PartnerCenter

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

Usage

Configure Azure AD Native App

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:

  1. Sign in to the Partner Dashboard using credentials that have Admin Agent and Global Admin privileges
  2. 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.
  3. Add a new native application if one does not exist already.
  4. Sign in to the Azure management portal using the same credentials from step 1.
  5. Click on the Azure Active Directory icon in the toolbar.
  6. Click App registrations -> Select All apps from the drop down -> Click on the application created in step 3.
  7. Click Settings and then click Redirect URIs
  8. 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.

Log in to Partner Center

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

Discovering cmdlets

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*"

Cmdlet help and examples

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

About

PowerShell module for managing Partner Center resources.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 95.0%
  • PowerShell 5.0%