Link to home
Start Free TrialLog in
Avatar of D B
D BFlag for United States of America

asked on

PowerShell with SQL Server SMO BackupDirectory

Within PowerShell, is the SMO.Settings.BackupDirectory a read-write property. If it can be written to, does that affect the value that has been stored for the database server, or is it just for that invocation of the object?

I am using the Microsoft.SqlServer.Management.Smo.Server object to perform a backup of the database before running the script. The client does not want the backup stored in the default folder. If changing this setting changes it for the database, then I will need to retrieve the current value and save it, perform the backup, then set it back to the original value, so I need to know the scope involved if I change the value.
ASKER CERTIFIED SOLUTION
Avatar of D B
D B
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial