Reputation: 207
I am using below command for mount file on windows azure vm :
$connectTestResult = Test-NetConnection -ComputerName aaadcstore.file.core.windows.net -Port 445
if ($connectTestResult.TcpTestSucceeded) {
# Save the password so the drive will persist on reboot
cmd.exe /C "cmdkey /add:`"aaadcstore.file.core.windows.net`" /user:`"Azure\*******`" /pass:`"*****************`""
# Mount the drive
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\aaadcstore.file.core.windows.net\amazefileshare" -Persist
} else {
Write-Error -Message "Unable to reach the Azure storage account via port 445. Check to make sure your organization or ISP is not blocking port 445, or use Azure P2S VPN, Azure S2S VPN, or Express Route to tunnel SMB traffic over a different port."
}
But my connection TcpTest not Succeeded I have open 445 using NSG but still not working.
Upvotes: 1
Views: 1872
Reputation: 28204
From the error message, probably it's a DNS issue on your Azure VM.
You can verify if you use the Azure-provided DNS server in the Azure VNet where Azure VM located. If you use a custom DNS server and make sure it should be able to resolve the Azure file share FQDN. You need to restart the Azure VM to update the DNS server settings.
Upvotes: 1