Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

59 Commits

Repository files navigation

Partner Center PowerShell Module (preview)

What is

Partner Center Powershell Module is the powershell implementation of the Partner Center API available scenarios. You can manage your customers, offers, subscriptions, usage, etc. Objective is to keep this module as close as possible to the Partner Center SDK functionalities.

How to install

This module is published via PowerShell Gallery so it can be installed using Install-Module.

Install-Module -Name PartnerCenterModule

How to use

Step 1

Make sure your App Management is already configured to enable access to Partner Center API.

Step 2

Just like with AzureRM powershell module, the first step to start using it is to provide authentication. In Partner Center PowerShell Module you use Add-PCAuthentication cmdlet. This will set your CSP account authentication context.

Set user authentication

$credentials = Get-Credential '<username@domain>'
Add-PCAuthentication -cspappID '<native app id GUID>' -cspDomain '<csp partner domain>' -credential $credentials

or

Set app authentication

$clientSecret = '<key code secret>'
$clientSecretSecure = $clientSecret | ConvertTo-SecureString -AsPlainText -Force
Add-PCAuthentication -cspappID '<native app id GUID>' -cspDomain '<csp partner domain>' -cspClientSecret $clientSecretSecure

Ready

After this first steps you are ready to start using bellow cmdlet scenarios. (ex: create customers, create subscriptions, etc)

Partner Center API scenario -> powershell module matrix

