New-​Azure​RM​Tenant​Subscription

Creates a tenant subscription to an offer.

Syntax

New-AzureRMTenantSubscription
   [-DisplayName <String>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   -OfferId <String>
   [-PipelineVariable <String>]
   [<CommonParameters>]

Description

The New-AzureRMTenantSubscription cmdlet creates a tenant subscription to an offer.

Examples

Example 1: Create a tenant subscription to specific offers

$Offer =  Get-AzureRMOffer -Provider "default" | Where-Object name -eq "ComputeOffer"
New-AzureRmTenantSubscription  -OfferId $offer.Id -DisplayName "Compute Subscription"

This example creates a subscription for the logged-in tenant user to all offers named "ComputeOffer". The first command gets all Azure resource manager offers that are named "ComputeOffer" and stores the offers in the $Offer variable. The second command uses the information stored in the $Offer variable to create a subscription for the logged-in tenant user.

Required Parameters

-OfferId

Specifies the ID of the offer to which the tenant is subscribing.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-DisplayName

Specifies the name of the tenant subscription.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.

Type:ActionPreference
Aliases:infa
Parameter Sets:SilentlyContinue, Stop, Continue, Inquire
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies a variable that is used for storing an informational message.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PipelineVariable

Specifies a variable that stores the value of the current pipeline element.

Type:String
Aliases:pv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Microsoft.AzureStack.Management.Models.SubscriptionDefinition