From e768c6ea1861263de80472055471e01b6894ed9a Mon Sep 17 00:00:00 2001
From: Joel Stidley <30506169+joelst@users.noreply.github.com>
Date: Tue, 22 May 2018 21:33:23 -0500
Subject: [PATCH] PowerShell standards and documentation cleanup (#61)
* First pass of the script analyzer fixes
* Fixed: Plural PowerShell Nouns
Added non-plural version of each cmdlet that used a plural name. Updated documentation to match.
* Documentation Updates and cmdlets
Updated documentation and added non-plural versions of the existing cmdlets.
* Added warning text to deprecated cmdlets
Added warning text to deprecated cmdlets. Also added some details to some of the cmdlet help files about authentication and specific parameters.
---
CHANGELOG.md | 17 ++-
CONTRIBUTING.md | 32 ++---
CmdletHelp/Add-PCAuthentication.md | 22 ++--
CmdletHelp/Add-PCCustomerRoleMember.md | 22 ++--
CmdletHelp/Get-PCAddressRulesByMarket.md | 12 +-
CmdletHelp/Get-PCAuditRecord.md | 19 +++
CmdletHelp/Get-PCAuditRecords.md | 18 +--
CmdletHelp/Get-PCAzureRateCard.md | 17 +--
CmdletHelp/Get-PCBillingProfile.md | 10 +-
CmdletHelp/Get-PCCustomer.md | 19 +--
CmdletHelp/Get-PCCustomerBillingProfile.md | 14 +--
CmdletHelp/Get-PCCustomerCompanyProfile.md | 14 +--
CmdletHelp/Get-PCCustomerLicenseDeployment.md | 15 +++
CmdletHelp/Get-PCCustomerLicenseUsage.md | 15 +++
.../Get-PCCustomerLicensesDeployment.md | 14 ++-
CmdletHelp/Get-PCCustomerLicensesUsage.md | 14 ++-
CmdletHelp/Get-PCCustomerRelationship.md | 13 ++
CmdletHelp/Get-PCCustomerRelationships.md | 14 ++-
CmdletHelp/Get-PCCustomerRole.md | 14 +--
CmdletHelp/Get-PCCustomerRoleMember.md | 20 ++--
.../Get-PCCustomerServiceCostSummary.md | 15 +--
CmdletHelp/Get-PCCustomerUsageSummary.md | 15 +--
CmdletHelp/Get-PCCustomerUser.md | 25 ++--
CmdletHelp/Get-PCCustomerUserRole.md | 19 +--
CmdletHelp/Get-PCDomainAvailability.md | 9 +-
CmdletHelp/Get-PCIndirectReseller.md | 7 ++
CmdletHelp/Get-PCIndirectResellers.md | 10 +-
CmdletHelp/Get-PCInvoice.md | 17 +--
CmdletHelp/Get-PCInvoiceLineItem.md | 13 ++
CmdletHelp/Get-PCInvoiceLineItems.md | 13 +-
CmdletHelp/Get-PCLegalBusinessProfile.md | 9 +-
CmdletHelp/Get-PCLicenseDeployment.md | 7 ++
CmdletHelp/Get-PCLicenseUsage.md | 7 ++
CmdletHelp/Get-PCLicensesDeployment.md | 9 +-
CmdletHelp/Get-PCLicensesUsage.md | 9 +-
CmdletHelp/Get-PCManagedService.md | 13 ++
CmdletHelp/Get-PCManagedServices.md | 15 ++-
CmdletHelp/Get-PCMpnProfile.md | 13 +-
CmdletHelp/Get-PCOffer.md | 30 +++--
CmdletHelp/Get-PCOfferCategoriesByMarket.md | 11 +-
CmdletHelp/Get-PCOrder.md | 19 +--
CmdletHelp/Get-PCOrganizationProfile.md | 9 +-
CmdletHelp/Get-PCResellerCustomer.md | 7 ++
CmdletHelp/Get-PCResellerCustomers.md | 10 +-
CmdletHelp/Get-PCSR.md | 19 +--
CmdletHelp/Get-PCSRTopic.md | 9 ++
CmdletHelp/Get-PCSRTopics.md | 12 +-
CmdletHelp/Get-PCSubscribedSKU.md | 13 ++
CmdletHelp/Get-PCSubscribedSKUs.md | 14 ++-
CmdletHelp/Get-PCSubscription.md | 25 ++--
.../Get-PCSubscriptionMonthlyUsageRecords.md | 14 +--
CmdletHelp/Get-PCSupportProfile.md | 9 +-
CmdletHelp/Get-PCUsage.md | 17 +--
CmdletHelp/Get-PCUsage2.md | 20 ++--
CmdletHelp/NA.md | 4 +-
CmdletHelp/New-PCCustomer.md | 8 +-
CmdletHelp/New-PCCustomerUser.md | 15 +--
CmdletHelp/New-PCOrder.md | 30 ++---
CmdletHelp/New-PCRelationshipRequest.md | 9 +-
CmdletHelp/New-PCSAToken.md | 19 +--
CmdletHelp/New-PCSR.md | 27 +++--
CmdletHelp/Remove-PCCustomer.md | 13 +-
CmdletHelp/Remove-PCCustomerRoleMember.md | 21 ++--
CmdletHelp/Remove-PCCustomerUser.md | 17 +--
CmdletHelp/Restore-PCCustomerUser.md | 17 +--
CmdletHelp/Set-PCBillingProfile.md | 9 +-
CmdletHelp/Set-PCCustomerBillingProfile.md | 19 +--
CmdletHelp/Set-PCCustomerUser.md | 23 ++--
CmdletHelp/Set-PCLegalBusinessProfile.md | 9 +-
CmdletHelp/Set-PCOrganizationProfile.md | 9 +-
CmdletHelp/Set-PCSR.md | 21 ++--
CmdletHelp/Set-PCSubscription.md | 33 ++++--
CmdletHelp/Set-PCSupportProfile.md | 9 +-
CmdletHelp/Test-PCAddress.md | 13 +-
ISSUE_TEMPLATE.md | 6 +-
.../PartnerCenterAnalytics.psm1 | 89 +++++++++++++-
.../PartnerCenterAuthentication.psm1 | 8 +-
.../PartnerCenterCustomer.psm1 | 111 +++++++++++++++---
.../PartnerCenterDirectory.psm1 | 17 ++-
PartnerCenterModule/PartnerCenterInvoice.psm1 | 37 +++++-
PartnerCenterModule/PartnerCenterModule.psd1 | 22 ++--
PartnerCenterModule/PartnerCenterModule.psm1 | 7 --
PartnerCenterModule/PartnerCenterOffer.psm1 | 11 +-
PartnerCenterModule/PartnerCenterOrder.psm1 | 9 +-
PartnerCenterModule/PartnerCenterPartner.psm1 | 58 ++++++++-
.../PartnerCenterProfiles.psm1 | 28 ++---
.../PartnerCenterServiceRequest.psm1 | 31 ++++-
.../PartnerCenterSubscription.psm1 | 7 +-
.../PartnerCenterTelemetry.psm1 | 67 -----------
PartnerCenterModule/PartnerCenterUsage.psm1 | 60 ++++++++--
PartnerCenterModule/PartnerCenterUser.psm1 | 36 ++++--
PartnerCenterModule/commons.ps1 | 8 +-
README.md | 44 +++----
93 files changed, 1124 insertions(+), 655 deletions(-)
create mode 100644 CmdletHelp/Get-PCAuditRecord.md
create mode 100644 CmdletHelp/Get-PCCustomerLicenseDeployment.md
create mode 100644 CmdletHelp/Get-PCCustomerLicenseUsage.md
create mode 100644 CmdletHelp/Get-PCCustomerRelationship.md
create mode 100644 CmdletHelp/Get-PCIndirectReseller.md
create mode 100644 CmdletHelp/Get-PCInvoiceLineItem.md
create mode 100644 CmdletHelp/Get-PCLicenseDeployment.md
create mode 100644 CmdletHelp/Get-PCLicenseUsage.md
create mode 100644 CmdletHelp/Get-PCManagedService.md
create mode 100644 CmdletHelp/Get-PCResellerCustomer.md
create mode 100644 CmdletHelp/Get-PCSRTopic.md
create mode 100644 CmdletHelp/Get-PCSubscribedSKU.md
delete mode 100644 PartnerCenterModule/PartnerCenterTelemetry.psm1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c4554e9..fceb91b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,14 +1,27 @@
# Partner Center PowerShell Module Changelog
-## 0.9.0.20 (2018-05-14)
+## 0.9.0.21 (2018-05-22)
### Features
-* No new features were added
+* Removed telemetry functions
+* Added non-plural cmdlets names to comply with PowerShell standards
+ * Get-PCAuditRecord
+ * Get-PCCustomerLicenseDeployment
+ * Get-PCCustomerLicenseUsage
+ * Get-PCCustomerRelationship
+ * Get-PCIndirectReseller
+ * Get-PCLicenseUsage
+ * Get-PCLicenseDeployment
+ * Get-PCManagedSerice
+ * Get-PCResellerCustomer
+ * Get-PCSRTopic
+ * Get-PCSubscribedSKU
### Bug Fixes
* Addressed an issue with the New-PCCustomer cmdlet that was preventing customers currently.
+* Addressed an issue where Get-PCOfferCategoriesByMarket did not require the countryId, however the API does require this.
### Breaking Changes
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3461595..16dc30f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -11,32 +11,32 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
-- [Code of Conduct](#coc)
-- [Issues and Bugs](#issue)
-- [Feature Requests](#feature)
-- [Submission Guidelines](#submit)
+- [Code of Conduct](#code-of-conduct)
+- [Issues and Bugs](#finding-issues)
+- [Feature Requests](#requesting-features)
+- [Submission Guidelines](#submission-guidelines)
-## Code of Conduct
+## Code of Conduct
Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
-## Found an Issue?
+## Finding Issues
If you find a bug in the source code or a mistake in the documentation, you can help us by
-[submitting an issue](#submit-issue) to the GitHub Repository. Even better, you can
-[submit a Pull Request](#submit-pr) with a fix.
+[submitting an issue](#submitting-an-issue) to the GitHub Repository. Even better, you can
+[submit a Pull Request](#submitting-a-pull-request) with a fix.
-## Want a Feature?
+## Requesting Features
-You can *request* a new feature by [submitting an issue](#submit-issue) to the GitHub
+You can *request* a new feature by [submitting an issue](#submitting-an-issue) to the GitHub
Repository. If you would like to *implement* a new feature, please submit an issue with
a proposal for your work first, to be sure that we can use it.
-**Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
+**Small Features** can be crafted and directly [submitted as a Pull Request](#submitting-a-pull-request).
-## Submission Guidelines
+## Submission Guidelines
-### Submitting an Issue
+### Submitting an Issue
Before you submit an issue, search the archive, maybe your question was already answered.
@@ -54,13 +54,13 @@ chances of your issue being dealt with quickly:
- **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
causing the problem (line of code or commit)
-You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/Microsoft/PartnerCenterPowerShellModule/issues/new.
+You can file new issues by providing the above information at the [corresponding repository's issues link](https://github.com/Microsoft/PartnerCenterPowerShellModule/issues/new).
-### Submitting a Pull Request (PR)
+### Submitting a Pull Request
Before you submit your Pull Request (PR) consider the following guidelines:
-- Search the repository (https://github.com/Microsoft/PartnerCenterPowerShellModule/pulls) for an open or closed PR
+- [Search the repository](https://github.com/Microsoft/PartnerCenterPowerShellModule/pulls) for an open or closed PR
that relates to your submission. You don't want to duplicate effort.
- Make your changes in a new git fork:
diff --git a/CmdletHelp/Add-PCAuthentication.md b/CmdletHelp/Add-PCAuthentication.md
index a066958..f499bdc 100644
--- a/CmdletHelp/Add-PCAuthentication.md
+++ b/CmdletHelp/Add-PCAuthentication.md
@@ -1,18 +1,18 @@
-# Partner Center PowerShell Module (preview) #
+# Add-PCAuthentication #
-## Add-PCAuthentication ##
+## Set a global token for the script session - user authentication ##
-**Set a global token for the script session - user authentication**
+```powershell
+ $cred = Get-Credential
+ Add-PCAuthentication -cspappID '' -cspDomain '' -credential $cred
+```
- $credential = Get-Credential
-
- Add-PCAuthentication -cspappID '' -cspDomain '' -credential $credential
-
-**Set a global token for the script session - app authentication**
+## Set a global token for the script session - app authentication ##
+```powershell
$clientSecret = ''
- $clientSecretSecure = $clientSecret | ConvertTo-SecureString -AsPlainText -Force
-
- Add-PCAuthentication -cspappID '' -cspDomain '' -cspClientSecret $clientSecretSecure
+ $clientSecretSecure = $clientSecret | ConvertTo-SecureString -AsPlainText -Force
+ Add-PCAuthentication -cspappID '' -cspDomain '' -cspClientSecret $clientSecretSecure
+```
You can obtain the Web App ID and the Client Secret from either Partner Center UI or Azure Active Directory
diff --git a/CmdletHelp/Add-PCCustomerRoleMember.md b/CmdletHelp/Add-PCCustomerRoleMember.md
index 3c60d5c..086455c 100644
--- a/CmdletHelp/Add-PCCustomerRoleMember.md
+++ b/CmdletHelp/Add-PCCustomerRoleMember.md
@@ -1,23 +1,27 @@
-# Partner Center PowerShell Module (preview) #
+# Add-PCCustomerRoleMember #
-## Add-PCCustomerRoleMember ##
-
-**Get a customer**
+## Specify a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get a role**
+## Get a role ##
+```powershell
$role = Get-PCCustomerRole -tenantid $customer.id | Where-Object name -Contains ''
+```
-**Get a User**
+## Get a User ##
+```powershell
$user = Get-PCCustomerUser -tenantid $customer.id -userid ''
+```
-**Add a User to a Role**
+## Add a User to a Role ##
+```powershell
$customerRoleMember = [DirectoryRoleMember]::new()
$customerRoleMember.id = $user.id
Add-PCCustomerRoleMember -tenantid $customer.id -roleid $role.id -customerrolemember $customerRoleMember
-
-
+```
diff --git a/CmdletHelp/Get-PCAddressRulesByMarket.md b/CmdletHelp/Get-PCAddressRulesByMarket.md
index 5515540..36d872d 100644
--- a/CmdletHelp/Get-PCAddressRulesByMarket.md
+++ b/CmdletHelp/Get-PCAddressRulesByMarket.md
@@ -1,9 +1,7 @@
-# Partner Center PowerShell Module (preview) #
-
-## Get-PCAddressRulesByMarket ##
-
-**Get all address rules for countryid**
-
- Get-PCAddressRulesByMarket -countryid ''
+# Get-PCAddressRulesByMarket #
+## Get all address rules for countryid ##
+```powershell
+ Get-PCAddressRulesByMarket -countryid ''
+```
diff --git a/CmdletHelp/Get-PCAuditRecord.md b/CmdletHelp/Get-PCAuditRecord.md
new file mode 100644
index 0000000..57aae7c
--- /dev/null
+++ b/CmdletHelp/Get-PCAuditRecord.md
@@ -0,0 +1,19 @@
+# Get-PCAuditRecord #
+
+## Get audit logs starting from a specific date ##
+
+```powershell
+ Get-PCAuditRecord -startDate '2017-04-12'
+```
+
+## Get audit logs between two dates ##
+
+```powershell
+ Gett-PCAuditRecord -startDate '2017-04-12' -endDate '2017-04-13'
+```
+
+## Get audit logs of a specific operationType between two dates ##
+
+```powershell
+ Get-PCAuditRecord -startDate '2017-04-12' -endDate '2017-04-13' | ? operationType -EQ 'delete_customer_user'
+```
diff --git a/CmdletHelp/Get-PCAuditRecords.md b/CmdletHelp/Get-PCAuditRecords.md
index 918b007..a755588 100644
--- a/CmdletHelp/Get-PCAuditRecords.md
+++ b/CmdletHelp/Get-PCAuditRecords.md
@@ -1,17 +1,21 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCAuditRecords #
-## Get-PCAuditRecords ##
+## Deprecated: Please use Get-PCAuditRecord ##
-**Get audit logs starting from a specific date**
+## Get audit logs starting from a specific date ##
+```powershell
Get-PCAuditRecords -startDate '2017-04-12'
+```
-**Get audit logs between two dates**
+## Get audit logs between two dates ##
+```powershell
Gett-PCAuditRecords -startDate '2017-04-12' -endDate '2017-04-13'
+```
-**Get audit logs of a specific operationType between two dates**
+## Get audit logs of a specific operationType between two dates ##
+```powershell
Get-PCAuditRecords -startDate '2017-04-12' -endDate '2017-04-13' | ? operationType -EQ 'delete_customer_user'
-
-
+```
diff --git a/CmdletHelp/Get-PCAzureRateCard.md b/CmdletHelp/Get-PCAzureRateCard.md
index 52e0555..81b751a 100644
--- a/CmdletHelp/Get-PCAzureRateCard.md
+++ b/CmdletHelp/Get-PCAzureRateCard.md
@@ -1,13 +1,16 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCAzureRateCard #
-## Get-PCAzureRateCard ##
+## Get Azure rate card (meters) for default context ##
-**Get azure rate card (meters) for default context**
+```powershell
+ Get-PCAzureRateCard
+```
- Get-PCAzureRateCard
+- **currency** Optional three letter ISO code for the currency in which the resource rates will be provided (e.g. "EUR"). The default is the currency associated with the market in the partner profile.
+- **region** Optional two-letter ISO country/region code that indicates the market where the offer is purchased (e.g. "FR"). The default is the country/region code set in the partner profile.
-**Get azure rate card for specific currency and region**
+## Get Azure rate card for specific currency and region ##
+```powershell
Get-PCAzureRateCard -currency '' -region ''
-
-
+```
diff --git a/CmdletHelp/Get-PCBillingProfile.md b/CmdletHelp/Get-PCBillingProfile.md
index bb960c4..6b0dff6 100644
--- a/CmdletHelp/Get-PCBillingProfile.md
+++ b/CmdletHelp/Get-PCBillingProfile.md
@@ -1,9 +1,7 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCBillingProfile #
-## Get-PCBillingProfile ##
-
-**Get Partner Billing Profile**
+## Get Partner Billing Profile ##
+```powershell
Get-PCBillingProfile
-
-
+```
diff --git a/CmdletHelp/Get-PCCustomer.md b/CmdletHelp/Get-PCCustomer.md
index 7443308..dfb2dc5 100644
--- a/CmdletHelp/Get-PCCustomer.md
+++ b/CmdletHelp/Get-PCCustomer.md
@@ -1,18 +1,19 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomer #
-## Get-PCCustomer ##
-
-
-**Get all customers**
+## Get all customers ##
+```powershell
Get-PCCustomer -all
+```
-**Get a customer by ID**
+## Get a customer by ID ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get customers by company name**
+## Get customers by company name ##
+```powershell
Get-PCCustomer -startswith ''
-
-
+```
diff --git a/CmdletHelp/Get-PCCustomerBillingProfile.md b/CmdletHelp/Get-PCCustomerBillingProfile.md
index 6b01ca8..e066ab0 100644
--- a/CmdletHelp/Get-PCCustomerBillingProfile.md
+++ b/CmdletHelp/Get-PCCustomerBillingProfile.md
@@ -1,13 +1,13 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomerBillingProfile #
-## Get-PCCustomerBillingProfile ##
-
-**Get a customer**
+## Get a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get customer Billing Profile**
+## Get customer billing profile ##
+```powershell
Get-PCCustomerBillingProfile -tenantid $customer.id
-
-
+```
diff --git a/CmdletHelp/Get-PCCustomerCompanyProfile.md b/CmdletHelp/Get-PCCustomerCompanyProfile.md
index 932a270..571cdf5 100644
--- a/CmdletHelp/Get-PCCustomerCompanyProfile.md
+++ b/CmdletHelp/Get-PCCustomerCompanyProfile.md
@@ -1,13 +1,13 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomerCompanyProfile #
-## Get-PCCustomerCompanyProfile ##
-
-**Get a customer**
+## Specify a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get customer Company Profile**
+## Get customer company profile ##
+```powershell
Get-PCCustomerCompanyProfile -tenantid $customer.id
-
-
+```
diff --git a/CmdletHelp/Get-PCCustomerLicenseDeployment.md b/CmdletHelp/Get-PCCustomerLicenseDeployment.md
new file mode 100644
index 0000000..d37ffe2
--- /dev/null
+++ b/CmdletHelp/Get-PCCustomerLicenseDeployment.md
@@ -0,0 +1,15 @@
+# Get-PCCustomerLicenseDeployment #
+
+This cmdlet requires App+User authentication
+
+## Specify a customer ##
+
+```powershell
+ $customer = Get-PCCustomer -tenantid ''
+```
+
+## Get customer licenses deployment information ##
+
+```powershell
+ Get-PCCustomerLicenseDeployment -tenantid $customer.id
+```
diff --git a/CmdletHelp/Get-PCCustomerLicenseUsage.md b/CmdletHelp/Get-PCCustomerLicenseUsage.md
new file mode 100644
index 0000000..c8e1c2b
--- /dev/null
+++ b/CmdletHelp/Get-PCCustomerLicenseUsage.md
@@ -0,0 +1,15 @@
+# Get-PCCustomerLicenseUsage #
+
+This cmdlet requires App+User authentication
+
+## Specify a customer ##
+
+```powershell
+ $customer = Get-PCCustomer -tenantid ''
+```
+
+## Get customer license usage information ##
+
+```powershell
+ Get-PCCustomerLicenseUsage -tenantid $customer.id
+```
diff --git a/CmdletHelp/Get-PCCustomerLicensesDeployment.md b/CmdletHelp/Get-PCCustomerLicensesDeployment.md
index 3678d3a..eebb11c 100644
--- a/CmdletHelp/Get-PCCustomerLicensesDeployment.md
+++ b/CmdletHelp/Get-PCCustomerLicensesDeployment.md
@@ -1,13 +1,15 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomerLicensesDeployment #
-## Get-PCCustomerLicensesDeployment ##
+## Deprecated: Use Get-PCCustomerLicenseDeployment instead ##
-**Get a customer**
+## Specify a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get customer licenses deployment information**
+## Get customer licenses deployment information ##
+```powershell
Get-PCCustomerLicensesDeployment -tenantid $customer.id
-
-
+```
diff --git a/CmdletHelp/Get-PCCustomerLicensesUsage.md b/CmdletHelp/Get-PCCustomerLicensesUsage.md
index 12131e8..bf43acb 100644
--- a/CmdletHelp/Get-PCCustomerLicensesUsage.md
+++ b/CmdletHelp/Get-PCCustomerLicensesUsage.md
@@ -1,13 +1,15 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomerLicensesUsage #
-## Get-PCCustomerLicensesUsage ##
+## Deprecated: Please use Get-PCCustomerLicenseUsage instead ##
-**Get a customer**
+## Specify a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get customer licenses usage information**
+## Get customer licenses usage information ##
+```powershell
Get-PCCustomerLicensesUsage -tenantid $customer.id
-
-
+```
diff --git a/CmdletHelp/Get-PCCustomerRelationship.md b/CmdletHelp/Get-PCCustomerRelationship.md
new file mode 100644
index 0000000..cadfe7b
--- /dev/null
+++ b/CmdletHelp/Get-PCCustomerRelationship.md
@@ -0,0 +1,13 @@
+# Get-PCCustomerRelationship (indirect model only) #
+
+## Specify a customer ##
+
+```powershell
+ $customer = Get-PCCustomer -tenantid ''
+```
+
+## Get all customer subscriptions ##
+
+```powershell
+ Get-PCCustomerRelationship -tenantid $customer.id
+```
diff --git a/CmdletHelp/Get-PCCustomerRelationships.md b/CmdletHelp/Get-PCCustomerRelationships.md
index 8c68624..15b79a0 100644
--- a/CmdletHelp/Get-PCCustomerRelationships.md
+++ b/CmdletHelp/Get-PCCustomerRelationships.md
@@ -1,13 +1,15 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomerRelationships (indirect model only) #
-## Get-PCCustomerRelationships (indirect model only)##
+## Deprecated: Please use Get-PCCustomerRelationship instead ##
-**Get a customer**
+## Specify a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get all customer subscriptions**
+## Get all customer subscriptions ##
+```powershell
Get-PCCustomerRelationships -tenantid $customer.id
-
-
+```
diff --git a/CmdletHelp/Get-PCCustomerRole.md b/CmdletHelp/Get-PCCustomerRole.md
index 7e99a8e..67f65e3 100644
--- a/CmdletHelp/Get-PCCustomerRole.md
+++ b/CmdletHelp/Get-PCCustomerRole.md
@@ -1,13 +1,13 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomerRole #
-## Get-PCCustomerRole ##
-
-**Get a customer**
+## Specify a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get customer roles**
+## Get customer roles ##
+```powershell
Get-PCCustomerRole -tenantid $customer.id
-
-
+```
diff --git a/CmdletHelp/Get-PCCustomerRoleMember.md b/CmdletHelp/Get-PCCustomerRoleMember.md
index 0326743..6225934 100644
--- a/CmdletHelp/Get-PCCustomerRoleMember.md
+++ b/CmdletHelp/Get-PCCustomerRoleMember.md
@@ -1,17 +1,19 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomerRoleMember #
-## Get-PCCustomerRoleMember ##
-
-**Get a customer**
+## Specify a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get customer role**
+## Get customer role ##
- $role = Get-PCCustomerRole -tenantid $customer.id | Where-Object Name -EQ ''
+```powershell
+ $role = Get-PCCustomerRole -tenantid $customer.id | Where-Object Name -EQ ''
+```
-**Get customer user roles**
+## Get customer user roles ##
+```powershell
Get-PCCustomerRoleMember -tenantid $customer.id -roleid $role.id
-
-
+```
diff --git a/CmdletHelp/Get-PCCustomerServiceCostSummary.md b/CmdletHelp/Get-PCCustomerServiceCostSummary.md
index 6359495..a01709e 100644
--- a/CmdletHelp/Get-PCCustomerServiceCostSummary.md
+++ b/CmdletHelp/Get-PCCustomerServiceCostSummary.md
@@ -1,14 +1,15 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomerServiceCostSummary #
-## Get-PCCustomerServiceCostSummary ##
-
-**Select a customer**
+## Select a customer ##
+```powershell
Select-PCCustomer -tenantid ''
+```
-**Get customer Service Cost Summary**
+## Get customer Service Cost Summary ##
+```powershell
Get-PCCustomerServiceCostSummary -BillingPeriod MostRecent
+```
- > Other BillingPeriod type will be available in next release
-
+ > Other BillingPeriod type will be available in a future release
diff --git a/CmdletHelp/Get-PCCustomerUsageSummary.md b/CmdletHelp/Get-PCCustomerUsageSummary.md
index f895c3b..9ba1fbf 100644
--- a/CmdletHelp/Get-PCCustomerUsageSummary.md
+++ b/CmdletHelp/Get-PCCustomerUsageSummary.md
@@ -1,12 +1,13 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomerUsageSummary #
-## Get-PCCustomerUsageSummary ##
+## Select a customer ##
-**Get a customer**
+```powershell
+ Select-PCCustomer -tenantid ''
+```
- $customer = Get-PCCustomer -tenantid ''
-
-**Get usage summary for all of a customer's subscriptions**
+## Get usage summary for all of a customer's subscriptions ##
+```powershell
Get-PCCustomerUsageSummary -tenantid $customer.id
-
+```
diff --git a/CmdletHelp/Get-PCCustomerUser.md b/CmdletHelp/Get-PCCustomerUser.md
index 87ada70..a69e584 100644
--- a/CmdletHelp/Get-PCCustomerUser.md
+++ b/CmdletHelp/Get-PCCustomerUser.md
@@ -1,24 +1,25 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomerUser #
-## Get-PCCustomerUser ##
-
-**Get a customer**
-
- $customer = Get-PCCustomer -tenantid ''
-
-**Get all customer users**
+## Get all customer users ##
+```powershell
Get-PCCustomerUser -tenantid $customer.id -all
+```
-**Get customer user**
+## Get customer user ##
+```powershell
$user = Get-PCCustomerUser -tenantid $customer.id -userid ''
+```
-**Get customer user assigned licenses**
+## Get customer user assigned licenses ##
+```powershell
Get-PCCustomerUser -tenantid $customer.id -userid $user.id -licenses
+```
-**Get customer deleted users**
+## Get customer deleted users ##
+```powershell
Get-PCCustomerUser -tenantid $customer.id -deleted
-
+```
diff --git a/CmdletHelp/Get-PCCustomerUserRole.md b/CmdletHelp/Get-PCCustomerUserRole.md
index 22a31d5..5d9a944 100644
--- a/CmdletHelp/Get-PCCustomerUserRole.md
+++ b/CmdletHelp/Get-PCCustomerUserRole.md
@@ -1,16 +1,19 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCCustomerUserRole #
-## Get-PCCustomerUserRole ##
+## Select a customer ##
-**Get a customer**
+```powershell
+ Select-PCCustomer -tenantid ''
+```
- $customer = Get-PCCustomer -tenantid ''
-
-**Get customer user**
+## Get customer user ##
+```powershell
$user = Get-PCCustomerUser -tenantid $customer.id -userid ''
+```
-**Get customer user roles**
+## Get customer user roles ##
+```powershell
Get-PCCustomerUserRole -tenantid $customer.id -user $user
-
+```
diff --git a/CmdletHelp/Get-PCDomainAvailability.md b/CmdletHelp/Get-PCDomainAvailability.md
index 0d06c18..d365c27 100644
--- a/CmdletHelp/Get-PCDomainAvailability.md
+++ b/CmdletHelp/Get-PCDomainAvailability.md
@@ -1,10 +1,9 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCDomainAvailability #
-## Get-PCDomainAvailability ##
-
-**Check if domain is available to use on new customer**
+## Check if domain is available to use on new customer ##
+```powershell
$domainname = ''
$domain = $domainname+'.onmicrosoft.com'
Get-PCDomainAvailability -domain $domain
-
+```
diff --git a/CmdletHelp/Get-PCIndirectReseller.md b/CmdletHelp/Get-PCIndirectReseller.md
new file mode 100644
index 0000000..aca29ad
--- /dev/null
+++ b/CmdletHelp/Get-PCIndirectReseller.md
@@ -0,0 +1,7 @@
+# Get-PCIndirectReseller (indirect model only) #
+
+## Get all indirect resellers ##
+
+```powershell
+ Get-PCIndirectReseller
+```
diff --git a/CmdletHelp/Get-PCIndirectResellers.md b/CmdletHelp/Get-PCIndirectResellers.md
index 2ab4a82..57b069f 100644
--- a/CmdletHelp/Get-PCIndirectResellers.md
+++ b/CmdletHelp/Get-PCIndirectResellers.md
@@ -1,9 +1,9 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCIndirectResellers (indirect model only) #
-## Get-PCIndirectResellers (indirect model only) ##
+## Deprecated: Please use Get-PCIndirectReseller ##
+## Get all indirect resellers ##
-**Get all indirect resellers**
-
+```powershell
Get-PCIndirectResellers
-
+```
diff --git a/CmdletHelp/Get-PCInvoice.md b/CmdletHelp/Get-PCInvoice.md
index 7168430..ee64841 100644
--- a/CmdletHelp/Get-PCInvoice.md
+++ b/CmdletHelp/Get-PCInvoice.md
@@ -1,16 +1,19 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCInvoice #
-## Get-PCInvoice ##
-
-**Get current payable amount**
+## Get current payable amount ##
+```powershell
Get-PCInvoice -summary
+```
-**Get all invoices**
+## Get all invoices ##
+```powershell
Get-PCInvoice -all
+```
-**Get an invoice**
+## Get an invoice ##
+```powershell
$invoice = Get-PCInvoice -invoiceid ''
-
+```
diff --git a/CmdletHelp/Get-PCInvoiceLineItem.md b/CmdletHelp/Get-PCInvoiceLineItem.md
new file mode 100644
index 0000000..5bcc999
--- /dev/null
+++ b/CmdletHelp/Get-PCInvoiceLineItem.md
@@ -0,0 +1,13 @@
+# Get-PCInvoiceLineItem #
+
+## Get an invoice ##
+
+```powershell
+ $invoice = Get-PCInvoice -invoiceid ''
+```
+
+## Get an invoice line item ##
+
+```powershell
+ Get-PCInvoiceLineItem -invoiceid $invoice.id -billingprovider '' -invoicelineitemtype ''
+```
diff --git a/CmdletHelp/Get-PCInvoiceLineItems.md b/CmdletHelp/Get-PCInvoiceLineItems.md
index a07a427..8ccfc13 100644
--- a/CmdletHelp/Get-PCInvoiceLineItems.md
+++ b/CmdletHelp/Get-PCInvoiceLineItems.md
@@ -1,12 +1,15 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCInvoiceLineItems #
-## Get-PCInvoiceLineItems ##
+## Deprecated: Use Get-PCInvoiceLineItem instead ##
-**Get an invoice**
+## Get an invoice ##
+```powershell
$invoice = Get-PCInvoice -invoiceid ''
+```
-**Get an invoice line items**
+## Get an invoice line item ##
+```powershell
Get-PCInvoiceLineItems -invoiceid $invoice.id -billingprovider '' -invoicelineitemtype ''
-
+```
diff --git a/CmdletHelp/Get-PCLegalBusinessProfile.md b/CmdletHelp/Get-PCLegalBusinessProfile.md
index 254f046..302fd50 100644
--- a/CmdletHelp/Get-PCLegalBusinessProfile.md
+++ b/CmdletHelp/Get-PCLegalBusinessProfile.md
@@ -1,8 +1,7 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCLegalBusinessProfile #
-## Get-PCLegalBusinessProfile ##
-
-**Get Partner Legal Business Profile**
+## Get Partner Legal Business Profile ##
+```powershell
Get-PCLegalBusinessProfile
-
+```
diff --git a/CmdletHelp/Get-PCLicenseDeployment.md b/CmdletHelp/Get-PCLicenseDeployment.md
new file mode 100644
index 0000000..ee6b687
--- /dev/null
+++ b/CmdletHelp/Get-PCLicenseDeployment.md
@@ -0,0 +1,7 @@
+# Get-PCLicenseDeployment #
+
+## Get partner license deployment information ##
+
+```powershell
+ Get-PCLicenseDeployment
+```
diff --git a/CmdletHelp/Get-PCLicenseUsage.md b/CmdletHelp/Get-PCLicenseUsage.md
new file mode 100644
index 0000000..3ac29cf
--- /dev/null
+++ b/CmdletHelp/Get-PCLicenseUsage.md
@@ -0,0 +1,7 @@
+# Get-PCLicenseUsage #
+
+## Get partner license usage information ##
+
+```powershell
+ Get-PCLicenseUsage
+```
diff --git a/CmdletHelp/Get-PCLicensesDeployment.md b/CmdletHelp/Get-PCLicensesDeployment.md
index e501dd4..84abac4 100644
--- a/CmdletHelp/Get-PCLicensesDeployment.md
+++ b/CmdletHelp/Get-PCLicensesDeployment.md
@@ -1,8 +1,9 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCLicensesDeployment #
-## Get-PCLicensesDeployment ##
+## Deprecated: Use Get-PCLicenseDeployment instead ##
-**Get partner licenses deployment information**
+## Get partner licenses deployment information ##
+```powershell
Get-PCLicensesDeployment
-
+```
diff --git a/CmdletHelp/Get-PCLicensesUsage.md b/CmdletHelp/Get-PCLicensesUsage.md
index 4c72dd8..2f4c5f3 100644
--- a/CmdletHelp/Get-PCLicensesUsage.md
+++ b/CmdletHelp/Get-PCLicensesUsage.md
@@ -1,8 +1,9 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCLicensesUsage #
-## Get-PCLicensesUsage ##
+## Deprecated: Use Get-PCLicenseUsage instead ##
-**Get partner licenses usage information**
+## Get partner licenses usage information ##
+```powershell
Get-PCLicensesUsage
-
+```
diff --git a/CmdletHelp/Get-PCManagedService.md b/CmdletHelp/Get-PCManagedService.md
new file mode 100644
index 0000000..84251eb
--- /dev/null
+++ b/CmdletHelp/Get-PCManagedService.md
@@ -0,0 +1,13 @@
+# Get-PCManagedService #
+
+## Select a customer ##
+
+```powershell
+ Select-PCCustomer -tenantid ''
+```
+
+## Get all managed services for specified customer ##
+
+```powershell
+ Get-PCManagedService -tenantid $customer.id
+```
diff --git a/CmdletHelp/Get-PCManagedServices.md b/CmdletHelp/Get-PCManagedServices.md
index cc9a1ce..7509e7c 100644
--- a/CmdletHelp/Get-PCManagedServices.md
+++ b/CmdletHelp/Get-PCManagedServices.md
@@ -1,12 +1,15 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCManagedServices #
-## Get-PCManagedServices ##
+## Deprecated: Use Get-PCManagedService instead ##
-**Get a customer**
+## Select a customer ##
- $customer = Get-PCCustomer -tenantid ''
+```powershell
+ Select-PCCustomer -tenantid ''
+```
-**Get all managed services for customer**
+## Get all managed services for customer ##
+```powershell
Get-PCManagedServices -tenantid $customer.id
-
+```
diff --git a/CmdletHelp/Get-PCMpnProfile.md b/CmdletHelp/Get-PCMpnProfile.md
index 27f1ce6..14d8eea 100644
--- a/CmdletHelp/Get-PCMpnProfile.md
+++ b/CmdletHelp/Get-PCMpnProfile.md
@@ -1,12 +1,13 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCMpnProfile #
-## Get-PCMpnProfile ##
-
-**Get Partner MPN Profile**
+## Get Partner MPN Profile ##
+```powershell
Get-PCMpnProfile
+```
-**Get a Partner MPN Profile by MPNID**
+## Get a Partner MPN Profile by MPNID ##
+```powershell
Get-PCMpnProfile -mpnid
-
+```
diff --git a/CmdletHelp/Get-PCOffer.md b/CmdletHelp/Get-PCOffer.md
index 7e727d1..59a5f1b 100644
--- a/CmdletHelp/Get-PCOffer.md
+++ b/CmdletHelp/Get-PCOffer.md
@@ -1,21 +1,25 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCOffer #
-## Get-PCOffer ##
+## Get all offer details for countryId ##
-**Get all Offers details for countryid**
+```powershell
+ Get-PCOffer -countryId ''
+```
- Get-PCOffer -countryid ''
+## Get a specific offer ##
-**Get a specific Offer**
+```powershell
+ Get-PCOffer -countryId '' -offerId ''
+```
- Get-PCOffer -countryid '' -offerid ''
+## Get all offer details for countryId and localeId ##
-**Get all Offers details for countryid and localeid**
-
- Get-PCOffer -countryid '' -localeid ''
-
-**Get addons for a specific Offer**
-
- Get-PCOffer -countryid '' -offerid '' -addons
+```powershell
+ Get-PCOffer -countryId '' -localeId ''
+```
+## Get addons for a specific offer ##
+```powershell
+ Get-PCOffer -countryId '' -offerId '' -addOns
+```
diff --git a/CmdletHelp/Get-PCOfferCategoriesByMarket.md b/CmdletHelp/Get-PCOfferCategoriesByMarket.md
index f63ef56..8322c41 100644
--- a/CmdletHelp/Get-PCOfferCategoriesByMarket.md
+++ b/CmdletHelp/Get-PCOfferCategoriesByMarket.md
@@ -1,8 +1,7 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCOfferCategoriesByMarket #
-## Get-PCOfferCategoriesByMarket ##
-
-**Get all Offers Categories for countryid**
-
- Get-PCOfferCategoriesByMarket -countryid ''
+## Get all Offers Categories for countryid ##
+```powershell
+ Get-PCOfferCategoriesByMarket -countryid ''
+```
diff --git a/CmdletHelp/Get-PCOrder.md b/CmdletHelp/Get-PCOrder.md
index 1aa50fc..fa166ad 100644
--- a/CmdletHelp/Get-PCOrder.md
+++ b/CmdletHelp/Get-PCOrder.md
@@ -1,16 +1,19 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCOrder #
-## Get-PCOrder ##
+## Select a customer ##
-**Get a customer**
+```powershell
+ Select-PCCustomer -tenantid ''
+```
- $customer = Get-PCCustomer -tenantid ''
-
-**Get customer orders**
+## Get customer orders ##
+```powershell
Get-PCOrder -tenantid $customer.id
+```
-**Get a customer order**
+## Get a customer order ##
+```powershell
Get-PCOrder -tenantid $customer.id -orderid ''
-
+```
diff --git a/CmdletHelp/Get-PCOrganizationProfile.md b/CmdletHelp/Get-PCOrganizationProfile.md
index 7cfb054..5f52a2d 100644
--- a/CmdletHelp/Get-PCOrganizationProfile.md
+++ b/CmdletHelp/Get-PCOrganizationProfile.md
@@ -1,8 +1,7 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCOrganizationProfile #
-## Get-PCOrganizationProfile ##
-
-**Get Partner Organization Profile**
+## Get Partner Organization Profile ##
+```powershell
Get-PCOrganizationProfile
-
+```
diff --git a/CmdletHelp/Get-PCResellerCustomer.md b/CmdletHelp/Get-PCResellerCustomer.md
new file mode 100644
index 0000000..865ef02
--- /dev/null
+++ b/CmdletHelp/Get-PCResellerCustomer.md
@@ -0,0 +1,7 @@
+# Get-PCResellerCustomer (indirect model only) #
+
+## Get all indirect resellers ##
+
+```powershell
+ Get-PCResellerCustomer -resellerId ''
+```
diff --git a/CmdletHelp/Get-PCResellerCustomers.md b/CmdletHelp/Get-PCResellerCustomers.md
index 8fefc22..7583a23 100644
--- a/CmdletHelp/Get-PCResellerCustomers.md
+++ b/CmdletHelp/Get-PCResellerCustomers.md
@@ -1,9 +1,9 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCResellerCustomers (indirect model only) #
-## Get-PCResellerCustomers (indirect model only) ##
+## Deprecated: Use Get-PCResellerCustomer instead ##
+## Get all indirect resellers ##
-**Get all indirect resellers**
-
+```powershell
Get-PCResellerCustomers -resellerId ''
-
+```
diff --git a/CmdletHelp/Get-PCSR.md b/CmdletHelp/Get-PCSR.md
index 280fb94..c018f5e 100644
--- a/CmdletHelp/Get-PCSR.md
+++ b/CmdletHelp/Get-PCSR.md
@@ -1,16 +1,19 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCSR #
-## Get-PCSR ##
+## Get all service requests ##
-**Get all Service Requests**
+```powershell
+ Get-PCSR -all
+```
- Get-PCSR -all
-
-**Get a specific Service Request**
+## Get a specific service request ##
+```powershell
Get-PCSR -srid ''
+```
-**Get all customer Service Requests**
+## Get all customer service requests ##
+```powershell
Get-PCSR -tenantid ''
-
+```
diff --git a/CmdletHelp/Get-PCSRTopic.md b/CmdletHelp/Get-PCSRTopic.md
new file mode 100644
index 0000000..322f1e6
--- /dev/null
+++ b/CmdletHelp/Get-PCSRTopic.md
@@ -0,0 +1,9 @@
+# Get-PCSRTopic #
+
+This cmdlet requires App+User authentication
+
+## Get all topics available for Service Requests ##
+
+```powershell
+ Get-PCSRTopic
+```
diff --git a/CmdletHelp/Get-PCSRTopics.md b/CmdletHelp/Get-PCSRTopics.md
index 4143b38..f76e655 100644
--- a/CmdletHelp/Get-PCSRTopics.md
+++ b/CmdletHelp/Get-PCSRTopics.md
@@ -1,9 +1,9 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCSRTopics #
-## Get-PCSRTopics ##
-
-**Get all topics available for Service Requests**
-
- Get-PCSRTopics
+## Deprecated: Use Get-PCSRTopic instead ##
+## Get all topics available for Service Requests ##
+```powershell
+ Get-PCSRTopics
+```
diff --git a/CmdletHelp/Get-PCSubscribedSKU.md b/CmdletHelp/Get-PCSubscribedSKU.md
new file mode 100644
index 0000000..974b761
--- /dev/null
+++ b/CmdletHelp/Get-PCSubscribedSKU.md
@@ -0,0 +1,13 @@
+# Get-PCSubscribedSKU #
+
+## Specify a customer ##
+
+```powershell
+ $customer = Get-PCCustomer -tenantid ''
+```
+
+## Get a list of available licenses ##
+
+```powershell
+ Get-PCSubscribedSKU -tenantid $customer.id
+```
diff --git a/CmdletHelp/Get-PCSubscribedSKUs.md b/CmdletHelp/Get-PCSubscribedSKUs.md
index cc6d601..685b8a7 100644
--- a/CmdletHelp/Get-PCSubscribedSKUs.md
+++ b/CmdletHelp/Get-PCSubscribedSKUs.md
@@ -1,13 +1,15 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCSubscribedSKUs #
-## Get-PCSubscribedSKUs ##
+## Deprecated: Use Get-PCSubscribedSKU instead ##
-**Get a customer**
+## Specify a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get a list of available licenses**
+## Get a list of available licenses ##
+```powershell
Get-PCSubscribedSKUs -tenantid $customer.id
-
-
+```
diff --git a/CmdletHelp/Get-PCSubscription.md b/CmdletHelp/Get-PCSubscription.md
index 52e010f..c2add5b 100644
--- a/CmdletHelp/Get-PCSubscription.md
+++ b/CmdletHelp/Get-PCSubscription.md
@@ -1,24 +1,31 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCSubscription #
-## Get-PCSubscription ##
-
-**Get a customer**
+## Get a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get all customer subscriptions**
+## Get all customer subscriptions ##
+```powershell
Get-PCSubscription -tenantid $customer.id -all
+```
-**Get a customer subscription**
+## Get a customer subscription ##
+```powershell
Get-PCSubscription -tenantid $customer.id -subscriptionid ''
+```
-**Get all customer subscriptions from an order**
+## Get all customer subscriptions from an order ##
+```powershell
Get-PCSubscription -tenantid $customer.id -orderid ''
+```
-**Get all customer subscriptions from a reseller (available only for Distributor CSP Account)**
+## Get all customer subscriptions from a reseller (available only for Distributor CSP Account) ##
+```powershell
Get-PCSubscription -tenantid $customer.id -partnerid ''
-
+```
diff --git a/CmdletHelp/Get-PCSubscriptionMonthlyUsageRecords.md b/CmdletHelp/Get-PCSubscriptionMonthlyUsageRecords.md
index 28453b6..b844132 100644
--- a/CmdletHelp/Get-PCSubscriptionMonthlyUsageRecords.md
+++ b/CmdletHelp/Get-PCSubscriptionMonthlyUsageRecords.md
@@ -1,13 +1,13 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCSubscriptionMonthlyUsageRecords #
-## Get-PCSubscriptionMonthlyUsageRecords ##
-
-**Get a customer**
+## Get a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get usage data for subscriptions**
+## Get usage data for subscriptions ##
+```powershell
Get-PCSubscriptionMonthlyUsageRecords -tenantid $customer.id
-
-
+```
diff --git a/CmdletHelp/Get-PCSupportProfile.md b/CmdletHelp/Get-PCSupportProfile.md
index 12250da..d8add24 100644
--- a/CmdletHelp/Get-PCSupportProfile.md
+++ b/CmdletHelp/Get-PCSupportProfile.md
@@ -1,8 +1,7 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCSupportProfile #
-## Get-PCSupportProfile ##
-
-**Get Partner Support Profile**
+## Get Partner Support Profile ##
+```powershell
Get-PCSupportProfile
-
+```
diff --git a/CmdletHelp/Get-PCUsage.md b/CmdletHelp/Get-PCUsage.md
index efa7830..a4c4404 100644
--- a/CmdletHelp/Get-PCUsage.md
+++ b/CmdletHelp/Get-PCUsage.md
@@ -1,16 +1,19 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCUsage #
-## Get-PCUsage ##
-
-**Get a customer**
+## Get a customer ##
+```powershell
Select-PCCustomer -tenantid ''
+```
-**Get a subscription**
+## Get a subscription ##
+```powershell
Get-PCSubscription -all
+```
-**Gets the utilization records of a customer's Azure subscription for a specified time period**
+## Gets the utilization records of a customer's Azure subscription for a specified period ##
+```powershell
Get-PCUsage -subscriptionid $subscription.id -start_time "01-12-1999 00:00:00" -end_time "12-31-1999 00:00:00" -granularity {daily | hourly}-show_details -size
-
+```
diff --git a/CmdletHelp/Get-PCUsage2.md b/CmdletHelp/Get-PCUsage2.md
index ebdcc0a..dab472a 100644
--- a/CmdletHelp/Get-PCUsage2.md
+++ b/CmdletHelp/Get-PCUsage2.md
@@ -1,20 +1,26 @@
-# Partner Center PowerShell Module (preview) #
+# Get-PCUsage #
-## Get-PCUsage ##
-
-**Get a customer**
+## Get a customer ##
+```powershell
Select-PCCustomer -tenantid ''
+```
-**Get a subscription**
+## Get a subscription ##
+```powershell
Get-PCSubscription -all
+```
-**Gets first page of utilization records of a customer's Azure subscription for a specified time period**
+## Gets first page of utilization records of a customer's Azure subscription for a specified period ##
+```powershell
$usageData = Get-PCUsage2 -subscriptionid $subscription.id -start_time "01-12-1999 00:00:00" -end_time "31-12-1999 00:00:00" -granularity {daily | hourly}-show_details -size
+```
-**Gets the next page of utilization records of a customer's Azure subscription for a specified time period**
+## Gets the next page of utilization records of a customer's Azure subscription for a specified period ##
+```powershell
# Check the Links data includes a 'next' member
$usageData = Get-PCUsage2 -continuationLink $usageData.Links
+```
diff --git a/CmdletHelp/NA.md b/CmdletHelp/NA.md
index 6655bef..e2b24a4 100644
--- a/CmdletHelp/NA.md
+++ b/CmdletHelp/NA.md
@@ -1,3 +1 @@
-# Partner Center PowerShell Module (preview) #
-
-## Commandlet not yet available ##
+# Cmdlet not yet available #
diff --git a/CmdletHelp/New-PCCustomer.md b/CmdletHelp/New-PCCustomer.md
index 23bca9c..af9616b 100644
--- a/CmdletHelp/New-PCCustomer.md
+++ b/CmdletHelp/New-PCCustomer.md
@@ -1,9 +1,8 @@
-# Partner Center PowerShell Module (preview) #
+# New-PCCustomer #
-## New-PCCustomer ##
-
-Create new customer
+## Create a new customer ##
+```powershell
$newDefaultAddress = New-PCCustomerDefaultAddress -Country '' -Region '' -City '' -State '' -AddressLine1 '' -PostalCode '' -FirstName '' -LastName '' -PhoneNumber ''
$newBillingProfile = New-PCCustomerBillingProfile -FirstName '' -LastName '' -Email '' -Culture '' -Language '' -CompanyName '' -DefaultAddress $newDefaultAddress
@@ -11,3 +10,4 @@ Create new customer
$newCompanyProfile = New-PCCustomerCompanyProfile -Domain '.onmicrosoft.com'
$newCustomer = New-PCCustomer -BillingProfile $newBillingProfile -CompanyProfile $newCompanyProfile
+```
diff --git a/CmdletHelp/New-PCCustomerUser.md b/CmdletHelp/New-PCCustomerUser.md
index cafaa72..05496e9 100644
--- a/CmdletHelp/New-PCCustomerUser.md
+++ b/CmdletHelp/New-PCCustomerUser.md
@@ -1,15 +1,16 @@
-# Partner Center PowerShell Module (preview) #
+# New-PCCustomerUser #
-## New-PCCustomerUser ##
-
-**Get a customer**
+## Get a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Create a customer user**
+## Create a customer user ##
+```powershell
$password = ''
- $passwordSecure = $password | ConvertTo-SecureString -AsPlainText -Force
+ $passwordSecure = $password | ConvertTo-SecureString -AsPlainText -Force
New-PCCustomerUser -tenantid $customer.id -usageLocation '' -userPrincipalName '' -firstName '' -lastName '' -displayName '' -forceChangePassword $true -password $passwordSecure
-
+```
diff --git a/CmdletHelp/New-PCOrder.md b/CmdletHelp/New-PCOrder.md
index cf8d744..27907b3 100644
--- a/CmdletHelp/New-PCOrder.md
+++ b/CmdletHelp/New-PCOrder.md
@@ -1,16 +1,17 @@
-# Partner Center PowerShell Module (preview) #
+# New-PCOrder #
-## New-PCOrder ##
-
-**Get a customer**
+## Select a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Order a new subscription**
+## Order a new subscription ##
+```powershell
# Get offer
$offer = Get-PCOffer -countryid '' -offerid ''
-
+
# Create the OrderLineItem
$lineItems = @()
$lineItems += [OrderLineItem]::new()
@@ -18,26 +19,27 @@
$lineItems[0].FriendlyName = ''
$lineItems[0].OfferId = $offer.id
$lineItems[0].Quantity =
-
+
# Send order
New-PCOrder -tenantid $customer.id -LineItems $lineItems
-
-**Order an Addon to a subscription**
+```
+
+## Order an Addon to a subscription ##
+```powershell
# Get subscription
$subscription = Get-PCSubscription -tenantid $customer.id -subscriptionid ''
-
+
# Get list of addons available for the subscription offer
$addons = Get-PCOffer -countryid '' -offerid $subscription.offerId -addons
# Get addon offer
$addon = Get-PCOffer -countryid 'US' -offerid ''
-
+
# Get subscription order
$order = Get-PCOrder -tenantid $customer.id -orderid $subscription.orderId
# Get the next OrderLineItem number
$newLineItemNumber = $order.lineItems.Count
-
# Create the addon OrderLineItem
$lineItems = @()
$lineItems += [OrderLineItem]::new()
@@ -46,7 +48,7 @@
$lineItems[0].OfferId = $addon.id
$lineItems[0].ParentSubscriptionId = $subscription.id
$lineItems[0].Quantity =
-
+
# Send order
New-PCOrder -tenantid $customer.id -orderid $order.id -LineItems $lineItems
-
+```
diff --git a/CmdletHelp/New-PCRelationshipRequest.md b/CmdletHelp/New-PCRelationshipRequest.md
index 7e6364d..d3c23e6 100644
--- a/CmdletHelp/New-PCRelationshipRequest.md
+++ b/CmdletHelp/New-PCRelationshipRequest.md
@@ -1,8 +1,7 @@
-# Partner Center PowerShell Module (preview) #
+# New-PCRelationshipRequest #
-## New-PCRelationshipRequest ##
-
-** Get invitation URL to send to customer **
+## Get invitation URL to send to customer ##
+```powershell
$inviteURL = (New-PCRelationshipRequest).url
-
+```
diff --git a/CmdletHelp/New-PCSAToken.md b/CmdletHelp/New-PCSAToken.md
index 4a08704..b4062cf 100644
--- a/CmdletHelp/New-PCSAToken.md
+++ b/CmdletHelp/New-PCSAToken.md
@@ -1,17 +1,18 @@
-# Partner Center PowerShell Module (preview) #
+# New-PCSAToken #
-## New-PCSAToken ##
+## Set a specific token for a command/function - user authentication ##
-**Set a specific token for a command/function - user authentication**
+```powershell
+ $cred = Get-Credential
- $credential = Get-Credential
+ New-PCSAToken -cspappID '' -cspDomain '' -credential $cred
+```
- New-PCSAToken -cspappID '' -cspDomain '' -credential $credential
-
-**Set a specific token for a command/function - app authentication**
+## Set a specific token for a command/function - app authentication ##
+```powershell
$clientSecret = ''
- $clientSecretSecure = $clientSecret | ConvertTo-SecureString -AsPlainText -Force
+ $clientSecretSecure = $clientSecret | ConvertTo-SecureString -AsPlainText -Force
New-PCSAToken -cspappID '' -cspDomain '' -cspClientSecret $clientSecretSecure
-
+```
diff --git a/CmdletHelp/New-PCSR.md b/CmdletHelp/New-PCSR.md
index 66dac77..62193cb 100644
--- a/CmdletHelp/New-PCSR.md
+++ b/CmdletHelp/New-PCSR.md
@@ -1,28 +1,31 @@
-# Partner Center PowerShell Module (preview) #
+# New-PCSR #
-## New-PCSR ##
+## Get support topic for the request ##
-**Get support topic for the request**
-
- $supportTopic = Get-PCSRTopics | Where-Object name -Contains ''
+```powershell
+ $supportTopic = Get-PCSRTopics | Where-Object name -Contains ''
+```
-**New Service Requests - Sample 1**
+## New Service Requests - Sample ##
+```powershell
New-PCSR -title '' -description '' -severity '' -supportTopicID ''
+```
-**New Service Requests - Sample 2**
+## New Service Requests - Sample 2 ##
+```powershell
$serviceRequestContact = [ServiceRequestContact]::new()
$serviceRequestContact.FirstName = ''
$serviceRequestContact.LastName = ''
$serviceRequestContact.Email = ''
$serviceRequestContact.PhoneNumber = ''
-
+
$supportTopic = Get-PCSRTopics | Where-Object name -Contains ''
-
+
$serviceRequestNote = [ServiceRequestNote]::new()
$serviceRequestNote.Text = ''
-
+
$serviceRequest = [ServiceRequest]::new()
$serviceRequest.Title = ''
$serviceRequest.Description = ''
@@ -30,6 +33,6 @@
$serviceRequest.supportTopicID = $supportTopic.id
$serviceRequest.PrimaryContact = $serviceRequestContact
$serviceRequest.NewNote = $serviceRequestNote
-
- New-PCSR -serviceRequest $serviceRequest
+ New-PCSR -serviceRequest $serviceRequest
+```
diff --git a/CmdletHelp/Remove-PCCustomer.md b/CmdletHelp/Remove-PCCustomer.md
index 80fdfee..fa7f897 100644
--- a/CmdletHelp/Remove-PCCustomer.md
+++ b/CmdletHelp/Remove-PCCustomer.md
@@ -1,12 +1,13 @@
-# Partner Center PowerShell Module (preview) #
+# Remove-PCCustomer #
-## Remove-PCCustomer ##
-
-**Get a customer**
+## Specify a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Delete a customer (integration sandbox only)**
+## Delete a customer (integration sandbox only) ##
+```powershell
Remove-PCCustomer -tenantid $customer.id
-
+```
diff --git a/CmdletHelp/Remove-PCCustomerRoleMember.md b/CmdletHelp/Remove-PCCustomerRoleMember.md
index 627a743..7585cd3 100644
--- a/CmdletHelp/Remove-PCCustomerRoleMember.md
+++ b/CmdletHelp/Remove-PCCustomerRoleMember.md
@@ -1,20 +1,25 @@
-# Partner Center PowerShell Module (preview) #
+# Remove-PCCustomerRoleMember #
-## Remove-PCCustomerRoleMember ##
-
-**Get a customer**
+## Get a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get a role**
+## Get a role ##
+```powershell
$role = Get-PCDirectoryRoles -tenantid $customer.id | Where-Object name -Contains ''
+```
-**Get a User**
+## Get a User ##
+```powershell
$user = Get-PCCustomerUser -tenantid $customer.id -userid ''
+```
-**Remove a User from a Role**
+## Remove a User from a Role ##
+```powershell
Remove-PCCustomerRoleMember -tenantid $customer.id -roleid $role.id -userid $user.id
-
+```
diff --git a/CmdletHelp/Remove-PCCustomerUser.md b/CmdletHelp/Remove-PCCustomerUser.md
index 51fc53e..c2b9755 100644
--- a/CmdletHelp/Remove-PCCustomerUser.md
+++ b/CmdletHelp/Remove-PCCustomerUser.md
@@ -1,16 +1,19 @@
-# Partner Center PowerShell Module (preview) #
+# Remove-PCCustomerUser #
-## Remove-PCCustomerUser ##
-
-**Get a customer**
+## Get a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get customer user**
+## Get customer user ##
+```powershell
$user = Get-PCCustomerUser -tenantid $customer.id -userid ''
+```
-**Delete a customer user**
+## Delete a customer user ##
+```powershell
Remove-PCCustomerUser -tenantid $customer.id -user $user
-
+```
diff --git a/CmdletHelp/Restore-PCCustomerUser.md b/CmdletHelp/Restore-PCCustomerUser.md
index 8c2aae3..dacdec2 100644
--- a/CmdletHelp/Restore-PCCustomerUser.md
+++ b/CmdletHelp/Restore-PCCustomerUser.md
@@ -1,16 +1,19 @@
-# Partner Center PowerShell Module (preview) #
+# Restore-PCCustomerUser #
-## Restore-PCCustomerUser ##
-
-**Get a customer**
+## Get a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get customer deleted users**
+## Get customer deleted users ##
+```powershell
$user = Get-PCCustomerUser -tenantid $customer.id -deleted | ? id -EQ ''
+```
-**Restore a customer deleted user**
+## Restore a customer deleted user ##
+```powershell
Restore-PCCustomerUser -tenantid $customer.id -user $user
-
+```
diff --git a/CmdletHelp/Set-PCBillingProfile.md b/CmdletHelp/Set-PCBillingProfile.md
index c3b156e..59cd9a0 100644
--- a/CmdletHelp/Set-PCBillingProfile.md
+++ b/CmdletHelp/Set-PCBillingProfile.md
@@ -1,8 +1,7 @@
-# Partner Center PowerShell Module (preview) #
+# Set-PCBillingProfile #
-## Set-PCBillingProfile ##
-
-**Set Partner Billing Profile**
+## Set Partner Billing Profile ##
+```powershell
Set-PCBillingProfile -firstname '' -lastname '' -phonenumber '' -AddressLine1 '' -AddressLine2 ''
-
+```
diff --git a/CmdletHelp/Set-PCCustomerBillingProfile.md b/CmdletHelp/Set-PCCustomerBillingProfile.md
index 8b3992a..e4d6524 100644
--- a/CmdletHelp/Set-PCCustomerBillingProfile.md
+++ b/CmdletHelp/Set-PCCustomerBillingProfile.md
@@ -1,19 +1,22 @@
-# Partner Center PowerShell Module (preview) #
+# Set-PCCustomerBillingProfile #
-## Set-PCCustomerBillingProfile ##
-
-**Get a customer**
+## Specify a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get customer Billing Profile**
+## Get customer Billing Profile ##
+```powershell
$customerBillingProfile = Get-PCCustomerBillingProfile -tenantid $customer.id
+```
+
+## Set customer Billing Profile ##
-**Set customer Billing Profile**
-
+```powershell
$customerBillingProfile.firstName = ''
$customerBillingProfile.lastName = ''
$customerBillingProfile.email = ''
Set-PCCustomerBillingProfile -tenantid $customer.id -billingprofile $customerBillingProfile
-
+```
diff --git a/CmdletHelp/Set-PCCustomerUser.md b/CmdletHelp/Set-PCCustomerUser.md
index 9c7f731..af19151 100644
--- a/CmdletHelp/Set-PCCustomerUser.md
+++ b/CmdletHelp/Set-PCCustomerUser.md
@@ -1,23 +1,28 @@
-# Partner Center PowerShell Module (preview) #
+# Set-PCCustomerUser #
-## Set-PCCustomerUser ##
-
-**Get a customer**
+## Get a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get customer user**
+## Get customer user ##
+```powershell
$user = Get-PCCustomerUser -tenantid $customer.id -userid ''
+```
-**Update a customer user**
+## Update a customer user ##
+```powershell
Set-PCCustomerUser -tenantid $customer.id -user $user -userPrincipalName ''
+```
-**Reset a customer user password**
+## Reset a customer user password ##
+```powershell
$password = ''
- $passwordSecure = $password | ConvertTo-SecureString -AsPlainText -Force
+ $passwordSecure = $password | ConvertTo-SecureString -AsPlainText -Force
Set-PCCustomerUser -tenantid $customer.id -user $user -password $passwordSecure -forceChangePassword $true/$false
-
+```
diff --git a/CmdletHelp/Set-PCLegalBusinessProfile.md b/CmdletHelp/Set-PCLegalBusinessProfile.md
index fb99ba2..81d3fa6 100644
--- a/CmdletHelp/Set-PCLegalBusinessProfile.md
+++ b/CmdletHelp/Set-PCLegalBusinessProfile.md
@@ -1,8 +1,7 @@
-# Partner Center PowerShell Module (preview) #
+# Set-PCLegalBusinessProfile #
-## Set-PCLegalBusinessProfile ##
-
-**Set Partner Legal Business Profile**
+## Set Partner Legal Business Profile ##
+```powershell
Set-PCLegalBusinessProfile -addressLine1 '' -AddressLine2 '' -primarycontactfirstname '' -primarycontactlastname '' -primarycontactphonenumber '' -primarycontactemail ''
-
+```
diff --git a/CmdletHelp/Set-PCOrganizationProfile.md b/CmdletHelp/Set-PCOrganizationProfile.md
index 4239a78..b1da176 100644
--- a/CmdletHelp/Set-PCOrganizationProfile.md
+++ b/CmdletHelp/Set-PCOrganizationProfile.md
@@ -1,8 +1,7 @@
-# Partner Center PowerShell Module (preview) #
+# Set-PCOrganizationProfile #
-## Set-PCOrganizationProfile ##
-
-**Set Partner Organization Profile**
+## Set Partner Organization Profile ##
+```powershell
Set-PCOrganizationProfile -firstname '' -lastname '' -phonenumber ''
-
+```
diff --git a/CmdletHelp/Set-PCSR.md b/CmdletHelp/Set-PCSR.md
index 9214c65..edcf965 100644
--- a/CmdletHelp/Set-PCSR.md
+++ b/CmdletHelp/Set-PCSR.md
@@ -1,18 +1,25 @@
-# Partner Center PowerShell Module (preview) #
+# Set-PCSR #
-## Set-PCSR ##
-
-**Get Service Request**
+## Get Service Request ##
+```powershell
$serviceRequest = Get-PCSR -serviceRequestId ''
+```
-**Set Service Requests status**
+## Set Service Requests status ##
+```powershell
$serviceRequest | Set-PCSR -status '< open | closed >'
+```
+
or
+
+```powershell
Set-PCSR -serviceRequest $serviceRequest -status '< open | closed >'
+```
-**Add note to Service Requests**
+## Add note to Service Requests ##
+```powershell
Set-PCSR -serviceRequest $serviceRequest -addnote ''
-
+```
diff --git a/CmdletHelp/Set-PCSubscription.md b/CmdletHelp/Set-PCSubscription.md
index cce34fa..fb3c355 100644
--- a/CmdletHelp/Set-PCSubscription.md
+++ b/CmdletHelp/Set-PCSubscription.md
@@ -1,32 +1,43 @@
-# Partner Center PowerShell Module (preview) #
+# Set-PCSubscription #
-## Set-PCSubscription ##
-
-**Get a customer**
+## Get a customer ##
+```powershell
$customer = Get-PCCustomer -tenantid ''
+```
-**Get a customer subscription**
+## Get a customer subscription ##
+```powershell
$subscription = Get-PCSubscription -tenantid $customer.id -subscriptionid ''
+```
-**Update subscription friendly name**
+## Update subscription friendly name ##
+```powershell
$subscription | Set-PCSubscription -tenantid $customer.id -friendlyName ''
+```
-**Update subscription seats (license based only)**
+## Update subscription seats (license based only) ##
+```powershell
$subscription | Set-PCSubscription -tenantid $customer.id -quantity
+```
-**Change subscription auto renewal**
+## Change subscription auto renewal ##
+```powershell
$subscription | Set-PCSubscription -tenantid $customer.id -AutoRenewEnabled disabled
+```
-**Suspend a subscription**
+## Suspend a subscription ##
+```powershell
$subscription | Set-PCSubscription -tenantid $customer.id -status suspended
+```
-**Activate a subscription**
+## Activate a subscription ##
+```powershell
$subscription | Set-PCSubscription -tenantid $customer.id -status active
-
+```
diff --git a/CmdletHelp/Set-PCSupportProfile.md b/CmdletHelp/Set-PCSupportProfile.md
index dba0fff..5fe5460 100644
--- a/CmdletHelp/Set-PCSupportProfile.md
+++ b/CmdletHelp/Set-PCSupportProfile.md
@@ -1,8 +1,7 @@
-# Partner Center PowerShell Module (preview) #
+# Set-PCSupportProfile #
-## Set-PCSupportProfile ##
-
-**Set Partner Support Profile**
+## Set Partner Support Profile ##
+```powershell
Set-PCSupportProfile -website '' -email '' -phone ''
-
+```
diff --git a/CmdletHelp/Test-PCAddress.md b/CmdletHelp/Test-PCAddress.md
index 9cce445..b7c1685 100644
--- a/CmdletHelp/Test-PCAddress.md
+++ b/CmdletHelp/Test-PCAddress.md
@@ -1,14 +1,15 @@
-# Partner Center PowerShell Module (preview) #
+# Test-PCAddress #
-## Test-PCAddress ##
-
-**Test the country rules for an address**
+## Test the country rules for an address ##
+```powershell
$address = New-PCAddress -AddressLine1 '' -AddressLine2 '' -City '' -State '' -PostalCode '' -country 'two digits country code' -region ''
- Test-PCAddress -Address
+ Test-PCAddress -Address
+```
or
+```powershell
Test-PCAddress -AddressLine1 '' -AddressLine2 '' -City '' -State '' -PostalCode '' -country 'two digits country code' -region ''
-
+```
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
index ae6d0e6..b1a651c 100644
--- a/ISSUE_TEMPLATE.md
+++ b/ISSUE_TEMPLATE.md
@@ -1,5 +1,5 @@
-### Expected behavior
+# Expected behavior
-### Actual behavior
+## Actual behavior
-### Steps to reproduce the problem
\ No newline at end of file
+## Steps to reproduce the problem
\ No newline at end of file
diff --git a/PartnerCenterModule/PartnerCenterAnalytics.psm1 b/PartnerCenterModule/PartnerCenterAnalytics.psm1
index 8c10d88..be13cce 100644
--- a/PartnerCenterModule/PartnerCenterAnalytics.psm1
+++ b/PartnerCenterModule/PartnerCenterAnalytics.psm1
@@ -1,4 +1,4 @@
-Set-StrictMode -Version latest
+Set-StrictMode -Version latest
<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
@@ -11,7 +11,6 @@ Set-StrictMode -Version latest
# Load common code
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCLicensesDeployment
{
@@ -20,7 +19,26 @@ function Get-PCLicensesDeployment
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
+ Write-Warning " Get-PCLicensesDeployment is deprecated and will not be available in future releases, use Get-PCLicenseDeployment instead."
+
+
+ $url = "https://api.partnercenter.microsoft.com/v1/analytics/licenses/deployment"
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj = @() + $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "PartnerLicensesDeploymentInsights")
+}
+
+# Add non-plural noun version of cmdlet. Get-PCLicensesDeployment will be removed in future releases.
+function Get-PCLicenseDeployment
+{
+ [CmdletBinding()]
+ Param(
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
+ )
+ _testTokenContext($satoken)
$url = "https://api.partnercenter.microsoft.com/v1/analytics/licenses/deployment"
$headers = @{Authorization="Bearer $satoken"}
@@ -37,8 +55,9 @@ function Get-PCLicensesUsage
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+ Write-Warning " Get-PCLicensesUsage is deprecated and will not be available in future releases, use Get-PCLicenseUsage instead."
+
$url = "https://api.partnercenter.microsoft.com/v1/analytics/licenses/usage"
$headers = @{Authorization="Bearer $satoken"}
@@ -47,6 +66,24 @@ function Get-PCLicensesUsage
return (_formatResult -obj $obj -type "PartnerLicensesUsageInsights")
}
+# Add non-plural noun version of cmdlet. Get-PCLicenseUsage cmdlet will be removed in future releases.
+function Get-PCLicenseUsage
+{
+ [CmdletBinding()]
+ Param(
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
+ )
+ _testTokenContext($satoken)
+
+ $url = "https://api.partnercenter.microsoft.com/v1/analytics/licenses/usage"
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj = @() + $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "PartnerLicensesUsageInsights")
+}
+
+
function Get-PCCustomerLicensesDeployment
{
[CmdletBinding()]
@@ -56,7 +93,27 @@ function Get-PCCustomerLicensesDeployment
)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
+ Write-Warning " Get-PCCustomerLicensesDeployment is deprecated and will not be available in future releases, use Get-PCCustomerLicenseDeployment instead."
+
+ $url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/analytics/licenses/deployment" -f $tenantid
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj = @() + $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "CustomerLicensesDeploymentInsights")
+}
+
+# Add non-plural noun version of cmdlet. Get-PCCustomerLicensesDeployment will be removed in future releases.
+function Get-PCCustomerLicenseDeployment
+{
+ [CmdletBinding()]
+ Param(
+ [Parameter(Mandatory = $false)][String]$tenantid = $GlobalCustomerID,
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
+ )
+ _testTokenContext($satoken)
+ _testTenantContext ($tenantid)
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/analytics/licenses/deployment" -f $tenantid
$headers = @{Authorization="Bearer $satoken"}
@@ -75,8 +132,9 @@ function Get-PCCustomerLicensesUsage
)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+ Write-Warning " Get-PCCustomerLicensesUsage is deprecated and will not be available in future releases, use Get-PCCustomerLicenseUsage instead."
+
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/analytics/licenses/usage" -f $tenantid
$headers = @{Authorization="Bearer $satoken"}
@@ -84,3 +142,22 @@ function Get-PCCustomerLicensesUsage
$obj = @() + $response.Substring(1) | ConvertFrom-Json
return (_formatResult -obj $obj -type "CustomerLicensesUsageInsights")
}
+
+# Add non-plural noun version of cmdlet. Get-PCCustomerLicensesUsage will be removed in future releases.
+function Get-PCCustomerLicenseUsage
+{
+ [CmdletBinding()]
+ Param(
+ [Parameter(Mandatory = $false)][String]$tenantid = $GlobalCustomerID,
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
+ )
+ _testTokenContext($satoken)
+ _testTenantContext ($tenantid)
+
+ $url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/analytics/licenses/usage" -f $tenantid
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj = @() + $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "CustomerLicensesUsageInsights")
+}
\ No newline at end of file
diff --git a/PartnerCenterModule/PartnerCenterAuthentication.psm1 b/PartnerCenterModule/PartnerCenterAuthentication.psm1
index af987c6..fc741f7 100644
--- a/PartnerCenterModule/PartnerCenterAuthentication.psm1
+++ b/PartnerCenterModule/PartnerCenterAuthentication.psm1
@@ -11,7 +11,6 @@
# Load common code
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-GraphAADTokenByUser
{
@@ -64,6 +63,7 @@ function Add-PCAuthentication
$resource = 'https://api.partnercenter.microsoft.com'
$AADToken = Get-GraphAADTokenByUser -resource $resource -domain $cspDomain -clientid $cspAppID -credential $credential
$cspUsername = $credential.UserName
+
# Get SA token
try {
$SAToken = Get-SAToken -aadtoken $AADToken -global $true
@@ -102,9 +102,7 @@ function Add-PCAuthentication
"user" { $result = Add-AuthenticationByUser -cspAppID $cspAppID -cspDomain $cspDomain -credential $credential }
"app" { $result = Add-AuthenticationBySecret -cspAppID $cspAppID -cspDomain $cspDomain -cspClientSecret $cspClientSecret }
}
-
- Update-ModuleTelemetry -cspDomain $result.Domain
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
return $result
}
@@ -164,7 +162,5 @@ function New-PCSAToken
$result = $result_arr[0]}
}
- Update-ModuleTelemetry -cspDomain $result_arr[1].Domain
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
return $result
}
\ No newline at end of file
diff --git a/PartnerCenterModule/PartnerCenterCustomer.psm1 b/PartnerCenterModule/PartnerCenterCustomer.psm1
index ebdd90b..9d7a518 100644
--- a/PartnerCenterModule/PartnerCenterCustomer.psm1
+++ b/PartnerCenterModule/PartnerCenterCustomer.psm1
@@ -1,4 +1,4 @@
-Set-StrictMode -Version latest
+Set-StrictMode -Version latest
<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
@@ -11,7 +11,6 @@ Set-StrictMode -Version latest
# Load common code
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCCustomer
{
@@ -25,8 +24,7 @@ function Get-PCCustomer
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
-
+
function Private:Get-CustomerAllInner ($satoken)
{
$obj = @()
@@ -97,7 +95,8 @@ function Get-PCSubscribedSKUs
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
+ Write-Warning " Get-PCSubscribedSKUs is deprecated and will not be available in future releases, use Get-PCSubscribedSKU instead."
$obj = @()
@@ -109,6 +108,26 @@ function Get-PCSubscribedSKUs
return (_formatResult -obj $obj -type "SubscribedSku")
}
+# Add non-plural version of cmdlet. The plural version will be removed in future releases.
+function Get-PCSubscribedSKU
+{
+ [CmdletBinding()]
+ param ([Parameter(Mandatory = $false)][String]$tenantid=$GlobalCustomerID,
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
+ _testTokenContext($satoken)
+ _testTenantContext ($tenantid)
+
+ $obj = @()
+
+ $url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/subscribedskus" -f $tenantid
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj += $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "SubscribedSku")
+}
+
+
function Get-PCSpendingBudget
{
[CmdletBinding()]
@@ -116,7 +135,7 @@ function Get-PCSpendingBudget
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/usagebudget" -f $tenantid
$headers = @{Authorization="Bearer $satoken"}
@@ -133,7 +152,6 @@ function Set-PCSpendingBudget
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/usagebudget" -f $tenantid
$headers = @{Authorization="Bearer $satoken"}
@@ -167,7 +185,7 @@ function New-PCCustomer
[Parameter(ParameterSetName='ByProfiles',Mandatory = $true)][CompanyProfile] $CompanyProfile,
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers"
@@ -195,9 +213,6 @@ function Remove-PCCustomer
[CmdletBinding()]
param ($tenantid, [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
-
- $obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}" -f $tenantid
$headers = @{"Authorization"="Bearer $satoken"}
@@ -221,7 +236,27 @@ function Get-PCManagedServices
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
+ Write-Warning " Get-PCManagedServices is deprecated and will not be available in future releases, use Get-PCManagedService instead."
+
+ $url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/managedservices" -f $tenantid
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $obj = @()
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj += $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "ManagedServices")
+}
+
+# Adding non-plural noun version of cmdlet. Plural version of the cmdlet will be removed in future versions.
+function Get-PCManagedService
+{
+ [CmdletBinding()]
+ param ([Parameter(Mandatory = $false)][String]$tenantid=$GlobalCustomerID,
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
+ _testTokenContext($satoken)
+ _testTenantContext ($tenantid)
+
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/managedservices" -f $tenantid
$headers = @{Authorization="Bearer $satoken"}
@@ -240,7 +275,6 @@ function Select-PCCustomer
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}" -f $tenantid
@@ -249,14 +283,12 @@ function Select-PCCustomer
$response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
$obj += $response.Substring(1) | ConvertFrom-Json
- #setting SAToke variable as global
+ #setting SAToken variable as global
Set-Variable -Name "GlobalCustomerID" -Value $obj.id -Scope Global
return (_formatResult -obj $obj -type "Customer")
}
-
-
function Get-PCCustomerRelationships
{
[CmdletBinding()]
@@ -264,7 +296,8 @@ function Get-PCCustomerRelationships
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
+ Write-Warning " Get-PCCustomerRelationships is deprecated and will not be available in future releases, use Get-PCCustomerRelationship instead."
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/relationships" -f $tenantid
$headers = @{Authorization="Bearer $satoken"}
@@ -275,7 +308,23 @@ function Get-PCCustomerRelationships
return (_formatResult -obj $obj -type "PartnerRelationship")
}
+# Adding non-plural noun version of cmdlet. Plural version of the cmdlet will be removed in future versions.
+function Get-PCCustomerRelationship
+{
+ [CmdletBinding()]
+ param ([Parameter(Mandatory = $false)][String]$tenantid=$GlobalCustomerID,
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
+ _testTokenContext($satoken)
+ _testTenantContext ($tenantid)
+ $url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/relationships" -f $tenantid
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $obj = @()
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj += $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "PartnerRelationship")
+}
function Get-PCResellerCustomers
{
@@ -287,8 +336,8 @@ function Get-PCResellerCustomers
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+ Write-Warning " Get-PCResellerCustomers is deprecated and will not be available in future releases, use Get-PCResellerCustomer instead."
$obj = @()
[string]$filter = '{"Field":"IndirectReseller","Value":"' + $resellerId + '","Operator":"starts_with"}'
@@ -302,3 +351,29 @@ function Get-PCResellerCustomers
$obj += $response.Substring(1) | ConvertFrom-Json
return (_formatResult -obj $obj -type "Customer")
}
+
+# Add non-plural noun version of cmdlet. Plural version of the cmdlet will be removed in future versions.
+function Get-PCResellerCustomer
+{
+ [CmdletBinding()]
+
+ Param(
+ [Parameter(ParameterSetName='filter', Mandatory = $true)][String]$resellerId,
+ [Parameter(ParameterSetName='filter', Mandatory = $false)][int]$size = 200,
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
+ )
+ _testTokenContext($satoken)
+
+ $obj = @()
+
+ [string]$filter = '{"Field":"IndirectReseller","Value":"' + $resellerId + '","Operator":"starts_with"}'
+ [Reflection.Assembly]::LoadWithPartialName("System.Web") | Out-Null
+ $Encode = [System.Web.HttpUtility]::UrlEncode($filter)
+
+ $url = "https://api.partnercenter.microsoft.com/v1/customers?size={0}&filter={1}" -f $size,$Encode
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj += $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "Customer")
+}
\ No newline at end of file
diff --git a/PartnerCenterModule/PartnerCenterDirectory.psm1 b/PartnerCenterModule/PartnerCenterDirectory.psm1
index fec4daf..aa8f3bd 100644
--- a/PartnerCenterModule/PartnerCenterDirectory.psm1
+++ b/PartnerCenterModule/PartnerCenterDirectory.psm1
@@ -1,4 +1,4 @@
-Set-StrictMode -Version latest
+Set-StrictMode -Version latest
<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
@@ -8,9 +8,9 @@ Set-StrictMode -Version latest
profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the
sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.
#>
+
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCDomainAvailability
{
@@ -24,13 +24,14 @@ function Get-PCDomainAvailability
[string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
try
{
$url = "https://api.partnercenter.microsoft.com/v1/domains/{0}" -f $domain
$headers = @{Authorization="Bearer $GlobalToken"}
- $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "HEAD" #-Debug -Verbose
+ $null = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "HEAD" #-Debug -Verbose
return $false
+
}
catch [System.Net.WebException]
{
@@ -50,7 +51,7 @@ function Get-PCCustomerRole
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/directoryroles" -f $tenantid
@@ -70,7 +71,6 @@ function Get-PCCustomerRoleMember
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/directoryroles/{1}/usermembers" -f $tenantid, $roleid
@@ -90,7 +90,7 @@ function Add-PCCustomerRoleMember
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/directoryroles/{1}/usermembers" -f $tenantid, $roleid
@@ -113,7 +113,6 @@ function Remove-PCCustomerRoleMember
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
$obj = @()
@@ -132,7 +131,7 @@ function New-PCRelationshipRequest
[CmdletBinding()]
param ([Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/relationshiprequests"
diff --git a/PartnerCenterModule/PartnerCenterInvoice.psm1 b/PartnerCenterModule/PartnerCenterInvoice.psm1
index 072eab4..7f4beee 100644
--- a/PartnerCenterModule/PartnerCenterInvoice.psm1
+++ b/PartnerCenterModule/PartnerCenterInvoice.psm1
@@ -1,4 +1,4 @@
-Set-StrictMode -Version latest
+Set-StrictMode -Version latest
<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
@@ -9,9 +9,9 @@ Set-StrictMode -Version latest
sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.
#>
# Load common code
+
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCInvoice
{
@@ -25,8 +25,8 @@ function Get-PCInvoice
#[Parameter(ParameterSetName='detailurl',Mandatory = $false)][switch]$detailurl
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
- function Private:Get-InvoiceSummaryInner($satoken)
+
+ function Private:Get-InvoiceSummaryInner($satoken)
{
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/invoices/summary"
@@ -100,7 +100,9 @@ function Get-PCInvoiceLineItems
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
+ Write-Warning " Get-PCInvoiceLineItems is deprecated and will not be available in future releases, use Get-PCInvoiceLineItem instead."
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/invoices/{0}/lineitems/{1}/{2}?size={3}&offset={4}" -f $invoiceid, $billingprovider, $invoicelineitemtype, $size, $offset
@@ -110,3 +112,28 @@ function Get-PCInvoiceLineItems
$obj += $response
return (_formatResult -obj $obj -type "Invoice")
}
+
+# Adding non-plural noun version of cmdlet. Plural version of the cmdlet will be removed in future versions.
+function Get-PCInvoiceLineItem
+{
+ [CmdletBinding()]
+
+ Param(
+ [Parameter(Mandatory = $true)][String]$invoiceid,
+ [Parameter(Mandatory = $true)][ValidateSet("Azure","Office")][string]$billingprovider,
+ [Parameter(Mandatory = $true)][ValidateSet("BillingLineItems","UsageLineItems")][string]$invoicelineitemtype,
+ [Parameter(Mandatory = $false)][int]$size = 200,
+ [Parameter(Mandatory = $false)][int]$offset = 0,
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
+ )
+ _testTokenContext($satoken)
+
+ $obj = @()
+ $url = "https://api.partnercenter.microsoft.com/v1/invoices/{0}/lineitems/{1}/{2}?size={3}&offset={4}" -f $invoiceid, $billingprovider, $invoicelineitemtype, $size, $offset
+
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj += $response
+ return (_formatResult -obj $obj -type "Invoice")
+}
\ No newline at end of file
diff --git a/PartnerCenterModule/PartnerCenterModule.psd1 b/PartnerCenterModule/PartnerCenterModule.psd1
index 7534f9a..730f323 100644
--- a/PartnerCenterModule/PartnerCenterModule.psd1
+++ b/PartnerCenterModule/PartnerCenterModule.psd1
@@ -18,7 +18,7 @@
RootModule = 'PartnerCenterModule.psm1'
# Version number of this module.
-ModuleVersion = '0.9.0.20'
+ModuleVersion = '0.9.0.21'
# ID used to uniquely identify this module
GUID = '4a0bfb55-926c-4c31-8d05-50813b31c712'
@@ -30,7 +30,7 @@ Author = "Microsoft Corporation"
CompanyName = "Microsoft Corporation"
# Copyright
-Copyright = "Copyright (c) 2017 Microsoft Corporation. Licensed under MIT license."
+Copyright = "Copyright (c) 2018 Microsoft Corporation. Licensed under MIT license."
# Description of the functionality provided by this module
Description = 'Partner Center Powershell Module (preview)'
@@ -44,14 +44,18 @@ FunctionsToExport = @('Add-PCAuthentication',
'Add-PCCustomerRoleMember',
'Get-PCAddressRulesByMarket',
'Get-PCAuditRecords',
+ 'Get-PCAuditRecord',
'Get-PCAzureRateCard',
'Get-PCAzureResourceMonthlyUsageRecords',
+ 'Get-PCAzureResourceMonthlyUsageRecord',
'Get-PCBillingProfile',
'Get-PCCustomer',
'Get-PCCustomerBillingProfile',
'Get-PCCustomerCompanyProfile',
'Get-PCCustomerLicensesDeployment',
'Get-PCCustomerLicensesUsage',
+ 'Get-PCCustomerLicenseDeployment',
+ 'Get-PCCustomerLicenseUsage',
'Get-PCCustomerServiceCostSummary',
'Get-PCCustomerUsageSummary',
'Get-PCCustomerUser',
@@ -59,15 +63,18 @@ FunctionsToExport = @('Add-PCAuthentication',
'Get-PCCustomerRoleMember',
'Get-PCCustomerRole',
'Get-PCCustomerRelationships',
+ 'Get-PCCustomerRelationship',
'Get-PCDomainAvailability',
- 'Get-PCGraphUser',
- 'Get-PCGraphUsers',
'Get-PCInvoice',
'Get-PCInvoiceLineItems',
+ 'Get-PCInvoiceLineItem',
'Get-PCLegalBusinessProfile',
'Get-PCLicensesDeployment',
+ 'Get-PCLicenseDeployment',
+ 'Get-PCLicenseUsage',
'Get-PCLicensesUsage',
'Get-PCManagedServices',
+ 'Get-PCManagedService',
'Get-PCMpnProfile',
'Get-PCOffer',
'Get-PCOfferCategoriesByMarket',
@@ -77,9 +84,10 @@ FunctionsToExport = @('Add-PCAuthentication',
'Get-PCSpendingBudget',
'Get-PCSR',
'Get-PCSRTopics',
+ 'Get-PCSRTopic',
'Get-PCSubscribedSKUs',
+ 'Get-PCSubscribedSKU',
'Get-PCSubscription',
- 'Get-PCAzureResourceMonthlyUsageRecords',
'Get-PCSupportProfile',
'Get-PCUsage',
'Get-PCUsage2',
@@ -99,8 +107,6 @@ FunctionsToExport = @('Add-PCAuthentication',
'Remove-PCCustomerRoleMember',
'Restore-PCCustomerUser',
'Select-PCCustomer',
- 'Set-PCModuleTelemetry',
- 'Get-PCModuleTelemetry'
'Set-PCBillingProfile',
'Set-PCCustomerBillingProfile',
'Set-PCCustomerUser',
@@ -108,7 +114,9 @@ FunctionsToExport = @('Add-PCAuthentication',
'Set-PCLegalBusinessProfile',
'Set-PCOrganizationProfile',
'Get-PCIndirectResellers',
+ 'Get-PCIndirectReseller',
'Get-PCResellerCustomers',
+ 'Get-PCResellerCustomer',
'Set-PCSpendingBudget',
'Set-PCSR',
'Set-PCSubscription',
diff --git a/PartnerCenterModule/PartnerCenterModule.psm1 b/PartnerCenterModule/PartnerCenterModule.psm1
index 55e71dc..86d1836 100644
--- a/PartnerCenterModule/PartnerCenterModule.psm1
+++ b/PartnerCenterModule/PartnerCenterModule.psm1
@@ -21,7 +21,6 @@ Import-Module "$($PSScriptRoot)\PartnerCenterOrder.psm1"
Import-Module "$($PSScriptRoot)\PartnerCenterProfiles.psm1"
Import-Module "$($PSScriptRoot)\PartnerCenterServiceRequest.psm1"
Import-Module "$($PSScriptRoot)\PartnerCenterSubscription.psm1"
-Import-Module "$($PSScriptRoot)\PartnerCenterTelemetry.psm1"
Import-Module "$($PSScriptRoot)\PartnerCenterUsage.psm1"
Import-Module "$($PSScriptRoot)\PartnerCenterPartner.psm1"
Import-Module "$($PSScriptRoot)\PartnerCenterUser.psm1"
@@ -432,10 +431,4 @@ class PasswordProfile
Set-Variable -Name "GlobalCustomerID" -Value "" -Scope Global -Visibility Private
Set-Variable -Name "GlobalToken" -Value "" -Scope Global -Visibility Private
-#telemetry variables
-Set-Variable -Name "GlobalPCPSTelemetry" -Value $true -Scope Global -Visibility Private
-Set-Variable -Name "GlobalPCPSCSPDomain" -Value $null -Scope Global -Visibility Private
-Set-Variable -Name "GlobalPCPSExecutionId" -Value $null -Scope Global -Visibility Private
-Set-Variable -Name "GlobalPCPSModuleVersion" -Value $null -Scope Global -Visibility Private
-
diff --git a/PartnerCenterModule/PartnerCenterOffer.psm1 b/PartnerCenterModule/PartnerCenterOffer.psm1
index 3cc5b7f..48eb1ac 100644
--- a/PartnerCenterModule/PartnerCenterOffer.psm1
+++ b/PartnerCenterModule/PartnerCenterOffer.psm1
@@ -1,4 +1,4 @@
-Set-StrictMode -Version latest
+Set-StrictMode -Version latest
<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
@@ -11,7 +11,6 @@ Set-StrictMode -Version latest
# Load common code
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCOffer
{
@@ -24,7 +23,6 @@ function Get-PCOffer
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
$obj = @()
if ($offerid)
@@ -74,9 +72,8 @@ function Get-PCOffer
function Get-PCOfferCategoriesByMarket
{
[CmdletBinding()]
- param($countryid, [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
+ param($countryid, [Parameter(Mandatory = $true)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
$obj = @()
@@ -93,7 +90,7 @@ function Get-PCAddressRulesByMarket
[CmdletBinding()]
param ($countryid, [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/countryvalidationrules/{0}" -f $countryid
@@ -109,7 +106,7 @@ function Get-PCAzureRateCard
[CmdletBinding()]
param ($currency, $region, [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
diff --git a/PartnerCenterModule/PartnerCenterOrder.psm1 b/PartnerCenterModule/PartnerCenterOrder.psm1
index 16d454d..bf2c31e 100644
--- a/PartnerCenterModule/PartnerCenterOrder.psm1
+++ b/PartnerCenterModule/PartnerCenterOrder.psm1
@@ -1,4 +1,4 @@
-Set-StrictMode -Version latest
+Set-StrictMode -Version latest
<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
@@ -11,7 +11,6 @@ Set-StrictMode -Version latest
# Load common code
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCOrder
{
@@ -21,7 +20,7 @@ function Get-PCOrder
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
if ($orderid)
@@ -57,7 +56,7 @@ function New-PCOrder
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$headers = @{"Authorization"="Bearer $satoken"}
@@ -110,7 +109,7 @@ function New-PCAddonOrder
)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/orders/{1}" -f $tenantid, $orderid
diff --git a/PartnerCenterModule/PartnerCenterPartner.psm1 b/PartnerCenterModule/PartnerCenterPartner.psm1
index fa0cefd..b10b788 100644
--- a/PartnerCenterModule/PartnerCenterPartner.psm1
+++ b/PartnerCenterModule/PartnerCenterPartner.psm1
@@ -1,4 +1,4 @@
-Set-StrictMode -Version latest
+Set-StrictMode -Version latest
<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
@@ -11,7 +11,6 @@ Set-StrictMode -Version latest
# Load common code
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCAuditRecords
{
@@ -23,8 +22,8 @@ function Get-PCAuditRecords
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+ Write-Warning " Get-PCAuditRecords is deprecated and will not be available in future releases, use Get-PCAuditRecord instead."
$obj = @()
if ($startDate) { $url = "https://api.partnercenter.microsoft.com/v1/auditrecords?startDate={0}" -f $startDate }
@@ -43,6 +42,37 @@ function Get-PCAuditRecords
return (_formatResult -obj $obj -type "AuditRecord")
}
+# Add non-plural noun version of cmdlet. Plural version of the cmdlet will be removed in future releases.
+function Get-PCAuditRecord
+{
+ [CmdletBinding()]
+ Param(
+ [Parameter(Mandatory = $true)][string]$startDate,
+ [Parameter(Mandatory = $false)][string]$endDate,
+ #[Parameter(Mandatory = $false)][string]$filter,
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
+ )
+ _testTokenContext($satoken)
+
+ $obj = @()
+
+ # TODO Only 30 days can be returned per request, limit the request to 30 days span before executing request
+
+ if ($startDate) { $url = "https://api.partnercenter.microsoft.com/v1/auditrecords?startDate={0}" -f $startDate }
+ if ($endDate) { $url = "https://api.partnercenter.microsoft.com/v1/auditrecords?startDate={0}&endDate={1}" -f $startDate, $endDate }
+ #if ($filter)
+ #{
+ # [Reflection.Assembly]::LoadWithPartialName("System.Web") | Out-Null
+ # $filter = [System.Web.HttpUtility]::UrlEncode($filter)
+ # $url = "https://api.partnercenter.microsoft.com/v1/auditrecords?startDate={0}&endDate={1}&filter={2}" -f $startDate, $endDate, $filter
+ #}
+
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj += $response.items
+ return (_formatResult -obj $obj -type "AuditRecord")
+}
function Get-PCIndirectResellers
{
@@ -51,7 +81,27 @@ function Get-PCIndirectResellers
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
+ Write-Warning " Get-PCIndirectResellers is deprecated and will not be available in future releases, use Get-PCIndirectReseller instead."
+
+ $obj = @()
+
+ $url = "https://api.partnercenter.microsoft.com/v1/relationships?relationship_type=IsIndirectCloudSolutionProviderOf"
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj += $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "PartnerRelationship")
+}
+
+# Add non-plural noun version of cmdlet. Plural version of the cmdlet will be removed in future releases.
+function Get-PCIndirectReseller
+{
+ [CmdletBinding()]
+ Param(
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
+ )
+ _testTokenContext($satoken)
$obj = @()
diff --git a/PartnerCenterModule/PartnerCenterProfiles.psm1 b/PartnerCenterModule/PartnerCenterProfiles.psm1
index 6b008ad..3a8d694 100644
--- a/PartnerCenterModule/PartnerCenterProfiles.psm1
+++ b/PartnerCenterModule/PartnerCenterProfiles.psm1
@@ -1,4 +1,4 @@
-Set-StrictMode -Version latest
+Set-StrictMode -Version latest
<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
@@ -11,7 +11,6 @@ Set-StrictMode -Version latest
# Load common code
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCLegalBusinessProfile
{
@@ -20,7 +19,7 @@ function Get-PCLegalBusinessProfile
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/profiles/legalbusiness"
@@ -38,7 +37,7 @@ function Get-PCOrganizationProfile
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/profiles/organization"
@@ -56,7 +55,7 @@ function Get-PCBillingProfile
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/profiles/billing"
@@ -75,7 +74,7 @@ function Get-PCMpnProfile
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
if($mpnid)
@@ -101,7 +100,7 @@ function Get-PCSupportProfile
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/profiles/support"
@@ -137,7 +136,7 @@ function Set-PCLegalBusinessProfile
#$email_approver
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$actualLegalBP = Get-PCLegalBusinessProfile -satoken $satoken
@@ -183,7 +182,7 @@ function Set-PCOrganizationProfile
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$actualOrganizationP = Get-PCOrganizationProfile -satoken $satoken
@@ -231,7 +230,7 @@ function Set-PCBillingProfile
#$tax_id,$billingCurrency
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$actualBillingP = Get-PCBillingProfile -satoken $satoken
@@ -268,7 +267,7 @@ function Set-PCSupportProfile
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$actualSupportProfile = Get-PCSupportProfile -satoken $satoken
@@ -298,7 +297,6 @@ function Get-PCCustomerBillingProfile
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
$obj = @()
@@ -320,7 +318,7 @@ function Set-PCCustomerBillingProfile
)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/profiles/billing" -f $tenantid
@@ -342,7 +340,7 @@ function Get-PCCustomerCompanyProfile
)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/profiles/company" -f $tenantid
@@ -443,7 +441,7 @@ function Test-PCAddress
[Parameter(ParameterSetName='AllDetails',Mandatory = $true)][string] $country,
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/validations/address"
diff --git a/PartnerCenterModule/PartnerCenterServiceRequest.psm1 b/PartnerCenterModule/PartnerCenterServiceRequest.psm1
index 0b5bfc1..36db6fd 100644
--- a/PartnerCenterModule/PartnerCenterServiceRequest.psm1
+++ b/PartnerCenterModule/PartnerCenterServiceRequest.psm1
@@ -1,4 +1,4 @@
-Set-StrictMode -Version latest
+Set-StrictMode -Version latest
<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
@@ -11,7 +11,6 @@ Set-StrictMode -Version latest
# Load common code
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCSR
{
@@ -24,7 +23,7 @@ function Get-PCSR
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$headers = @{Authorization="Bearer $satoken"}
@@ -45,7 +44,9 @@ function Get-PCSRTopics
[CmdletBinding()]
param([Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
+ Write-Warning " Get-PCSRTopics is deprecated and will not be available in future releases, use Get-PCSRTopic instead."
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/servicerequests/supporttopics"
@@ -56,6 +57,24 @@ function Get-PCSRTopics
return (_formatResult -obj $obj -type "ServiceRequestTopics")
}
+# Add non-plural version of the cmdlet. The plural version will be removed in future versions.
+function Get-PCSRTopic
+{
+ [CmdletBinding()]
+ param([Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
+ _testTokenContext($satoken)
+
+ $obj = @()
+
+ $url = "https://api.partnercenter.microsoft.com/v1/servicerequests/supporttopics"
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj += $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "ServiceRequestTopics")
+}
+
+
function New-PCSR
{
[CmdletBinding()]
@@ -71,7 +90,7 @@ function New-PCSR
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/servicerequests/{0}" -f $agentLocale
$headers = @{Authorization="Bearer $satoken"}
@@ -107,7 +126,7 @@ function Set-PCSR
[Parameter(ParameterSetName='byParam', Mandatory = $false)][string]$satoken = $GlobalToken
)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
if ($serviceRequest) {$body = $serviceRequest | ConvertTo-Json -Depth 100}
diff --git a/PartnerCenterModule/PartnerCenterSubscription.psm1 b/PartnerCenterModule/PartnerCenterSubscription.psm1
index 9f3da8d..618f941 100644
--- a/PartnerCenterModule/PartnerCenterSubscription.psm1
+++ b/PartnerCenterModule/PartnerCenterSubscription.psm1
@@ -1,4 +1,4 @@
-Set-StrictMode -Version latest
+Set-StrictMode -Version latest
<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
@@ -11,7 +11,6 @@ Set-StrictMode -Version latest
# Load common code
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCSubscription
{
@@ -29,7 +28,7 @@ function Get-PCSubscription
)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
function Private:Get-SubscriptionsAllInner ($satoken, $tenantid)
{
@@ -141,7 +140,7 @@ function Set-PCSubscription
)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$actualSubscription = Get-PCSubscription -satoken $satoken -tenantid $tenantid -subscriptionid $subscription.Id
diff --git a/PartnerCenterModule/PartnerCenterTelemetry.psm1 b/PartnerCenterModule/PartnerCenterTelemetry.psm1
deleted file mode 100644
index dba4414..0000000
--- a/PartnerCenterModule/PartnerCenterTelemetry.psm1
+++ /dev/null
@@ -1,67 +0,0 @@
-Set-StrictMode -Version latest
-<#
- © 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
- This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
- any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance
- of the sample code and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation,
- production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business
- profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the
- sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.
-#>
-
-# Load common code
-$here = Split-Path -Parent $MyInvocation.MyCommand.Path
-. "$here\commons.ps1"
-
-function Send-ModuleTelemetry
-{
- [CmdletBinding()]
- Param(
- [Parameter(Mandatory=$true)][string]$functionName
- )
-
- if ($global:GlobalPCPSTelemetry)
- {
- $body = New-Object System.Object
- $body | Add-Member -type NoteProperty -name CSPDomain -value $global:GlobalPCPSCSPDomain
- $body | Add-Member -type NoteProperty -name FunctionName -value $functionName
- $body | Add-Member -type NoteProperty -name ExecutionId -value $global:GlobalPCPSExecutionId
- $body | Add-Member -type NoteProperty -name SourceVersion -value $global:GlobalPCPSModuleVersion
- $body = $body | ConvertTo-Json -Depth 100
- $result = Invoke-RestMethod -Method Post -Uri "https://api.migaz.tools/v1/telemetry/PCPSModule" -Body $body -ContentType "application/json"
- }
-}
-
-function Update-ModuleTelemetry
-{
- [CmdletBinding()]
- Param(
- [Parameter(Mandatory=$true)][string]$cspDomain
- )
-
- $global:GlobalPCPSCSPDomain = $cspDomain
- $global:GlobalPCPSExecutionId = ([Guid]::NewGuid()).Guid
- $global:GlobalPCPSModuleVersion = ((Get-Module -Name PartnerCenterModule).Version | Where-Object {$_ -GT '0.0'}).ToString()
- $latestModuleVersion = Invoke-RestMethod -Method Get -Uri "https://api.migaz.tools/v1/version/PCPSModule"
-
- if ($global:GlobalPCPSModuleVersion -ne $latestModuleVersion)
- {
- Write-Host "A new Partner Center PowerShell Module version ($latestModuleVersion) is available" -ForegroundColor Yellow
- }
-}
-
-function Set-PCModuleTelemetry
-{
- [CmdletBinding()]
- Param(
- [Parameter(Mandatory = $true)][bool]$enabled
- )
- $global:GlobalPCPSTelemetry = $enabled
-}
-
-function Get-PCModuleTelemetry
-{
- return $global:GlobalPCPSTelemetry
-}
-
-
diff --git a/PartnerCenterModule/PartnerCenterUsage.psm1 b/PartnerCenterModule/PartnerCenterUsage.psm1
index c26bb14..9d27325 100644
--- a/PartnerCenterModule/PartnerCenterUsage.psm1
+++ b/PartnerCenterModule/PartnerCenterUsage.psm1
@@ -11,7 +11,6 @@
# Load common code
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCUsage
{
@@ -26,7 +25,6 @@ function Get-PCUsage
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
$retObject = Get-PCUsage_implementation -subscriptionid $subscriptionid -start_time $start_time -end_time $end_time -granularity $granularity -show_details $show_details -size $size -tenantid $tenantid -satoken $satoken
@@ -46,7 +44,6 @@ function Get-PCUsage2
[Parameter(Mandatory = $false, ParameterSetName = 'first')][Parameter(Mandatory = $false, ParameterSetName = 'next')][string]$satoken = $GlobalToken,
[Parameter(Mandatory = $true, ParameterSetName = 'next')]$continuationLink = $null)
_testTokenContext($satoken)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
switch ($PsCmdlet.ParameterSetName)
{
@@ -77,7 +74,6 @@ function Get-PCUsage_implementation
[string]$satoken,
$continuationLink)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
$obj = @()
$urlParts = @("https://api.partnercenter.microsoft.com/v1/")
@@ -144,7 +140,30 @@ function Get-PCSubscriptionMonthlyUsageRecords
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
+ Write-Warning " Get-PCSubscriptionMonthlyUsageRecords is deprecated and will not be available in future releases, use Get-PCSubscriptionMonthlyUsageRecord instead."
+
+ $obj = @()
+
+ $url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/subscriptions/usagerecords" -f $tenantid
+ $headers = @{Authorization = "Bearer $satoken"}
+ $headers += @{"MS-RequestId" = [Guid]::NewGuid()}
+ $headers += @{"MS-CorrelationId" = [Guid]::NewGuid()}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj += $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "SubscriptionMonthlyUsageRecord")
+}
+
+# Adding non-plural noun version of cmdlet. Plural version of the cmdlet will be removed in future versions.
+function Get-PCSubscriptionMonthlyUsageRecord
+{
+ [CmdletBinding()]
+ param ([Parameter(Mandatory = $false)][String]$tenantid = $GlobalCustomerID,
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
+ _testTokenContext($satoken)
+ _testTenantContext ($tenantid)
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/subscriptions/usagerecords" -f $tenantid
@@ -166,7 +185,32 @@ function Get-PCAzureResourceMonthlyUsageRecords
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
+ Write-Warning " Get-PCAzureResourceMonthlyUsageRecords is deprecated and will not be available in future releases, use Get-PCAzureResourceMonthlyUsageRecord instead."
+
+ $obj = @()
+
+ $url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/subscriptions/{1}/usagerecords/resources" -f $tenantid, $subscriptionid
+ $headers = @{Authorization = "Bearer $satoken"}
+ $headers += @{"MS-RequestId" = [Guid]::NewGuid()}
+ $headers += @{"MS-CorrelationId" = [Guid]::NewGuid()}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj += $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "AzureResourceMonthlyUsageRecord")
+}
+
+# Adding non-plural noun version of cmdlet. Plural version of the cmdlet will be removed in future versions.
+function Get-PCAzureResourceMonthlyUsageRecord
+{
+ [CmdletBinding()]
+ param (
+ [Parameter(Mandatory = $false)][String]$tenantid = $GlobalCustomerID,
+ [string]$subscriptionid,
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
+ _testTokenContext($satoken)
+ _testTenantContext ($tenantid)
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/subscriptions/{1}/usagerecords/resources" -f $tenantid, $subscriptionid
@@ -179,6 +223,7 @@ function Get-PCAzureResourceMonthlyUsageRecords
return (_formatResult -obj $obj -type "AzureResourceMonthlyUsageRecord")
}
+
function Get-PCCustomerUsageSummary
{
[CmdletBinding()]
@@ -187,7 +232,7 @@ function Get-PCCustomerUsageSummary
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/usagesummary" -f $tenantid
@@ -211,7 +256,6 @@ function Get-PCCustomerServiceCostSummary
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
$obj = @()
diff --git a/PartnerCenterModule/PartnerCenterUser.psm1 b/PartnerCenterModule/PartnerCenterUser.psm1
index c49f7d9..7531b42 100644
--- a/PartnerCenterModule/PartnerCenterUser.psm1
+++ b/PartnerCenterModule/PartnerCenterUser.psm1
@@ -1,4 +1,4 @@
-Set-StrictMode -Version latest
+Set-StrictMode -Version latest
<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
@@ -11,7 +11,6 @@ Set-StrictMode -Version latest
# Load common code
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
. "$here\commons.ps1"
-Import-Module -FullyQualifiedName "$here\PartnerCenterTelemetry.psm1"
function Get-PCCustomerUser
{
@@ -27,7 +26,6 @@ function Get-PCCustomerUser
)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
function Private:Get-CustomerAllUserInner ($satoken, $tenantid)
{
@@ -118,7 +116,7 @@ function New-PCCustomerUser
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/users" -f $tenantid
@@ -150,7 +148,7 @@ function Set-PCCustomerUser
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$actualUser = Get-PCCustomerUser -tenantid $tenantid -userid $user.Id -satoken $satoken
@@ -186,7 +184,7 @@ function Restore-PCCustomerUser
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/users/{1}" -f $tenantid, $user.id
@@ -209,7 +207,7 @@ function Remove-PCCustomerUser
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/users/{1}" -f $tenantid, $user.id
@@ -230,7 +228,29 @@ function Get-PCCustomerUserRoles
[Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
_testTokenContext($satoken)
_testTenantContext ($tenantid)
- Send-ModuleTelemetry -functionName $MyInvocation.MyCommand.Name
+
+ Write-Warning " Get-PCCustomerUserRoles is deprecated and will not be available in future releases, use Get-PCCustomerUserRole instead."
+
+ $obj = @()
+
+ $url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/users/{1}/directoryroles" -f $tenantid, $user.id
+ $headers = @{Authorization="Bearer $satoken"}
+
+ $response = Invoke-RestMethod -Uri $url -Headers $headers -ContentType "application/json" -Method "GET" #-Debug -Verbose
+ $obj += $response.Substring(1) | ConvertFrom-Json
+ return (_formatResult -obj $obj -type "CustomerUserDirectoryRoles")
+}
+
+# Adding in non-plural noun versions of the cmdlets
+function Get-PCCustomerUserRole
+{
+ [CmdletBinding()]
+ param ( [Parameter(Mandatory = $false)][String]$tenantid=$GlobalCustomerID,
+ [Parameter(Mandatory = $true,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)][PSCustomObject]$user,
+ [Parameter(Mandatory = $false)][string]$satoken = $GlobalToken)
+ _testTokenContext($satoken)
+ _testTenantContext ($tenantid)
+
$obj = @()
$url = "https://api.partnercenter.microsoft.com/v1/customers/{0}/users/{1}/directoryroles" -f $tenantid, $user.id
diff --git a/PartnerCenterModule/commons.ps1 b/PartnerCenterModule/commons.ps1
index a4c7acc..37c41f4 100644
--- a/PartnerCenterModule/commons.ps1
+++ b/PartnerCenterModule/commons.ps1
@@ -1,4 +1,4 @@
-<#
+<#
© 2017 Microsoft Corporation. All rights reserved. This sample code is not supported under any Microsoft standard support program or service.
This sample code is provided AS IS without warranty of any kind. Microsoft disclaims all implied warranties including, without limitation,
any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance
@@ -34,7 +34,7 @@ function _testTenantContext($tenantID)
{
if ($tenantid.Length -lt 1)
{
- throw ">>>Use Select-PCCustomer function to select a specific tenant or use -tenantid parameter<<<"
+ throw ">>> Use Select-PCCustomer function to select a specific tenant or use -tenantId parameter<<<"
}
}
@@ -42,7 +42,7 @@ function _testTokenContext($satoken)
{
if ($satoken.Length -lt 1)
{
- throw ">>>Use Add-PCAuthentication function to login to partnercenter or use -satoken parameter<<<"
+ throw ">>> Use Add-PCAuthentication function to login to partnercenter or use -saToken parameter<<<"
}
}
@@ -64,7 +64,7 @@ function Get-SAToken
$response = Invoke-RestMethod -Uri $url -ContentType "application/x-www-form-urlencoded" -Headers $headers -Body $body -method "POST" #-Debug -Verbose
- #setting SAToke variable as global
+ #setting SAToken variable as global
if ($global){
Set-Variable -Name "GlobalToken" -Value $response.access_token -Scope Global
}
diff --git a/README.md b/README.md
index e0632cc..fc61eb5 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Partner Center PowerShell Module (preview) #
+# Partner Center PowerShell Module #
## Introduction ##
@@ -60,10 +60,10 @@ After completing these steps you are ready to start using the cmdlets for the sc
|:-|:-|:-|
| | | |
| **Analytics** |Retrieve analytics | |
-| | [Get partner licenses deployment information](https://msdn.microsoft.com/en-us/library/partnercenter/mt797761.aspx) | [Get-PCLicensesDeployment](./CmdletHelp/Get-PCLicensesDeployment.md) |
-| | [Get partner licenses usage information](https://msdn.microsoft.com/en-us/library/partnercenter/mt797762.aspx) | [Get-PCLicensesUsage](./CmdletHelp/Get-PCLicensesUsage.md) |
-| | [Get customer licenses deployment information](https://msdn.microsoft.com/en-us/library/partnercenter/mt797759.aspx) | [Get-PCCustomerLicensesDeployment](./CmdletHelp/Get-PCCustomerLicensesDeployment.md) |
-| | [Get customer licenses usage information](https://msdn.microsoft.com/en-us/library/partnercenter/mt797760.aspx) | [Get-PCCustomerLicensesUsage](./CmdletHelp/Get-PCCustomerLicensesUsage.md) |
+| | [Get partner licenses deployment information](https://msdn.microsoft.com/en-us/library/partnercenter/mt797761.aspx) | [Get-PCLicenseDeployment](./CmdletHelp/Get-PCLicenseDeployment.md) |
+| | [Get partner licenses usage information](https://msdn.microsoft.com/en-us/library/partnercenter/mt797762.aspx) | [Get-PCLicenseUsage](./CmdletHelp/Get-PCLicenseUsage.md) |
+| | [Get customer licenses deployment information](https://msdn.microsoft.com/en-us/library/partnercenter/mt797759.aspx) | [Get-PCCustomerLicenseDeployment](./CmdletHelp/Get-PCCustomerLicenseDeployment.md) |
+| | [Get customer licenses usage information](https://msdn.microsoft.com/en-us/library/partnercenter/mt797760.aspx) | [Get-PCCustomerLicenseUsage](./CmdletHelp/Get-PCCustomerLicenseUsage.md) |
| | | |
| **Device Deployment** | Configuration policies | |
| Add, delete, update and retrieve device configuration policies | | |
@@ -111,7 +111,7 @@ After completing these steps you are ready to start using the cmdlets for the sc
| | | [Get-PCCustomerRoleMember](./CmdletHelp/Get-PCCustomerRoleMember.md) |
| | [Set user roles for a customer](https://msdn.microsoft.com/en-us/library/partnercenter/mt725336.aspx) | [Add-PCCustomerRoleMember](./CmdletHelp/Add-PCCustomerRoleMember.md) |
| | [Remove a customer user from a role](https://msdn.microsoft.com/en-us/library/partnercenter/mt745131.aspx) | [Remove-PCCustomerRoleMember](./CmdletHelp/Remove-PCCustomerRoleMember.md) |
-| | [Get a list of available licenses](https://msdn.microsoft.com/en-us/library/partnercenter/mt725331.aspx) | [Get-PCSubscribedSKUs](./CmdletHelp/Get-PCSubscribedSKUs.md) |
+| | [Get a list of available licenses](https://msdn.microsoft.com/en-us/library/partnercenter/mt725331.aspx) | [Get-PCSubscribedSKU](./CmdletHelp/Get-PCSubscribedSKU.md) |
| | [Assign licenses to a user](https://msdn.microsoft.com/en-us/library/partnercenter/mt725326.aspx) | [NA](./CmdletHelp/NA.md) |
| | [Check which licenses are assigned to a user](https://msdn.microsoft.com/en-us/library/partnercenter/mt725327.aspx) | [Get-PCCustomerUser](./CmdletHelp/Get-PCCustomerUser.md) |
| | [Get licenses assigned to a user by license group](https://msdn.microsoft.com/en-us/library/partnercenter/mt784685.aspx) | [NA](./CmdletHelp/NA.md) |
@@ -123,7 +123,7 @@ After completing these steps you are ready to start using the cmdlets for the sc
| | [Get a list of offers for a market](https://msdn.microsoft.com/en-us/library/partnercenter/mt683488.aspx) | [Get-PCOffer](./CmdletHelp/Get-PCOffer.md) |
| | [Get an offer by ID](https://msdn.microsoft.com/en-us/library/partnercenter/mt634678.aspx) | [Get-PCOffer](./CmdletHelp/Get-PCOffer.md) |
| | [Get add-ons for an offer ID](https://msdn.microsoft.com/en-us/library/partnercenter/mt634669.aspx) | [Get-PCOffer](./CmdletHelp/Get-PCOffer.md) |
-| Create an order | | |
+| | [Get a list of products](https://docs.microsoft.com/en-us/partner-center/develop/get-a-list-of-products) | [NA](.CmdletHelp/NA.md) |
| | [Create an order](https://msdn.microsoft.com/en-us/library/partnercenter/mt634667.aspx) | [New-PCOrder](./CmdletHelp/New-PCOrder.md) |
| | [Create an order for a customer of an indirect reseller](https://msdn.microsoft.com/en-us/library/partnercenter/mt808071.aspx) | [NA](./CmdletHelp/NA.md) |
| | [Get an order by ID](https://msdn.microsoft.com/en-us/library/partnercenter/mt634679.aspx) | [Get-PCOffer](./CmdletHelp/Get-PCOffer.md) |
@@ -150,14 +150,14 @@ After completing these steps you are ready to start using the cmdlets for the sc
| **Manage billing** | | |
| Get Azure rates and utilization records | | |
| | [Get prices for Microsoft Azure](https://msdn.microsoft.com/en-us/library/partnercenter/mt774619.aspx) | [Get-PCAzureRateCard](./CmdletHelp/Get-PCAzureRateCard.md) |
-| | [Get a customer's utilization records for Azure](https://msdn.microsoft.com/en-us/library/partnercenter/mt791774.aspx) | [Get-PCUsage](./CmdletHelp/Get-PCUsage.md)
[Get-PCUsage2](./CmdletHelp/Get-PCUsage2.md) |
+| | [Get a customer's utilization records for Azure](https://msdn.microsoft.com/en-us/library/partnercenter/mt791774.aspx) | [Get-PCUsage](./CmdletHelp/Get-PCUsage.md) [Get-PCUsage2](./CmdletHelp/Get-PCUsage2.md) |
| Get invoices | | |
| | [Get the reseller's current account balance](https://msdn.microsoft.com/en-us/library/partnercenter/mt712732.aspx) | [Get-PCInvoice](./CmdletHelp/Get-PCInvoice.md) |
| | [Get invoice by ID](https://msdn.microsoft.com/en-us/library/partnercenter/mt712734.aspx) | [Get-PCInvoice](./CmdletHelp/Get-PCInvoice.md) |
-| | [Get invoice line items](https://msdn.microsoft.com/en-us/library/partnercenter/mt634696.aspx) | [Get-PCInvoiceLineItems](./CmdletHelp/Get-PCInvoiceLineItems.md) |
+| | [Get invoice line items](https://msdn.microsoft.com/en-us/library/partnercenter/mt634696.aspx) | [Get-PCInvoiceLineItem](./CmdletHelp/Get-PCInvoiceLineItem.md) |
| | [Get a collection of invoices](https://msdn.microsoft.com/en-us/library/partnercenter/mt712730.aspx) | [Get-PCInvoice](./CmdletHelp/Get-PCInvoice.md) |
| Check your Azure spending budget | | |
-| | [Get usage data for a subscription](https://msdn.microsoft.com/en-us/library/partnercenter/mt651646.aspx) | [Get-PCAzureResourceMonthlyUsageRecords](./CmdletHelp/Get-PCAzureResourceMonthlyUsageRecords.md) |
+| | [Get usage data for a subscription](https://msdn.microsoft.com/en-us/library/partnercenter/mt651646.aspx) | [Get-PCAzureResourceMonthlyUsageRecord](./CmdletHelp/Get-PCAzureResourceMonthlyUsageRecord.md) |
| | [Get usage summary for all of a customer's subscriptions](https://msdn.microsoft.com/en-us/library/partnercenter/mt651643.aspx) | [Get-PCCustomerUsageSummary](./CmdletHelp/Get-PCCustomerUsageSummary.md) |
| Get service costs | | |
| | [Get a customer's service costs summary](https://msdn.microsoft.com/en-us/library/partnercenter/mt492473.aspx) | [NA](./CmdletHelp/NA.md) |
@@ -165,13 +165,13 @@ After completing these steps you are ready to start using the cmdlets for the sc
| | | |
| **Provide support** | | |
| Admin services for a customer | | |
-| | [Get the managed services for a customer by ID](https://msdn.microsoft.com/en-us/library/partnercenter/mt614220.aspx) | [Get-PCManagedServices](./CmdletHelp/Get-PCManagedServices.md) |
+| | [Get the managed services for a customer by ID](https://msdn.microsoft.com/en-us/library/partnercenter/mt614220.aspx) | [Get-PCManagedService](./CmdletHelp/Get-PCManagedService.md) |
| Manage support contacts | | |
| | [Get a subscription's support contact](https://msdn.microsoft.com/en-us/library/partnercenter/mt803173.aspx) | [NA](./CmdletHelp/NA.md) |
| | [Update a subscription's support contact](https://msdn.microsoft.com/en-us/library/partnercenter/mt803174.aspx) | [NA](./CmdletHelp/NA.md) |
| Manage service requests | | |
| | [Create a service request](https://msdn.microsoft.com/en-us/library/partnercenter/mt805812.aspx) | [New-PCSR](./CmdletHelp/New-PCSR.md) |
-| | [Get service request support topics](https://msdn.microsoft.com/en-us/library/partnercenter/mt634701.aspx) | [Get-PCSRTopics](./CmdletHelp/Get-PCSRTopics.md) |
+| | [Get service request support topics](https://msdn.microsoft.com/en-us/library/partnercenter/mt634701.aspx) | [Get-PCSRTopic](./CmdletHelp/Get-PCSRTopic.md) |
| | [Get all service requests for a customer](https://msdn.microsoft.com/en-us/library/partnercenter/mt634674.aspx) | [Get-PCSR](./CmdletHelp/Get-PCSR.md) |
| | [Update a service request](https://msdn.microsoft.com/en-us/library/partnercenter/mt634719.aspx) | [Set-PCSR](./CmdletHelp/Set-PCSR.md) |
| | | |
@@ -188,9 +188,9 @@ After completing these steps you are ready to start using the cmdlets for the sc
| | [Update an organization profile](https://msdn.microsoft.com/en-us/library/partnercenter/mt712737.aspx) | [Set-PCOrganizationProfile](./CmdletHelp/Set-PCOrganizationProfile.md) |
| | [Get partner by MPN ID](https://msdn.microsoft.com/en-us/library/partnercenter/mt634698.aspx) | [Get-PCMpnProfile](./CmdletHelp/Get-PCMpnProfile.md) |
| | [Get all subscriptions by partner](https://msdn.microsoft.com/en-us/library/partnercenter/mt634676.aspx) | [Get-PCSubscription](./CmdletHelp/Get-PCSubscription.md) |
-| | [Get indirect resellers of a customer](https://msdn.microsoft.com/en-us/library/partnercenter/mt783002.aspx) | [Get-PCCustomerRelationships](./CmdletHelp/Get-PCCustomerRelationships.md) |
-| | [Get customers of an indirect reseller](https://msdn.microsoft.com/en-us/library/partnercenter/mt808157.aspx) | [Get-PCResellerCustomers](./CmdletHelp/Get-PCResellerCustomers.md) |
-| | [Retrieve a list of indirect resellers](https://msdn.microsoft.com/en-us/library/partnercenter/mt783004.aspx) | [Get-PCIndirectResellers](./CmdletHelp/Get-PCIndirectResellers.md) |
+| | [Get indirect resellers of a customer](https://msdn.microsoft.com/en-us/library/partnercenter/mt783002.aspx) | [Get-PCCustomerRelationship](./CmdletHelp/Get-PCCustomerRelationship.md) |
+| | [Get customers of an indirect reseller](https://msdn.microsoft.com/en-us/library/partnercenter/mt808157.aspx) | [Get-PCResellerCustomer](./CmdletHelp/Get-PCResellerCustomer.md) |
+| | [Retrieve a list of indirect resellers](https://msdn.microsoft.com/en-us/library/partnercenter/mt783004.aspx) | [Get-PCIndirectReseller](./CmdletHelp/Get-PCIndirectReseller.md) |
| | | |
| **Utilities** | | |
| | [Validate address format](https://msdn.microsoft.com/en-us/library/partnercenter/mt797658.aspx) | [Test-PCAddress](./CmdletHelp/Test-PCAddress.md) |
@@ -205,16 +205,4 @@ After completing these steps you are ready to start using the cmdlets for the sc
## 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:
-
-```powershell
-Set-PCModuleTelemetry -enabled $false
-```
\ No newline at end of file
+Telemetry has been removed starting in the 0.9.0.21 release.
\ No newline at end of file