File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070 )
7171
7272 begin {
73+ # Get the module configurations
74+ $pdcSqlInstance = Get-PSFConfigValue - FullName psdatabaseclone.database.Server
75+ $pdcDatabase = Get-PSFConfigValue - FullName psdatabaseclone.database.name
76+ if (-not $pdcCredential ) {
77+ $pdcCredential = Get-PSFConfigValue - FullName psdatabaseclone.database.credential - Fallback $null
78+ }
79+ else {
80+ $pdcCredential = $PSDCSqlCredential
81+ }
82+
7383 # Test the module database setup
7484 try {
75- Test-PSDCConfiguration - SqlCredential $PSDCSqlCredential - EnableException
85+ Test-PSDCConfiguration - SqlCredential $pdcCredential - EnableException
7686 }
7787 catch {
7888 Stop-PSFFunction - Message " Something is wrong in the module configuration" - ErrorRecord $_ - Continue
7989 }
8090
81- $pdcSqlInstance = Get-PSFConfigValue - FullName psdatabaseclone.database.server
82- $pdcDatabase = Get-PSFConfigValue - FullName psdatabaseclone.database.name
83-
8491 $query = "
8592 SELECT ImageID,
8693 ImageName,
You can’t perform that action at this time.
0 commit comments