Assess an Enterprise With Data Migration Assistant–Part 2: Running an Assessment

In my previous post I took you through the prerequisites for successfully running a scaled assessment against your SQL Server enterprise.

In this post I’ll take you through how to run a scaled assessment using the dmaDataCollector PowerShell script.


Running a scaled assessment

Ensure that the PowerShell modules have been loaded into the modules directory and that an inventory has been created.  If not, see Part 1 of this series before continuing.


Open PowerShell and run the dmaDataCollector function.



  • getServerListFrom – Your inventory.  Possible values are SqlServer or CSV
  • serverName – The SQL Server instance name of the inventory when using SqlServer in the getServerListFrom parameter
  • databaseName – The database hosting the inventory table
  • AssessmentName – The name of the DMA Assessment
  • TargetPlatform – The assessment target type you would like to perform.  Possible values are AzureSQLDatabase, SQLServer2012, SQLServer2014, SQLServer2016, SQLServerLinux2017, SQLServerWindows2017
  • AuthenticationMethod – The authentication method for connecting to the SQL Server targets to assess.  Possible values are SQLAuth and WindowsAuth
  • OutputLocation – The location to store the JSON assessment output file


If there is an unexpected error then the command window which gets initiated by this process will be terminated.  Review the error log to see why it failed.



The output file

The output file will be written to the directory specified in the OutputLocation parameter.


Note that depending on the number of databases being assessed and the number of objects within the databases, the assessments can take a very long time.  The file will be written once the assessments have completed.


In the next post we will look at how to consume this assessment JSON file in preparation for reporting.


Script Disclaimer

The sample scripts provided here are not supported under any Microsoft standard support program or service. All scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.  Please seek permission before reposting these scripts on other sites/repositories/blogs.

Skip to main content