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.
LVL 15
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dbbishopAuthor Commented:
well, had a lull in my 12-hour work day, so I ran a quick test (sometimes asking can get faster results). In case anyone is interested, it is only for that session. The default value does not get changed.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.