當我嘗試將檔案共享連接到我的 Windows 筆記本電腦時,它說埠 445 被阻塞。
請幫我解決這個問題。
感謝您的熱心幫助。
錯誤:
if ($connectTestResult.TcpTestSucceeded) {
# Save the password so the drive will persist on reboot
cmd.exe /C "cmdkey /add:`"storagetestmy3.file.core.windows.net`" /user:`"localhost\storagetestmy3`"
/pass:`"ZvWYXdvAkX112rT8k2MxQLqlcDi1oA EZNNoGeQ2Bv88DDUWFdtcmbXXfKk/mHNMlw1TDVX3Vrkb AStoh/kOQ==`""
# Mount the drive
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\storagetestmy3.file.core.windows.net\fileshare3" -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."
} : 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.
CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException

uj5u.com熱心網友回復:
根據MSFT Doc of 445 Portblocked by Windows File Connection to Azure File Share,
您的客戶端作業系統應支持 SMB 3.0。確保
SMB Direct在您的 Windows 系統中啟用了此選項。
Test-NetConnection在您應該獲得PingSucceededas的 Windows PowerShell 中運行此命令True。此測驗是為了驗證埠 445 是否被您的 ISP 或 VPN 阻止。
如果您的測驗結果是False,則您的 ISP 或防火墻需要打開埠 445(TCP Outbound)。
另一種測驗埠 445 是否被防火墻或 ISP 阻止的方法是使用AzFileDiagnostics 工具。
原因:
從區域或資料中心外部,Azure 檔案僅允許 SMB 3.0 與加密支持連接。
由于在較低 SMB 版本中發現漏洞的一些歷史原因,445 埠已被 ISP 或系統防火墻或組織阻止。
從 Windows 系統連接到 Azure 檔案共享的替代方法:
- 可以為 Azure 檔案共享設定點到站點 VPN。請參閱此GitHub 文章以設定 P2S VPN。
- 從本地計算機上,您可以使用 SMB 3.0 協議裝載檔案共享。
- 你可以使用 Azure 存盤資源管理器等工具來訪問檔案共享中的檔案。
示例:從存盤帳戶生成 Azure 檔案共享的 SAS URL。

打開 Azure 存盤資源管理器并使用 SAS URL 登錄存盤帳戶:
在接下來的視窗中選擇 SAS URL 選項并粘貼從 Azure 存盤帳戶門戶復制的 URL,然后單擊連接。
結果:

- 您可以使用存盤客戶端庫、REST API、PowerShell 或 Azure CLI 從應用程式訪問 Azure 檔案共享中的檔案。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/461513.html
