Copy table to new empty talbe with indexes and identity

Whoops, sorry about that, I linked to the main page, meant to link to this:

Here's a basic PowerShell script to script a table plus its indexes:

$options = New-DbaScriptingOption
$options.ScriptSchema = $true
$options.IncludeDatabaseContext  = $true
$options.IncludeHeaders = $false
$options.NoCommandTerminator = $false
$options.ScriptBatchTerminator = $true
$options.AnsiFile = $true
$options.Indexes = $true
Get-DbaDbTable -SqlInstance "." -Database test -Table 'dbo.myTable' | Export-DbaScript -FilePath C:\path\file.sql -ScriptingOptionsObject $options