Azcopy fails while executing thorugh powershell.

Dinesh Kumar 1 Reputation point
2020-06-09T15:36:25.777+00:00

Hi,

Getting the below error while executing azcopy from powershell.

$args = "/Source:\\UNCservcer\env\older /Dest:https://1234env.blob.core.windows.net/folder1/folder2  /DestKey:hsyugf-*********== /S /XO /V:\\uncserver\SHARE\folderlog\log_123.log"
$exepath  = "F:\Prgrm flss\azcopy\AzCopy.exe"
Start-Process   $exepath $args-Wait

I used the above code and got this error.
Error parsing destination location "https://1234env.blob.core.windows.net/folder1/folder2": The request was aborted: Could not create SSL/TLS secure channel.

I removed the the log(/V) and tried. But no luck.
I could see some solutions like to disable the the firewall and run azcopy as an adminstrator. But I am restricted to do this stuffs.

Thanks.

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,219 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,920 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Manu Philip 18,676 Reputation points MVP
    2020-06-09T16:26:00.74+00:00

    Hello @DineshKumar,

    Please change the url as below: Reason: Syntax has changed in recent azcopy versions. SOURCE parameter is not longer used, ACCESS KEYS are not longer used for authentication. You need to use SAS (Shared Access Signatures)

     azcopy cp "C:\myfolder*" "https://YOURSTORAGEACCOUNT.blob.core.windows.net/photos/?sv=2018-03-28&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-06-07T13:30:00Z&st=2019-06-07T04:30:00Z&spr=https,http&sig=u5bUaEKOXJHqSbWVK16SiOgcI2SVg8mLAr2ujKWe%2F%2FI%3D" --recursive=true
    

    Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion

    Regards,

    Manu


  2. Manu Philip 18,676 Reputation points MVP
    2020-06-10T19:23:57.707+00:00

    Hello Dinesh,

    You may check if it's a TLS issue for executing the PowerShell commands. That need a registry tweak as follows

    Open Powershell and check for supported protocols by using the command

    [Net.ServicePointManager]::SecurityProtocol
    

    Run anyone of the following 2 cmdlets to set .NET Framework strong cryptography registry keys:

    Set strong cryptography on 64 bit .Net Framework (version 4 and above)

    Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
    

    set strong cryptography on 32 bit .Net Framework (version 4 and above)

    Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
    

    Restart Powershell and check again for supported protocol by using

    Run the original PS commands again and check if you were able to susceed

    Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion

    Regards,

    Manu

    0 comments No comments

  3. Sumarigo-MSFT 46,446 Reputation points Microsoft Employee
    2020-06-11T05:05:37.883+00:00

    @DineshKumar-0907 I see you have posted similar query in SO forum, If you are still finding any difficulties, please let me know


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.