I’ve been meaning to write something this post for a while but the stars have aligned this week. Garry Bargsley (blog | twitter) published a post about making a schema-only copy of a database on the day that I needed to solve that exact problem. But that’s not what this is about. It’s just a convenient way to demonstrate this shortcut.
I’m sure that a lot of folks do work on the PowerShell command line, trying various things, before committing to writing a full script or function.