Is there a way to robocopy and pipeline Get-Credential? I am trying to copy a file over to a window server for my workplace which requires my credentials
I saw things like subprocess and tried that but can't seem to call Get-Credential to input my creds.
powershell = "robocopy " + Migration_data_csv + " " + destination + "/S | Get-Credential"
ps = subprocess.Popen(powershell,shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
I end up getting an error when I try to pipe the command Get-Credential
b"'Get-Credential' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
If not is there a way for me to copy a file over to a window server? I also tried FTP via ftplib but the window server refuse the connection.