Using SSMS you can script out all objects in a database. Right-click on the database, select Tasks then Generate Scripts. Set your options to include database creation and whatever else (like indexes, triggers etc). Save it to a file.
Then run sqlcmd and use the following parameters:
-S servername
-E or
-U and -P credentials with sysadmin rights
-i path + name of file you created above
Make sure the path that the database files get created in exists on the other server first. Otherwise, edit the file and set the path to what it needs to be.
Scott Duncan
MARCUS. Why dost thou laugh? It fits not with this hour.
TITUS. Why, I have not another tear to shed;
--Titus Andronicus, William Shakespeare