Edit

Share via


Move-AzReservationDirectory

Change directory (tenant) of ReservationOrder and all Reservation under it to specified tenant id

Syntax

ChangeExpanded (Default)

Move-AzReservationDirectory
    -ReservationOrderId <String>
    [-DestinationTenantId <String>]
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ChangeViaJsonString

Move-AzReservationDirectory
    -ReservationOrderId <String>
    -JsonString <String>
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ChangeViaJsonFilePath

Move-AzReservationDirectory
    -ReservationOrderId <String>
    -JsonFilePath <String>
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ChangeViaIdentityExpanded

Move-AzReservationDirectory
    -InputObject <IReservationsIdentity>
    [-DestinationTenantId <String>]
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Change directory (tenant) of ReservationOrder and all Reservation under it to specified tenant id

Examples

Example 1: Move reservation order from one tenant to another

Move-AzReservationDirectory -ReservationOrderId "7c31a9e8-8490-4002-88cd-3a16b71362a9" -DestinationTenantId "f65fbe9a-14b0-44c6-8c0d-2ef2c4543040"
Reservation                 : {{
                                "id": "e2ce59da-9753-47f6-8576-2a2fab559409",
                                "name": "VM_RI_05-26-2022_16-53",
                                "isSucceeded": true
                              }, {
                                "id": "9a852181-9cec-43a4-852e-8cfd0bec11aa",
                                "name": "VM_RI_05-26-2022_16-53",
                                "isSucceeded": true
                              }, {
                                "id": "6dc205d9-8049-4179-9d60-29eb1d0082b3",
                                "name": "VM_RI_05-26-2022_16-53",
                                "isSucceeded": true
                              }}
ReservationOrderError       :
ReservationOrderId          : 7c31a9e8-8490-4002-88cd-3a16b71362a9
ReservationOrderIsSucceeded : True
ReservationOrderName        : VM_RI_05-26-2022_16-53

Move reservation order from one tenant to another

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type: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 DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Parameter properties

Type: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

-DestinationTenantId

Tenant id GUID that reservation order is to be transferred to

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ChangeExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ChangeViaIdentityExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity Parameter

Parameter properties

Type:IReservationsIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ChangeViaIdentityExpanded
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-JsonFilePath

Path of Json file supplied to the Change operation

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ChangeViaJsonFilePath
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JsonString

Json string supplied to the Change operation

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ChangeViaJsonString
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ReservationOrderId

Order Id of the reservation

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ChangeExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ChangeViaJsonString
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
ChangeViaJsonFilePath
Position:Named
Mandatory:True
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: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.

Inputs

IReservationsIdentity

Outputs

IChangeDirectoryResponse