Partner Center API ScenarioCmdLet
AnalyticsRetrieve analytics
Get partner licenses deployment informationGet-PCLicensesDeployment
Get partner licenses usage informationGet-PCLicensesUsage
Get customer licenses deployment informationGet-PCCustomerLicensesDeployment
Get customer licenses usage informationGet-PCCustomerLicensesUsage
Device DeploymentConfiguration policies
Add, delete, update and retrieve device configuration policies
Create a new configuration policy for the specified customerNA
Delete a configuration policy for the specified customerNA
Get a list of a customer's policiesNA
Retrieve a customer's configuration policyNA
Update a configuration policy for the specified customerNA
Work with and upload device batches and device metadata
Get the status of a device batch uploadNA
Get a list of device batches for the specified customerNA
Get a list of devices for the specified batch and customerNA
Upload a list of devices to create a new batch for the specified customerNA
Upload a list of devices to an existing batch for the specified customerNA
Delete a device for the specified customerNA
Manage customer accounts
Create a customer
Create a customerNew-PCCustomer
Create a customer for an indirect resellerNA
Retrieve a relationship request URLNew-PCRelationshipRequest
Look up a customer
Get a customer by IDGet-PCCustomer
Get a customer by company name or domainGet-PCCustomer
Get a list of customersGet-PCCustomer
Manage customer orders and subscriptions
Get all of a customer's ordersGet-PCOrder
Get all of a customer's subscriptionsGet-PCSubscription
Update the nickname for a subscriptionSet-PCSubscription
Manage customer account details
Get a customer's billing profileGet-PCCustomerBillingProfile
Update a customer's billing profileSet-PCCustomerBillingProfile
Get a customer's company profileGet-PCCustomerCompanyProfile
Manage user accounts and assign licenses
Get a user account by IDGet-PCCustomerUser
Create user accounts for a customerNew-PCCustomerUser
Delete a user account for a customerRemove-PCCustomerUser
Update user accounts for a customerSet-PCCustomerUser
View deleted users for a customerGet-PCCustomerUser
Restore a deleted user for a customerRestore-PCCustomerUser
Get a list of all user accounts for a customerGet-PCCustomerUser
Reset user password for a customerSet-PCCustomerUser
Get user roles for a customerGet-PCCustomerUserRole
Get-PCCustomerRole
Get-PCCustomerRoleMember
Set user roles for a customerAdd-PCCustomerRoleMember
Remove a customer user from a roleRemove-PCCustomerRoleMember
Get a list of available licensesGet-PCSubscribedSKUs
Assign licenses to a userNA
Check which licenses are assigned to a userGet-PCCustomerUser
Get licenses assigned to a user by license groupNA
Get a list of available licenses by license groupNA
Place orders
Get offers from the catalog
Get a list of offer categories by country and localeGet-PCOfferCategoriesByMarket
Get a list of offers for a marketGet-PCOffer
Get an offer by IDGet-PCOffer
Get add-ons for an offer IDGet-PCOffer
Create an order
Create an orderNew-PCOrder
Create an order for a customer of an indirect resellerNA
Get an order by IDGet-PCOffer
Purchase an add-on to a subscriptionNew-PCOrder
Trial conversions
Get a list of trial conversion offersNA
Convert a trial subscription to paidNA
Get subscription details
Get a subscription by IDGet-PCSubscription
Get a list of subscriptions by IDGet-PCSubscription
Get a list of subscriptions by orderGet-PCSubscription
Get a list of add-ons for a subscriptionGet-PCSubscription
Get subscription provisioning statusNA
Change, suspend, or reactivate a subscription
Change the quantity of a subscriptionSet-PCSubscription
Suspend a subscriptionSet-PCSubscription
Reactivate a suspended subscriptionSet-PCSubscription
Transition a subscriptionNA
Manage billing
Get Azure rates and utilization records
Get prices for Microsoft AzureGet-PCAzureRateCard
Get a customer's utilization records for AzureGet-PCUsage
Get-PCUsage2
Get invoices
Get the reseller's current account balanceGet-PCInvoice
Get invoice by IDGet-PCInvoice
Get invoice line itemsGet-PCInvoiceLineItems
Get a collection of invoicesGet-PCInvoice
Check your Azure spending budget
Get usage data for a subscriptionGet-PCAzureResourceMonthlyUsageRecords
Get usage summary for all of a customer's subscriptionsGet-PCCustomerUsageSummary
Get service costs
Get a customer's service costs summaryNA
Get a customer's service costs line itemsNA
Provide support
Admin services for a customer
Get the managed services for a customer by IDGet-PCManagedServices
Manage support contacts
Get a subscription's support contactNA
Update a subscription's support contactNA
Manage service requests
Create a service requestNew-PCSR
Get service request support topicsGet-PCSRTopics
Get all service requests for a customerGet-PCSR
Update a service requestSet-PCSR
Manage partner accounts and profiles
Work with profiles in Dashboard > Account settings
Get legal business profileGet-PCLegalBusinessProfile
Get an organization profileNA
Get partner billing profileGet-PCBillingProfile
Get Microsoft Partner Network profileGet-PCMpnProfile
Get support profileGet-PCSupportProfile
Update legal business profileSet-PCLegalBusinessProfile
Update a partner's billing profileSet-PCBillingProfile
Update support profileSet-PCSupportProfile
Update an organization profileSet-PCOrganizationProfile
Get partner by MPN IDGet-PCMpnProfile
Get all subscriptions by partnerGet-PCSubscription
Get indirect resellers of a customerGet-PCCustomerRelationships
Get customers of an indirect resellerGet-PCResellerCustomers
Retrieve a list of indirect resellersGet-PCIndirectResellers
Utilities
Validate address formatTest-PCAddress
Get address formatting rules by marketGet-PCAddressRulesByMarket
Verify domain availabilityGet-PCDomainAvailability
Delete a customer account from the integration sandboxRemove-PCCustomer
Get a record of Partner Center activity by userGet-PCAuditRecords
Authentication
Add Partner Center Authentication TokenAdd-PCAuthentication
New-PCSAToken

Telemetry collection

To help us to better understand the module utilization and better prioritize development efforts we enabled telemetry collection by default.

What we collect?

  • The CSP account domain
  • The cmdlet name executed (only the name, no data is collected)
  • The module version

If you prefer not to send this data use the following command to disable the telemetry collection:

Set-PCModuleTelemetry -enabled $false

About

Partner Center PowerShell Module

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages