title: What is the best way of replicating a database's schema in Powershell without using a backup?
body: <p>I want write a PowerShell script that copies the structure of a database from a remote server to which I can read and write but I cannot back-up.  The database needs to be copied to a local installation of <code>Microsoft SQL Server 2019 (Developer Edition)</code> from the remote server which is <code>MS SQL Server 2012 (Enterprise Edition)</code>.</p>