Cannot connect to Azure file service from Windows

%3CLINGO-SUB%20id%3D%22lingo-sub-121131%22%20slang%3D%22en-US%22%3ECannot%20connect%20to%20Azure%20file%20service%20from%20Windows%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-121131%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20using%20the%20Azure%20file%20service%20to%20store%20some%20archived%20files.%20%26nbsp%3BI'm%20using%20the%20connection%20string%20autocreated%20by%20Microsoft%20to%20try%20and%20map%20a%20drive.%20%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Enet%20use%20Z%3A%20%5C%5Cmystorageaccount.file.core.windows.net%5Carchive%20%2Fu%3AAZURE%5Cmystoreageaccount%20longautogeneratedpasswordbymicrosoft%3D%3D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20error%20I%20get%20is%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESystem%20error%2086%20has%20occurred.%3C%2FP%3E%3CP%3EThe%20specified%20network%20password%20is%20not%20correct.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tried%20this%20on%20a%20couple%20of%20different%20machines%20(W10%20and%20Win%20Server%202012%20R2)%20with%20the%20same%20results.%20%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20however%20use%20the%20file%20AzFileDiagnostics.ps1%20from%20%3CA%20href%3D%22https%3A%2F%2Fgallery.technet.microsoft.com%2FTroubleshooting-tool-for-a9fa1fe5%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgallery.technet.microsoft.com%2FTroubleshooting-tool-for-a9fa1fe5%3C%2FA%3E%20to%20connect%20to%20the%20file%20store%20and%20map%20a%20share.%20%26nbsp%3BDoes%20anyone%20have%20a%20view%20why%20powershell%20works%20and%20the%20net%20use%20command%20does%20not.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-121131%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EData%20%26amp%3B%20Storage%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EStorage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-121830%22%20slang%3D%22en-US%22%3ERe%3A%20Cannot%20connect%20to%20Azure%20file%20service%20from%20Windows%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-121830%22%20slang%3D%22en-US%22%3E%3CP%3ENet%20user%20commands%20works.%20But%20in%20here%20when%20we%20copy%20from%20the%20Microsoft%20generated%20command%20the%20storage%20key%20(password)%20was%20not%20copying%20correctly.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20have%20to%20delete%20the%20password%20and%20copy%20the%20storage%20key(password)%20from%20the%20storage%20account%20and%20use%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Deleted
Not applicable

I'm using the Azure file service to store some archived files.  I'm using the connection string autocreated by Microsoft to try and map a drive.  

 

net use Z: \\mystorageaccount.file.core.windows.net\archive /u:AZURE\mystoreageaccount longautogeneratedpasswordbymicrosoft==

 

The error I get is 

 

System error 86 has occurred.

The specified network password is not correct.

 

I've tried this on a couple of different machines (W10 and Win Server 2012 R2) with the same results.  

I can however use the file AzFileDiagnostics.ps1 from https://gallery.technet.microsoft.com/Troubleshooting-tool-for-a9fa1fe5 to connect to the file store and map a share.  Does anyone have a view why powershell works and the net use command does not.

1 Reply

Net user commands works. But in here when we copy from the Microsoft generated command the storage key (password) was not copying correctly. 

 

You have to delete the password and copy the storage key(password) from the storage account and use it.