Set-AzsSubscription
Create or updates a subscription.
Syntax
UpdateExpanded (Default)
Set-AzsSubscription
-SubscriptionId <String>
[-DisplayName <String>]
[-Id <String>]
[-OfferId <String>]
[-State <SubscriptionState>]
[-TenantId <String>]
[-DefaultProfile <PSObject>]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Update
Set-AzsSubscription
-SubscriptionDefinition
[-DefaultProfile <PSObject>]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
Description
Create or updates a subscription.
Examples
Example 1
PS C:\> $subscription = Get-AzsSubscription | where DisplayName -eq 'testsubscription'
$subscription.DisplayName = 'update subscription'
$subscription | Set-AzsSubscription | fl *
DisplayName : update subscription
Id : /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e
OfferId : /delegatedProviders/default/offers/TestOffer-fef68214-ba47-469c-89a7-07faf7947ad6
State : Enabled
SubscriptionId : aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e
TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee
Updates a subscription.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: System.Management.Automation.SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: System.Management.Automation.PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DisplayName
Subscription name.
Parameter properties
Type: System.String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Id
Fully qualified identifier.
Parameter properties
Type: System.String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-OfferId
Identifier of the offer under the scope of a delegated provider.
Parameter properties
Type: System.String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-State
Subscription state.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.Subscription.Support.SubscriptionState
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionDefinition
List of supported operations.
To construct, see NOTES section for SUBSCRIPTIONDEFINITION properties and create a hash table.
Parameter properties
Type: Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.Api20151101.ISubscription
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
Update
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
Id of the subscription.
Parameter properties
Type: System.String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TenantId
Directory tenant identifier.
Parameter properties
Type: System.String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: System.Management.Automation.SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.Api20151101.ISubscription
Outputs
Microsoft.Azure.PowerShell.Cmdlets.Subscription.Models.Api20151101.ISubscription
Notes
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
SUBSCRIPTIONDEFINITION <ISubscription>: List of supported operations.
[DisplayName <String>]
: Subscription name.
[Id <String>]
: Fully qualified identifier.
[OfferId <String>]
: Identifier of the offer under the scope of a delegated provider.
[State <SubscriptionState?>]
: Subscription state.
[SubscriptionId <String>]
: Subscription identifier.
[TenantId <String>]
: Directory tenant identifier.