Error message when setting up port 445 VPN point to site

an mac 41 Reputation points
2021-10-03T07:27:53.82+00:00

on this website: https://github.com/Azure-Samples/azure-files-samples/tree/master/point-to-site-vpn-azure-files, in Step 6 - Persist and mount Azure File Share, the command in the 3rd bullet point "New-PSDrive -Name X -PSProvider FileSystem -Root "\<your-storage-account-name>.file.core.windows.net\<your-file-share-name>" -Persist" doesn't work for me. Instead, I receive an error message in powershell (ran as administrator and non-admin) saying New-PSDrive : The Network resource type is not correct At line:1 char:1 + New-PSDrive -Name -X -PSProvider Filesystem -Root "\blogfilestorage.f .... +CategoryInfo: InvalidOperation (X:PSDriveInfo) [New-PSDrive], Win32Exception +FullyQualifiedErrorID: CouldNotMapNetworkDrive,Microsoft.Powershell.Commands.NewPSDriveCommand" and all this text appears in red font colour.

137163-fileshare.png

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
600 questions
{count} votes

1 answer

Sort by: Most helpful
  1. suvasara-MSFT 10,011 Reputation points
    2021-10-06T04:25:30.81+00:00

    @an mac , I have done a quick repro on this lab and found that everything looks good,

    137958-image.png

    Please have a quick look at this perquisite,

    1. Check the port access for 445:

       $resourceGroupName = "<your-resource-group-name>"  
           $storageAccountName = "<your-storage-account-name>"  
             
           $storageAccount = Get-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName  
             
             
           Test-NetConnection -ComputerName ([System.Uri]::new($storageAccount.Context.FileEndPoint).Host) -Port 445  
    
     
    

    If the connection was successful, you should see the following output:

    137949-image.png

    Ref: https://learn.microsoft.com/en-us/azure/storage/files/storage-troubleshoot-windows-file-connection-problems#cause-1-port-445-is-blocked

    ----------

    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.