Editar

Partilhar via


New-AzDataMigrationProject

Creates a new Azure Database Migration Service (classic) project.

Syntax

New-AzDataMigrationProject
   -ResourceGroupName <String>
   -ServiceName <String>
   -Location <String>
   -Name <String>
   -SourceType <String>
   -TargetType <String>
   [-SourceConnection <ConnectionInfo>]
   [-TargetConnection <ConnectionInfo>]
   [-DatabaseInfo <DatabaseInfo[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzDataMigrationProject
   [-InputObject] <PSDataMigrationService>
   -Location <String>
   -Name <String>
   -SourceType <String>
   -TargetType <String>
   [-SourceConnection <ConnectionInfo>]
   [-TargetConnection <ConnectionInfo>]
   [-DatabaseInfo <DatabaseInfo[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzDataMigrationProject
   [-ResourceId] <String>
   -Location <String>
   -Name <String>
   -SourceType <String>
   -TargetType <String>
   [-SourceConnection <ConnectionInfo>]
   [-TargetConnection <ConnectionInfo>]
   [-DatabaseInfo <DatabaseInfo[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzDataMigrationProject cmdlet creates a new Azure Database Migration Service (classic) project. This cmdlet takes in all necessary parameters, such as the name of the Azure Resource Group, the name of Azure Data Migration Service in which new project is to be created, the region in which the project is to be created, the unique name of the new project, the source and target connection objects, and the target type object, as input for the list of databases to migrate. Use the New-AzDataMigrationConnectionInfo cmdlet to create a new ConnectionInfo object for both the source and target connections. The list of Microsoft.Azure.Management.DataMigration.Models.DatabaseInfo is expected for selected databases; this object can be created by using New-AzDataMigrationDatabaseInfo cmdlet.

Examples

Example 1

New-AzDataMigrationProject -ResourceGroupName MyResourceGroup -ServiceName TestService -ProjectName MyDMSProject -Location "central us"  -SourceType SQL -TargetType SQLDB -SourceConnection $sourceConnInfo -TargetConnection $targetConnInfo -DatabaseInfo $dbList

The above example shows how to create new project named MyDMSProject located in Central US region under the Azure Database Migration Service (classic) instance named TestService.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DatabaseInfo

Database Infos.

Type:DatabaseInfo[]
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:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

PSDataMigrationService Object.

Type:PSDataMigrationService
Aliases:DataMigrationService
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Location

The location of the Azure Database Migration Service (classic) instance.

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

-Name

The name of the project.

Type:String
Aliases:ProjectName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group.

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

-ResourceId

DataMigrationService Resource Id.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ServiceName

The name of the Azure Database Migration Service (classic) instance.

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

-SourceConnection

Source Connection Info.

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

-SourceType

Source platform type for project.

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

-TargetConnection

Target connection information.

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

-TargetType

Target platform type for project.

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

-WhatIf

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

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

Inputs

PSDataMigrationService

String

Outputs

PSProject