Summarize Command's Functionality
Hello, can I suggest adding an "IF EXIST" Logic check to the function "Export-DbaCredential"?
This would aid during with migration or DR scripts, so that only missing credentials are created
Is there a command that is similiar or close to what you are looking for?
Yes
Technical Details
I would suggest adding the following to lines 191 & 194
sql += "IF NOT EXISTS(SELECT [name] FROM master.sys.credentials WHERE [name] = '$quotename') CREATE CREDENTIAL
as a prefix to the current sql += "CREATE CREDENTIAL
Summarize Command's Functionality
Hello, can I suggest adding an "IF EXIST" Logic check to the function "Export-DbaCredential"?
This would aid during with migration or DR scripts, so that only missing credentials are created
Is there a command that is similiar or close to what you are looking for?
Yes
Technical Details
I would suggest adding the following to lines 191 & 194
sql += "IF NOT EXISTS(SELECT [name] FROM master.sys.credentials WHERE [name] = '$quotename') CREATE CREDENTIAL
as a prefix to the current sql += "CREATE CREDENTIAL