Compartir a través de


Test-AzsMoveUserSubscription

Validate that user subscriptions can be moved between delegated provider offers.

Syntax

Test-AzsMoveUserSubscription
    -ResourceId <String[]>
    [-SubscriptionId <String>]
    [-DestinationDelegatedProviderOffer <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-PassThru]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]
Test-AzsMoveUserSubscription
    -MoveSubscriptionsDefinition \<IMoveSubscriptionsDefinition>
    [-SubscriptionId <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-PassThru]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]
Test-AzsMoveUserSubscription
    -INPUTOBJECT \<ISubscriptionsAdminIdentity>
    -MoveSubscriptionsDefinition \<IMoveSubscriptionsDefinition>
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-PassThru]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]
Test-AzsMoveUserSubscription
    -INPUTOBJECT \<ISubscriptionsAdminIdentity>
    -ResourceId <String[]>
    [-DestinationDelegatedProviderOffer <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-PassThru]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]

Description

Validate that user subscriptions can be moved between delegated provider offers.

Examples

Example 1

PS C:\> Test-MoveUserSubscription \`
	-DestinationDelegatedProviderOffer "/subscriptions/45ec4d39-8dea-4d26-a373-c176ec53717a/providers/Microsoft.Subscriptions.Admin/delegatedProviders/798568b7-c6f1-4bf7-bb8f-2c8bebc7c777/offers/ro1"
	-ResourceId "/subscriptions/45ec4d39-8dea-4d26-a373-c176ec53717a/providers/Microsoft.Subscriptions.Admin/subscriptions/ce4c7fdb-5a38-46f5-8bbc-b8b328a87ab6","/subscriptions/45ec4d39-8dea-4d26-a373-c176ec53717a/providers/Microsoft.Subscriptions.Admin/subscriptions/a0d1a71c-0b27-4e73-abfc-169512576f7d"

Test that user subscriptions can be moved to a delegated provider offer.

Example 2

PS C:\> $resourceIds = Get-AzsUserSubscription | where Displayname -eq "testsubscription" | Select -ExpandProperty Id
Test-MoveUserSubscription -ResourceId $resourceIds

Test that user subscriptions can be moved from a delegated provider to the Default Provider.

Parameters

-AsJob

Run the command as a job

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:System.Management.Automation.PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DestinationDelegatedProviderOffer

The delegated provider offer identifier (from the Admin context) that the subscriptions to be moved to.

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

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Models.ISubscriptionsAdminIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-MoveSubscriptionsDefinition

The move subscriptions action definition To construct, see NOTES section for MOVESUBSCRIPTIONSDEFINITION properties and create a hash table.

Type:Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Models.Api20151101.IMoveSubscriptionsDefinition
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-NoWait

Run the command asynchronously

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Returns true when the command succeeds

Type:System.Management.Automation.SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

A collection of subscriptions to move to the target delegated provider offer.

Type:System.String[]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.

Type:System.String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Models.Api20151101.IMoveSubscriptionsDefinition

Microsoft.Azure.PowerShell.Cmdlets.SubscriptionsAdmin.Models.ISubscriptionsAdminIdentity

Outputs

System.Boolean

ALIASES

Test-AzsMoveSubscription

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.

INPUTOBJECT <ISubscriptionsAdminIdentity>: Identity Parameter

  • [DelegatedProvider <String>]: DelegatedProvider identifier.
  • [DelegatedProviderSubscriptionId <String>]: Delegated provider subscription identifier.
  • [Id <String>]: Resource identity path
  • [Location <String>]: The AzureStack location.
  • [ManifestName <String>]: The manifest name.
  • [Offer <String>]: Name of an offer.
  • [OfferDelegationName <String>]: Name of a offer delegation.
  • [OperationsStatusName <String>]: The operation status name.
  • [Plan <String>]: Name of the plan.
  • [PlanAcquisitionId <String>]: The plan acquisition Identifier
  • [Quota <String>]: Name of the quota.
  • [ResourceGroupName <String>]: The resource group the resource is located under.
  • [SubscriptionId <String>]: Subscription credentials which uniquely identify Microsoft Azure subscription.The subscription ID forms part of the URI for every service call.
  • [TargetSubscriptionId <String>]: The target subscription ID.
  • [Tenant <String>]: Directory tenant name.

MOVESUBSCRIPTIONSDEFINITION <IMoveSubscriptionsDefinition>: The move subscriptions action definition

  • Resources <String[]>: A collection of subscriptions to move to the target delegated provider offer.
  • [TargetDelegatedProviderOffer <String>]: The delegated provider offer identifier (from the Admin context) that the subscriptions to be moved to.