Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-DcnImage uses $Credential for testing access, instead of $DestinateionCredential #220

Open
blitzmann opened this issue Aug 10, 2022 · 0 comments

Comments

@blitzmann
Copy link
Contributor

blitzmann commented Aug 10, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant