Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows

แก้ไข Remote Desktop Error Code 0x3000046 บน Windows

เมื่อพยายามเชื่อมต่อ Remote Desktop บน Windows 11/10 อาจเจอรหัสข้อผิดพลาด 0x3000046 บทความนี้แนะนำวิธีแก้ไข ปัญหานี้มักเกิดเมื่อเชื่อมต่อ Windows Virtual Desktop (WVD) ผ่าน Windows client (บางครั้งผ่าน web client) อาจเจอ 0x3000047 แทน

แก้ไข Remote Desktop Error Code 0x3000046 บน Windows

ข้อความเต็ม:

Remote Desktop
We couldn't connect because there are currently no available resources. Try again later or contact tech support for help if this keeps happening.
Error code: 0x3000046

เกิดเมื่อไม่สามารถเชื่อมต่อ personal virtual desktop (direct assignment) เมื่อสร้าง host pool และ session host จาก Azure Virtual Desktop (AVD) portal ใหม่ (WVD v2)

วิธีแก้ Remote Desktop Error Code 0x3000046

  1. Configure UPNs ให้เหมือนกันใน on-prem DCs และ Azure AD
  2. เพิ่มผู้ใช้ใน Remote Desktop Users group
  3. Assign user(s) ไปยัง personal desktop ด้วย PowerShell
  4. Assign personal desktop ให้ user จาก AVD new portal

Workaround ชั่วคราว: เริ่ม VM ด้วยตนเองจาก Azure portal (เหมาะสำหรับผู้ใช้ไม่มาก)

1. Configure UPNs ให้เหมือนกัน

ให้ UPNs ใน on-prem Domain Controllers และ Azure AD เหมือนกัน รวมถึง O365 UPN ต้องตรงกับ User Logon Name ใน Local AD

  • เปิด Active Directory Domains and Trusts
  • คลิกขวา Active Directory Domains and Trusts > Properties
  • ใน Alternative UPN suffixes ใส่ domain suffix ของ user ที่อนุญาตให้ใช้ WVD
  • Add > แก้ไข user logon name ให้ตรงกับ O365/AAD tenant (เช่นจาก [email protected] เป็น [email protected])
  • Save > Exit

ลองเชื่อมต่อ Remote Desktop ใหม่ ควรแก้ไขได้

2. เพิ่มผู้ใช้ใน Remote Desktop Users group

  • Start > Administrative Tools > Computer Management
  • Local Users and Groups > Groups > Remote Desktop Users > Add
  • Select Users > Locations > Object Types > ใส่ชื่อ > Check Names > OK

3. Assign user(s) ไปยัง personal desktop ด้วย PowerShell

  • ติดตั้ง Visual Studio Code for AVD Management
  • ตั้งค่า PowerShell ใน VS Code: Ctrl+P > ext install powershell > Install
  • รันคำสั่งใน Windows Terminal:
Install-Module -Name Microsoft.RDInfra.RDPowerShell
Install-Module -Name Az.DesktopVirtualization -RequiredVersion 2.1.0
Import-Module -Name Microsoft.RDInfra.RDPowerShell
  • รันคำสั่งเลือก subscription:
Connect-AzAccount
Get-AzSubscription | Out-GridView -PassThru | Select-AzSubscription
Update-AzWvdHostPool -ResourceGroupName WVD-Resource-Group -Name HostPool -StartVMOnConnect:$True
  • รันคำสั่ง assign user (แทนที่ตัวแปร hostpoolname, sessionhostname, resourcegroupname, userupn):
Update-AzWvdSessionHost -HostPoolName $hostpoolname -Name $sessionhostname -ResourceGroupName $resourcegroupname -AssignedUser $userupn
  • Exit Terminal

4. Assign personal desktop ให้ user จาก AVD new portal

  • Login portal.azure.com
  • Search Azure Virtual Desktop > คลิกไอคอน
  • Select Personal Host Pool > Session Hosts
  • เลื่อนไปคอลัมน์ Assigned user > คลิก Assign > เลือก user (direct assignment)

ลองเชื่อมต่อ Remote Desktop ใหม่ ควรสำเร็จ

Related post: Fix Remote Desktop Error Code 0x204 on Windows

วิธีเข้าถึง Azure Windows Virtual Desktop

  • Azure portal > Select VM > Connect > RDP > เลือก IP และ Port

Drain mode ใน WVD คืออะไร?

Drain mode 隔離 session host เมื่อต้องการ patch/maintenance โดยไม่รบกวน user session ที่มีอยู่ Session host จะไม่รับ session ใหม่

แก้ไข Remote Desktop Error Code 0x3000046 บน Windows