Modifies an existing subscription.
Set-PCSubscription [[-TenantId] <String>] [-Subscription] <PSObject> [[-Status] <String>] [[-FriendlyName] <String>] [[-AutoRenew] <String>] [[-Quantity] <Int32>] [[-SaToken] <String>] [<CommonParameters>]
The Set-PCSubscription cmdlet modifies an existing subscription.
Specifies the tenant used for scoping this cmdlet.
Required? false
Position? 1
Default value $GlobalCustomerId
Accept pipeline input? false
Accept wildcard characters? false
Specifies the subscription object that identifies the subscription you will modified. This object can be retrieved using the Get-PCSubscription cmdlet.
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
Specifies the status for the subscription. Valid values are: none, active, suspended, and deleted.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies a friendly name for the subscription.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies as to whether the subscription will auto renew. This is only valid on license-based subscriptions. Valid inputs are: enabled, disabled. This parameter used to be -AutoRenewEnabled in earlier releases.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies the number of licenses included in the subscription. This is valid only on license-based subscriptions.
Required? false
Position? 6
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
Specifies an authentication token with your Partner Center credentials.
Required? false
Position? 7
Default value $GlobalToken
Accept pipeline input? false
Accept wildcard characters? false
Update subscription friendly name
Find the tenant information about the customer named Wingtip Toys
PS C:\>$customer = Get-PCCustomer | Where-Object {$_.CompanyProfile.CompanyName -eq 'Wingtip Toys'}
Find the the customer subscription
PS C:\>$subscription = Get-PCSubscription -TenantId $customer.id | Where-Object {$_.FriendlyName -eq 'old friendly name'}
Update the subscription with a new friendly name
PS C:\>$subscription | Set-PCSubscription -TenantId $customer.id -FriendlyName 'New friendly name'
Update subscription seats (license based only)
Find the tenant information about the customer named Wingtip Toys
PS C:\>$customer = Get-PCCustomer | Where-Object {$_.CompanyProfile.CompanyName -eq 'Wingtip Toys'}
Find the the customer subscription
PS C:\>$subscription = Get-PCSubscription -TenantId $customer.id | Where-Object {$_.FriendlyName -eq 'Office 365 Enterprise E1'}
Update the license quantity for the specified subscription
PS C:\>$subscription | Set-PCSubscription -TenantId $customer.id -quantity 100
Change the subscription auto renewal
Find the tenant information about the customer named Wingtip Toys
PS C:\>$customer = Get-PCCustomer | Where-Object {$_.CompanyProfile.CompanyName -eq 'Wingtip Toys'}
Find the the customer subscription
PS C:\>$subscription = Get-PCSubscription -TenantId $customer.id | Where-Object {$_.FriendlyName -eq 'Office 365 Enterprise E1'}
Modify the AutoRenew option for the subscription
PS C:\>$subscription | Set-PCSubscription -TenantId $customer.id -AutoRenew disabled
Suspend a subscription
Find the tenant information about the customer named Wingtip Toys
PS C:\>$customer = Get-PCCustomer | Where-Object {$_.CompanyProfile.CompanyName -eq 'Wingtip Toys'}
Find the the customer subscription
PS C:\>$subscription = Get-PCSubscription -TenantId $customer.id | Where-Object {$_.FriendlyName -eq 'Office 365 Enterprise E1'}
Suspend the subscription
PS C:\>$subscription | Set-PCSubscription -TenantId $customer.id -Status suspended
Activate a subscription
Find the tenant information about the customer named Wingtip Toys
PS C:\>$customer = Get-PCCustomer | Where-Object {$_.CompanyProfile.CompanyName -eq 'Wingtip Toys'}
Find the the customer subscription
PS C:\>$subscription = Get-PCSubscription -TenantId $customer.id | Where-Object {$_.FriendlyName -eq 'Office 365 Enterprise E1'}
$subscription | Set-PCSubscription -TenantId $customer.id -Status active