Forum Discussion

gustavooka's avatar
gustavooka
Copper Contributor
Feb 07, 2023

Azure VM can't connect to FileShare

Hi guys,

 

I am trying to connect an Azure VM (other subscription) to an Azure Storage Account (FileShare). I am using the "Enabled from selected virtual networks and IP addresses" and already add the public IP of the VM but when I try to map the File Share on Azure VM, I receive this error:

 

CMDKEY: Credential added successfully.
New-PSDrive : Access is denied
At line:5 char:5
+ New-PSDrive -Name Q -PSProvider FileSystem -Root "\\xxxxxxxx...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Q:PSDriveInfo) [New-PSDrive], Win32Exception
+ FullyQualifiedErrorId : CouldNotMapNetworkDrive,Microsoft.PowerShell.Commands.NewPSDriveCommand

 

If I permit all public connections everything works fine and I am able to map the FS also in an other VM that is in the same subscription and is permitted with VNET is able to connect too.

Resources