This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Help file updates and bug fixes (#63)
Updated version to 0.10.0.0 New Features: * Added an application id to send as part of the REST request to identify the application traffic. * Enabled Get-PCUsage to return more than 1000 usage records. * Basic help information provided for each cmdlet. Bug Fixes * Removed inoperable export of Set-PCGraphUserPassword * Made the CountryId parameter mandatory for the Get-PCAddressRulesByMarket, otherwise an error was thrown. * Fixed an issue where Set-PCLegalBusinessProfile could not update the primary contact information. * Fixed an issue where Set-PCSupportProfile could not set information, if any of the default properties were missing. * Added validation for the -Currency and -Region parameters on Get-PCAzureRatecard * Added regex validation for the -StartDate and -EndDate parameters of Get-PCAuditRecord * Added regex validation for the -CountryId parameter for all cmdlets. Breaking Changes * Removed the Get-PCUsage2 cmdlet, replaced by Get-PCUsage functionality. * Renamed -start_time, -end_time, -show_details parameters to -StartTime, -EndTime, and -ShowDetail respectively for the following cmdlets: * Get-PCUsage * Renamed the -Size parameter to -ResultSize on the following cmdlets: * Get-PCUsage * Removed the All parameter from the following cmdlets: * Get-PCCustomer * Get-PCSR * Get-PCSubscription * Get-PCCustomerUser * Removed the following cmdlets, instead use the new cmdlet name: * Get-PCCustomerLicensesDeployment use Get-PCCustomerLicenseDeployment * Get-PCCustomerLicensesUsage use Get-PCCustomerLicenseUsage * Get-PCInvoiceLineItems use Get-PCInvoiceLineItem * Get-PCResellerCustomers use Get-PCResellerCustomer * Get-PCAzureResourceMonthlyUsageRecords use Get-PCAzureResourceMonthlyUsageRecord * Get-PCCustomerRelationships use Get-PCCustomerRelationship * Get-PCIndirectResellers use Get-PCIndirectReseller * Get-PCLicensesUsage use Get-PCLicenseUsage * Get-PCLicensesDeployment use Get-PCLicenseDeployment * Get-PCAuditRecords use Get-PCAuditRecord * Get-PCSubscribedSKUs use Get-PCSubscribedSKU * Modified the -AutoRenewEnabled parameter for Set-PCSubscription to be -AutoRenew * Get-PCCustomerRole, Remove-PCCustomerUser, Set-PCCustomerUser now require the user id to be passed instead of a PowerShell object containing all of the user information. The parameter was also renamed from -User to -UserId to better reflect this change.
- Loading branch information
1 parent
7de553f
commit 5053ba4
Showing
97 changed files
with
7,956 additions
and
1,873 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"cSpell.enabledLanguageIds": [ | ||
"asciidoc", | ||
"c", | ||
"cpp", | ||
"csharp", | ||
"css", | ||
"go", | ||
"handlebars", | ||
"html", | ||
"jade", | ||
"javascript", | ||
"javascriptreact", | ||
"json", | ||
"latex", | ||
"less", | ||
"markdown", | ||
"php", | ||
"plaintext", | ||
"powershell", | ||
"pub", | ||
"python", | ||
"restructuredtext", | ||
"rust", | ||
"scss", | ||
"text", | ||
"typescript", | ||
"typescriptreact", | ||
"yml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,46 @@ | ||
# Partner Center PowerShell Module Changelog | ||
|
||
## 0.9.0.21 (2018-05-22) | ||
## 0.10.0.0 (2018-06-13) | ||
|
||
### Features | ||
|
||
* 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 | ||
* Added an application id to send as part of the REST request to identify the application traffic. | ||
* Enabled Get-PCUsage to return more than 1000 usage records. | ||
|
||
### 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. | ||
* Removed inoperable export of Set-PCGraphUserPassword | ||
* Made the CountryId parameter mandatory for the Get-PCAddressRulesByMarket, otherwise an error was thrown. | ||
* Fixed an issue where Set-PCLegalBusinessProfile could not update the primary contact information. | ||
* Fixed an issue where Set-PCSupportProfile could not set information, if any of the default properties were missing. | ||
|
||
* Added validation for the -Currency and -Region parameters on Get-PCAzureRatecard | ||
* Added regex validation for the -StartDate and -EndDate parameters of Get-PCAuditRecord | ||
* Added regex validation for the -CountryId parameter for all cmdlets. | ||
|
||
### Breaking Changes | ||
|
||
* No breaking changes with this release | ||
* Removed the Get-PCUsage2 cmdlet, replaced by Get-PCUsage functionality. | ||
* Renamed -start_time, -end_time, -show_details parameters to -StartTime, -EndTime, and -ShowDetail respectively for the following cmdlets: | ||
* Get-PCUsage | ||
* Renamed the -Size parameter to -ResultSize on the following cmdlets: | ||
* Get-PCUsage | ||
* Removed the All parameter from the following cmdlets: | ||
* Get-PCCustomer | ||
* Get-PCSR | ||
* Get-PCSubscription | ||
* Get-PCCustomerUser | ||
* Removed the following cmdlets, instead use the new cmdlet name: | ||
* Get-PCCustomerLicensesDeployment use Get-PCCustomerLicenseDeployment | ||
* Get-PCCustomerLicensesUsage use Get-PCCustomerLicenseUsage | ||
* Get-PCInvoiceLineItems use Get-PCInvoiceLineItem | ||
* Get-PCResellerCustomers use Get-PCResellerCustomer | ||
* Get-PCAzureResourceMonthlyUsageRecords use Get-PCAzureResourceMonthlyUsageRecord | ||
* Get-PCCustomerRelationships use Get-PCCustomerRelationship | ||
* Get-PCIndirectResellers use Get-PCIndirectReseller | ||
* Get-PCLicensesUsage use Get-PCLicenseUsage | ||
* Get-PCLicensesDeployment use Get-PCLicenseDeployment | ||
* Get-PCAuditRecords use Get-PCAuditRecord | ||
* Get-PCSubscribedSKUs use Get-PCSubscribedSKU | ||
* Modified the -AutoRenewEnabled parameter for Set-PCSubscription to be -AutoRenew | ||
* Get-PCCustomerRole, Remove-PCCustomerUser, Set-PCCustomerUser now require the user id to be passed instead of a PowerShell object containing all of the user information. The parameter was also renamed from -User to -UserId to better reflect this change. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,101 @@ | ||
# Add-PCAuthentication # | ||
# Add-PCAuthentication | ||
|
||
## Set a global token for the script session - user authentication ## | ||
Authenticates the current session with the Partner Center API. | ||
|
||
## SYNTAX | ||
|
||
```powershell | ||
$cred = Get-Credential | ||
Add-PCAuthentication -cspappID '<native app id GUID>' -cspDomain '<csp partner domain>' -credential $cred | ||
Add-PCAuthentication -CspAppId <String> -CspDomain <String> -Credential <PSCredential> [<CommonParameters>] | ||
Add-PCAuthentication -CspAppId <String> -CspDomain <String> -CspClientSecret <SecureString> [<CommonParameters>] | ||
``` | ||
|
||
## Set a global token for the script session - app authentication ## | ||
## DESCRIPTION | ||
|
||
```powershell | ||
$clientSecret = '<key code secret>' | ||
$clientSecretSecure = $clientSecret | ConvertTo-SecureString -AsPlainText -Force | ||
Add-PCAuthentication -cspappID '<web app id GUID>' -cspDomain '<csp partner domain>' -cspClientSecret $clientSecretSecure | ||
The Add-PCAuthentication cmdlet sets up authentication for the Partner Center API. Authenticate with either App authentication or App+User authentication to use other cmdlets in this module. | ||
|
||
## PARAMETERS | ||
|
||
### -CspAppId <String> | ||
|
||
Specifies a application Id generated for the Partner Center account. The application id must match the authentication type chosen. | ||
|
||
``` | ||
Required? true | ||
Position? named | ||
Default value | ||
Accept pipeline input? false | ||
Accept wildcard characters? false | ||
``` | ||
|
||
### -CspDomain <String> | ||
|
||
Specifies the Partner Center tenant (onmicrosoft.com) domain. | ||
|
||
``` | ||
Required? true | ||
Position? named | ||
Default value | ||
Accept pipeline input? false | ||
Accept wildcard characters? false | ||
``` | ||
|
||
### -CspClientSecret <SecureString> | ||
|
||
Specifies an application secret key generated from the Partner Center portal. | ||
|
||
``` | ||
Required? true | ||
Position? named | ||
Default value | ||
Accept pipeline input? false | ||
Accept wildcard characters? false | ||
``` | ||
|
||
### -Credential <PSCredential> | ||
|
||
Specifies the user account credentials to use to perform this task. To specify this parameter, you can type a user name, such as User1 or Domain01\User01 or you can specify a PSCredential object. If you specify a user name for this parameter, the cmdlet prompts for a password. | ||
You can also create a PSCredential object by using a script or by using the Get-Credential cmdlet. You can then set the Credential parameter to the PSCredential object. | ||
|
||
``` | ||
Required? true | ||
Position? named | ||
Default value | ||
Accept pipeline input? false | ||
Accept wildcard characters? false | ||
``` | ||
|
||
## INPUTS | ||
|
||
## OUTPUTS | ||
|
||
## NOTES | ||
|
||
Some cmdlets require App+User authentication. If you are working with invoices or users, you should use App+User authentication. | ||
|
||
$clientSecret = '<key code secret>' | ||
$clientSecretSecure = $clientSecret | ConvertTo-SecureString -AsPlainText -Force | ||
$cred = Get-Credential | ||
|
||
## EXAMPLES | ||
|
||
You can obtain the Web App ID and the Client Secret from either Partner Center UI or Azure Active Directory | ||
|
||
### EXAMPLE 1 | ||
|
||
Set a global token for the script session - App+User authentication | ||
|
||
```powershell | ||
PS C:\>$cred = Get-Credential | ||
PS C:\>Add-PCAuthentication -CspAppId '<native app id GUID>' -CspDomain '<csp partner domain>' -Credential $cred | ||
``` | ||
|
||
### EXAMPLE 2 | ||
|
||
Set a global token for the script session - App authentication | ||
|
||
```powershell | ||
PS C:\>$clientSecret = '<key code secret>' | ||
PS C:\>$clientSecretSecure = $clientSecret | ConvertTo-SecureString -AsPlainText -Force | ||
PS C:\>Add-PCAuthentication -CspAppId '<web app id GUID>' -CspDomain '<csp partner domain>' -CspClientSecret $clientSecretSecure | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,99 @@ | ||
# Add-PCCustomerRoleMember # | ||
# Add-PCCustomerRoleMember | ||
|
||
## Specify a customer ## | ||
Adds a customer user account. | ||
|
||
## SYNTAX | ||
|
||
```powershell | ||
Add-PCCustomerRoleMember [[-TenantId] <String>] [-RoleId] <String> [-CustomerRoleMember] <PSObject> [[-SaToken] <String>] [<CommonParameters>] | ||
``` | ||
|
||
## DESCRIPTION | ||
|
||
The Add-PCCustomerRoleMember cmdlet adds a customer user account into a role. | ||
|
||
## PARAMETERS | ||
|
||
### -TenantId <String> | ||
|
||
Specifies the tenant for which to add the role member. | ||
|
||
``` | ||
Required? false | ||
Position? 1 | ||
Default value $GlobalCustomerId | ||
Accept pipeline input? false | ||
Accept wildcard characters? false | ||
``` | ||
|
||
### -RoleId <String> | ||
|
||
Specifies the role id for which to add the member. | ||
|
||
``` | ||
Required? true | ||
Position? 2 | ||
Default value | ||
Accept pipeline input? false | ||
Accept wildcard characters? false | ||
``` | ||
|
||
### -CustomerRoleMember <PSObject> | ||
|
||
Specifies the member to add to the role. | ||
|
||
``` | ||
Required? true | ||
Position? 3 | ||
Default value | ||
Accept pipeline input? true (ByValue, ByPropertyName) | ||
Accept wildcard characters? false | ||
``` | ||
|
||
### -SaToken <String> | ||
|
||
Specifies a security token for authenticating and executing the cmdlet. | ||
|
||
``` | ||
Required? false | ||
Position? 4 | ||
Default value $GlobalToken | ||
Accept pipeline input? false | ||
Accept wildcard characters? false | ||
``` | ||
|
||
## OUTPUTS | ||
|
||
System.Object | ||
|
||
## NOTES | ||
|
||
## EXAMPLES | ||
|
||
### EXAMPLE 1 | ||
|
||
Specify a customer tenant | ||
|
||
```powershell | ||
$customer = Get-PCCustomer -tenantid '<tenant id GUID>' | ||
$customer = Get-PCCustomer -TenantId '<tenant id GUID>' | ||
``` | ||
|
||
## Get a role ## | ||
Get a role | ||
|
||
```powershell | ||
$role = Get-PCCustomerRole -tenantid $customer.id | Where-Object name -Contains '<role name>' | ||
$role = Get-PCCustomerRole -TenantId $customer.id | Where-Object name -Contains '<role name>' | ||
``` | ||
|
||
## Get a User ## | ||
Get a User | ||
|
||
```powershell | ||
$user = Get-PCCustomerUser -tenantid $customer.id -userid '<user id guid>' | ||
$user = Get-PCCustomerUser -TenantId $customer.id -UserId '<user id guid>' | ||
``` | ||
|
||
## Add a User to a Role ## | ||
Add the user to a Role | ||
|
||
```powershell | ||
$customerRoleMember = [DirectoryRoleMember]::new() | ||
$customerRoleMember.id = $user.id | ||
Add-PCCustomerRoleMember -tenantid $customer.id -roleid $role.id -customerrolemember $customerRoleMember | ||
Add-PCCustomerRoleMember -TenantId $customer.id -RoleId $role.id -CustomerRoleMember $customerRoleMember | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,57 @@ | ||
# Get-PCAddressRulesByMarket # | ||
# Get-PCAddressRulesByMarket | ||
|
||
## Get all address rules for countryid ## | ||
Retrieves a list of address rules for a specified market. | ||
|
||
## SYNTAX | ||
|
||
```powershell | ||
Get-PCAddressRulesByMarket [-CountryId] <String> [[-SaToken] <String>] [<CommonParameters>] | ||
``` | ||
|
||
## DESCRIPTION | ||
|
||
The Get-PCAddressRulesByMarket returns a list of rules for the specified market. | ||
|
||
## PARAMETERS | ||
|
||
### -CountryId <String> | ||
|
||
Specifies a two-character ISO 2 country code. | ||
|
||
``` | ||
Required? true | ||
Position? 1 | ||
Default value | ||
Accept pipeline input? false | ||
Accept wildcard characters? false | ||
``` | ||
|
||
### -SaToken <String> | ||
|
||
Specifies an authentication token you have created with your Partner Center credentials. | ||
|
||
``` | ||
Required? false | ||
Position? 2 | ||
Default value $GlobalToken | ||
Accept pipeline input? false | ||
Accept wildcard characters? false | ||
``` | ||
|
||
## INPUTS | ||
|
||
## OUTPUTS | ||
|
||
## NOTES | ||
|
||
You need to have authenticated before running this cmdlet. | ||
|
||
## EXAMPLES | ||
|
||
### EXAMPLE 1 | ||
|
||
Return the address rules for the US. | ||
|
||
```powershell | ||
Get-PCAddressRulesByMarket -countryid '<country two digits id>' | ||
PS C:\>Get-PCAddressRulesByMarket -CountryId US | ||
``` |
Oops, something went wrong.