Script: Auto-add new SQL DBs for protection

Published Feb 14 2019 08:01 PM 49 Views
First published on TECHNET on Nov 19, 2007

This is a sample script that will automatically add all the newly available SQL DBs in all instances for protection. You can customize this easily to change the protection policy. Save the attached file as a .ps1 file and invoke through the DPM Management Shell. The script can also be added to the Windows scheduler and run on a scheduled basis.


- Kapil, Hitesh, Balaji


AddNewSQL.ps1

%3CLINGO-SUB%20id%3D%22lingo-sub-340304%22%20slang%3D%22en-US%22%3EScript%3A%20Auto-add%20new%20SQL%20DBs%20for%20protection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-340304%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20TECHNET%20on%20Nov%2019%2C%202007%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EThis%20is%20a%20sample%20script%20that%20will%20automatically%20add%20all%20the%20newly%20available%20SQL%20DBs%20in%20all%20instances%20for%20protection.%20You%20can%20customize%20this%20easily%20to%20change%20the%20protection%20policy.%20Save%20the%20attached%20file%20as%20a%20.ps1%20file%20and%20invoke%20through%20the%20DPM%20Management%20Shell.%26nbsp%3BThe%20script%20can%20also%20be%20added%20to%20the%20Windows%20scheduler%20and%20run%20on%20a%20scheduled%20basis.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E-%20Kapil%2C%20Hitesh%2C%20Balaji%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FTNBlogsFS%2Fprod.evol.blogs.technet.com%2Ftelligent.evolution.components.attachments%2F01%2F4787%2F00%2F00%2F02%2F52%2F11%2F53%2FAddNewSQL.ps1%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%20AddNewSQL.ps1%20%3C%2FA%3E%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-340304%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20TECHNET%20on%20Nov%2019%2C%202007%20This%20is%20a%20sample%20script%20that%20will%20automatically%20add%20all%20the%20newly%20available%20SQL%20DBs%20in%20all%20instances%20for%20protection.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-340304%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESystem%20Center%20Data%20Protection%20Manager%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Mar 11 2019 07:58 AM
Updated by: