dataplat / dbaclone

👯 Clone SQL Server databases using PowerShell previously named PSDatabaseClone
https://github.com/sqlcollaborative/dbaclone/wiki
MIT License
134 stars 29 forks source link

New function: Get-DcnConfiguration #197

Open lowlydba opened 2 years ago

lowlydba commented 2 years ago

Is your feature request related to a problem? Please describe. Since the module more or less relies on a config step, it'd be nice to have a wrapper for Get-PSFConfig -Module dbaclone to abstract the usage of the third party module involved.

This would make it easy to automate checking if the config needs to be (re)set, without making someone dig into the otherwise un-exposed usage of PowerShell Framework to handle the config metadata for the module. This could be helpful on CI build agents which might have harder resets or have new machines swapped out consistently.

An example might be:

if (-not(Get-DcnConfiguration)) {
   Set-DcnConfiguration ...
}
lowlydba commented 2 years ago

Otherwise, exposing Test-DcnConfiguration or a variation of it as a user function might also work.