File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 115115 $pdcSqlInstance = Get-PSFConfigValue - FullName psdatabaseclone.database.Server
116116 $pdcDatabase = Get-PSFConfigValue - FullName psdatabaseclone.database.name
117117 if (-not $PSDCSqlCredential ) {
118- $pdcCredential = Get-PSFConfig - FullName psdatabaseclone.database.credential - Fallback $null
118+ $pdcCredential = Get-PSFConfigValue - FullName psdatabaseclone.database.credential - Fallback $null
119119 }
120120 else {
121121 $pdcCredential = $PSDCSqlCredential
157157 Stop-PSFFunction - Message " Could not connect to Sql Server instance $SqlInstance " - ErrorRecord $_ - Target $SqlInstance
158158 }
159159
160+ # Check if Hyper-V enabled for the SQL instance
161+ if (-not (Test-PSDCHyperVEnabled - HostName $server.Name - Credential $Credential )) {
162+ Stop-PSFFunction - Message " Hyper-V is not enabled on the remote host." - ErrorRecord $_ - Target $uriHost - Continue
163+ }
164+
160165 # Setup the computer object
161166 $computer = [PsfComputer ]$server.Name
162167
You can’t perform that action at this time.
0 commit comments