Dim conn As New ServerConnection(serverName, userName, passWd) ‘— set SQL server connection given the server name, user name and password
Dim oSQLServer As New Server(conn) ‘–create the SMO server object using connection

Dim OrigBackupPath As String = oSQLServer.Information.MasterDBPath.Replace(“\DATA”, “\Backup\DB_BACKUP_NAME.BAK”) ‘ — set the path where backup file will be stored