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

Copy using SMB files as -Credential is not passed #269

Open
arudell opened this issue May 23, 2024 · 0 comments
Open

Copy using SMB files as -Credential is not passed #269

arudell opened this issue May 23, 2024 · 0 comments

Comments

@arudell
Copy link
Member

arudell commented May 23, 2024

Describe the bug
Copy-FileToRemoteComputer and Copy-FileFromRemoteComputer currently do not pass the $Credential variable to the SMB file copy method. In scenarios where -Credential is required, we hit an "Access Denied" and fallback to WinRM.

To improve the experience, we need to add support for -Credential when copying files. Copy-Item does not natively support -Credential so we will need to ensure we leverage New-PSDrive to fill this gap. Additional logic needed to detect if already exists.

To Reproduce
Steps to reproduce the behavior:

  1. Enter into remote session and then attempt to Install-SdnDiagnostics to fabric nodes, while passing -Credential.
  2. Observe the SMB copy operation fails due to Access Denied and fallback to WinRM proceeds to copy the file.

Expected behavior
We should support credential when performing SMB file copy operation.

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