Check the size of AD Connect MS SQL Express database

MS SQL Express has database size limit of 10 Gb, so how to know when to switch to another edition of MS SQL?

To check current database size of AD Connect you can use following commands:

You can also connect to ADSync database with Invoke-Sqlcmd cmdlet from SQLPS PowerShell module: