
$b = new-object ($smo + 'backup')
$b.Database = "pubs"
$b.Devices.AddDevice("C:\backups\pubs.bak", [Microsoft.SqlServer.Management.Smo.DeviceType]::File) 
$b.Action = [Microsoft.SqlServer.Management.Smo.BackupActionType]::Database
$b.SqlBackup($server)