
$file = "C:\backups\" + $args[0] + ".bak"

$b = new-object ($smo + 'backup')
$b.Database = $args[0]
$b.Devices.AddDevice($file, [Microsoft.SqlServer.Management.Smo.DeviceType]::File) 
$b.Action = "Database"
$b.SqlBackup($server)