We recommend using Visual Studio 2017

BackupRestoreBase.SetPassword Method (String)

Sets the password for a backup set.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.SmoExtended (in Microsoft.SqlServer.SmoExtended.dll)

public void SetPassword(
	string value


Type: System.String
A String value that specifies the password for the backup set.

Use passwords to protect the backup sets if the backup medium is used to back up several databases with different owners.