-
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
dbaclone/functions/image/New-DcnImage.ps1
Lines 238 to 257 in 1bf7759
| if (-not $computer.IsLocalhost) { | |
| # Get the result for the remote test | |
| $resultPSRemote = Test-DcnRemoting -ComputerName $computer -Credential $Credential | |
| # Check the result | |
| if ($resultPSRemote.Result) { | |
| $command = [scriptblock]::Create("Import-Module dbaclone -Force") | |
| try { | |
| Invoke-PSFCommand -ComputerName $computer -ScriptBlock $command -Credential $Credential | |
| } | |
| catch { | |
| Stop-PSFFunction -Message "Couldn't import module remotely" -Target $command | |
| return | |
| } | |
| } | |
| else { | |
| Stop-PSFFunction -Message "Couldn't connect to host remotely.`nVerify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer" -Target $resultPSRemote -Continue | |
| } | |
| } |
These commands use $Credential, however they are never defined., I believe it's supposed to be $DestinationCredential. This is currently preventing us from creating a new image on our build server and passing in admin credentials, because it's not actually using them.
Metadata
Metadata
Assignees
Labels
No labels