Add-BT_Subscription -Ticket <Ticket> -ProductSkuId <guid> [-Environment <string>] [-Id <guid>] [-IsDeleted <bool>] [-Created <datetime>] [-Updated <datetime>] [-Version <int>] [-SystemUserId <guid>] [-WorkgroupOrganizationId <guid>] [-SubscriptionStartDate <datetime>] [-SubscriptionEndDate <datetime>] [-BillingStartDate <datetime>] [-BillingEndDate <datetime>] [-AgreementMonths <int>] [-AgreementPenaltyPrice <decimal>] [-OverridePrice <decimal>] [-SubscriptionProrationType <SubscriptionProrationType>] [-BillingFrequencyMonths <int>] [-SubscriptionProcessState <SubscriptionProcessState>] [-ErrorCode <ErrorCode>] [-SubscriptionRenewalPolicy <SubscriptionRenewalPolicy>] [-AccessLevel <AccessLevel>] [-ReferenceEntityId <guid>] [-EntityReferenceId <guid>] [-ReferenceEntityType <SubscriptionEntityReferenceType>] [-SubscriptionEntityReferenceType <SubscriptionEntityReferenceType>] [<CommonParameters>]
Add-BT_Subscription -Ticket <Ticket> -EndpointUrl <string> -ProductSkuId <guid> [-Id <guid>] [-IsDeleted <bool>] [-Created <datetime>] [-Updated <datetime>] [-Version <int>] [-SystemUserId <guid>] [-WorkgroupOrganizationId <guid>] [-SubscriptionStartDate <datetime>] [-SubscriptionEndDate <datetime>] [-BillingStartDate <datetime>] [-BillingEndDate <datetime>] [-AgreementMonths <int>] [-AgreementPenaltyPrice <decimal>] [-OverridePrice <decimal>] [-SubscriptionProrationType <SubscriptionProrationType>] [-BillingFrequencyMonths <int>] [-SubscriptionProcessState <SubscriptionProcessState>] [-ErrorCode <ErrorCode>] [-SubscriptionRenewalPolicy <SubscriptionRenewalPolicy>] [-AccessLevel <AccessLevel>] [-ReferenceEntityId <guid>] [-EntityReferenceId <guid>] [-ReferenceEntityType <SubscriptionEntityReferenceType>] [-SubscriptionEntityReferenceType <SubscriptionEntityReferenceType>] [<CommonParameters>]
Add-BT_Subscription adds a(an) BT_Subscription. Subscription entity class for storing a single subscription. Used for reoccurring billing. A subscription represents a user subscription that is required to run MSPComplete services for this user.
Paremeter specs:
| Required | True |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | True |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | True |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Available values are listed below.
| Value | Description |
|---|---|
| BT | Represents BT |
| Beta | Represents Beta |
| Develop | Represents Develop |
| Release | Represents Release |
| Test | Represents Test |
| China | Represents China |
| Germany | Represents Germany |
| Alpha | Represents Alpha |
| Today | Represents Today |
| Sandbox-02 | Represents Sandbox-02 |
| Sandbox-03 | Represents Sandbox-03 |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Available values are listed below.
| Value | Description |
|---|---|
| None | None. |
| CustomerEndUser | The subscription is for a . |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Available values are listed below.
| Value | Description |
|---|---|
| NotProcessed | Not processed. |
| SuccessfullyProcessed | Successfully processed. |
| FailureToProcess | Failure to process. |
| Revoked | Revoked. |
| RevokeNotProcessed | Not processed for revoke. |
| FailureToRevoke | Failure to revoke. |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Available values are listed below.
| Value | Description |
|---|---|
| None | No proration. |
| BeginningProrated | The value indicating whether to prorate the first billing cycle. |
| EndProrated | The value indicating whether to prorate the last billing cycle. |
| BeginningAndEndProrated | Whether we prorate the first and the last billing cycle. |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Available values are listed below.
| Value | Description |
|---|---|
| Default | Use the policy defined at the customer level. |
| DoNotAutoRenew | Do not auto renew the subscription. |
| AutoRenew | Auto renew the subscription. |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
Paremeter specs:
| Required | False |
|---|---|
| ValueFromPipeline | False |
| ValueFromPipelineByPropertyName | False |
System.Object
Ticket requirement
Subscriptions are under workgroups, thus a ticket scoped to a workgroup is required.
Subscription process state
The subscription process state can be non-processed, successfully processed, failed to processed or revoked. It is automatically updated and can take a few dozens of seconds to be updated.
Product sku id
The product sku id can be found with the Get-BT_ProductSkuID cmdlet.
-------------------------- Example 1 -------------------------
# Retrieve the ticket and the customer end users
$productSkuId = Get-BT_ProductSkuID -Ticket $btTicket -ProductName MspcEndUserYearlySubscription
$workgroups = Get-BT_Workgroup -Ticket $btTicket
$customers = Get-BT_Customer -Ticket $btTicket -WorkgroupId $workgroups[0].Id
$workgroupTicket = Get-BT_Ticket -Ticket $btTicket -WorkgroupId $workgroups[0].Id -OrganizationId $workgroups[0].WorkgroupOrganizationId
$customerEndUsers = Get-BT_CustomerEndUser -Ticket $btTicket -OrganizationId $customers[0].OrganizationId
# Assign an MSPC subscription to the first user
Add-BT_Subscription -ticket $workgroupTicket -SubscriptionEntityReferenceType CustomerEndUser -EntityReferenceId $customerEndUsers[0].Id -ProductSkuId $productSkuId