| external help file | |
|---|---|
| Module Name | Az.DataMigration |
| online version | https://learn.microsoft.com/powershell/module/az.datamigration/new-azdatamigrationloginsmigration |
| schema | 2.0.0 |
Migrate logins from the source Sql Servers to the target Azure Sql Servers.
New-AzDataMigrationLoginsMigration -ConfigFilePath <String> [-PassThru] [-Confirm] [-WhatIf]
[<CommonParameters>]
New-AzDataMigrationLoginsMigration -SourceSqlConnectionString <String[]> -TargetSqlConnectionString <String>
[-AADDomainName <String>] [-CSVFilePath <String>] [-ListOfLogin <String[]>] [-OutputFolder <String>]
[-PassThru] [-Confirm] [-WhatIf] [<CommonParameters>]
Migrate logins from the source Sql Servers to the target Azure Sql Servers.
Example 1: Run Migrate logins from the source Sql Servers to the target Azure Sql Servers using Parameters
New-AzDataMigrationLoginsMigration -SourceSqlConnectionString "data source=servername;user id=userid;password=;initial catalog=master;TrustServerCertificate=True" -TargetSqlConnectionString "data source=servername;user id=userid;password=;initial catalog=master;TrustServerCertificate=True" -CSVFilePath "C:\CSVFile" -ListOfLogin "loginname1" "loginname2" -OutputFolder "C:\OutputFolder" -AADDomainName "AADDomainName" Starting Logins migration...
Starting server roles migration...
Starting user-login mappings...
Starting server role mappings...
Restoring permissions for logins...
Restoring permissions for server roles...
Login migration process complete.
This command runs Run SKU Recommendation on given SQL Server using the connection string.
Example 2: Run Migrate logins from the source Sql Servers to the target Azure Sql Servers using config file
New-AzDataMigrationLoginsMigration -ConfigFilePath "C:\Users\user\document\config.json"Starting Logins migration...
Starting server roles migration...
Starting user-login mappings...
Starting server role mappings...
Restoring permissions for logins...
Restoring permissions for server roles...
Login migration process complete.
This command runs Run Migrate logins from the source Sql Servers to the target Azure Sql Servers using config file.
Optional. Required if Windows logins are included in the list of logins to be migrated. (Default: empty string).
Type: System.String
Parameter Sets: CommandLine
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePath of the ConfigFile
Type: System.String
Parameter Sets: ConfigFile
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseOptional. Location of CSV file of logins. Use only one parameter between this and listOfLogin.
Type: System.String
Parameter Sets: CommandLine
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseOptional. List of logins in string format. If large number of logins need to be migrated, use CSV file option.
Type: System.String[]
Parameter Sets: CommandLine
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseOptional. Default: %LocalAppData%/Microsoft/SqlLoginMigrations) Folder where logs will be written.
Type: System.String
Parameter Sets: CommandLine
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseType: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseRequired. Connection string(s) for the source SQL instance(s), using the formal connection string format.
Type: System.String[]
Parameter Sets: CommandLine
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseRequired. Connection string(s) for the target SQL instance(s), using the formal connection string format.
Type: System.String
Parameter Sets: CommandLine
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePrompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.