Update-AzWvdSessionHost Command error

%3CLINGO-SUB%20id%3D%22lingo-sub-1358925%22%20slang%3D%22en-US%22%3EUpdate-AzWvdSessionHost%20Command%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1358925%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20I%20run%20the%20below%20command%20I%20get%20the%20corresponding%20error.%26nbsp%3B%20This%20is%20using%20the%20Spring%202020%20preview%20commands%20too.%26nbsp%3B%20What%20I%20am%20trying%20to%20do%20is%20directly%20assign%20a%20user%20to%20a%20session%20host%2C%20per%20the%20documentation%20this%20should%20work.%26nbsp%3B%20Anyone%20else%20get%20this%20error%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUpdate-AzWvdSessionHost%20-HostPoolName%20MyVirtuaDesktop%20-Name%20VM2.domain.com%20-ResourceGroupName%20MyResourceGroup%20-AssignedUser%20%3CA%20href%3D%22mailto%3Amyupn%40domain.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Emyupn%40domain.com%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUpdate-AzWvdSessionHost%20%3A%20The%20server%20responded%20with%20a%20Server%20Error%2C%20Status%3A%20InternalServerError%3CBR%20%2F%3EAt%20line%3A1%20char%3A1%3CBR%20%2F%3E%2B%20Update-AzWvdSessionHost%20-HostPoolName%20MyVirtualDesktop%20-Name%20VM2.domain.com%20...%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20InvalidOperation%3A%20(%7B%20SubscriptionI...sionHostPatch%20%7D%3A%26lt%3B%26gt%3Bf__AnonymousType24%605)%20%5BUpdate-AzWvdSessionHost_UpdateExpanded%5D%2C%20RestException%601%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Cmdlets.UpdateAzWvdSessionHost_UpdateExpanded%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1469276%22%20slang%3D%22en-US%22%3ERe%3A%20Update-AzWvdSessionHost%20Command%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1469276%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F643468%22%20target%3D%22_blank%22%3E%40dbachechi%3C%2FA%3E%26nbsp%3BDid%20you%20try%20encapsulating%20the%20strings%20within%20quotes%3F%26nbsp%3B%3CSPAN%3EUpdate-AzWvdSessionHost%20-HostPoolName%20MyVirtuaDesktop%20-Name%20%22VM2.domain.com%22%20-ResourceGroupName%20MyResourceGroup%20-AssignedUser%26nbsp%3B%22%3C%2FSPAN%3E%3CA%20href%3D%22mailto%3Amyupn%40domain.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Emyupn%40domain.com%22%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1496367%22%20slang%3D%22en-US%22%3ERe%3A%20Update-AzWvdSessionHost%20Command%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1496367%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F643468%22%20target%3D%22_blank%22%3E%40dbachechi%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDid%20you%20resolve%20this%20issue%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20the%20same%20problem%2C%20tried%20removing%2C%20rebuilding%2C%20adding%20licences%2C%20adding%20permissions%20and%20roles%20etc%20but%20nothing%20seems%20to%20solve%20the%20problem.%20Using%20the%20Web%20or%20Powershell%20gives%20same%20error%20with%20no%20clues...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUpdate-AzWvdSessionHost_UpdateExpanded%3A%20The%20server%20responded%20with%20a%20Server%20Error%2C%20Status%3A%20InternalServerError%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECommands%20in%20quotes%20doesn't%20help%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEverything%20seems%20correct%2C%20VMs%20joined%20to%20domain%2C%20AD%20connect%20setup%20and%20working%2C%20O365%20licences%20installed%2C%20Owner%20permissions%20correct%2C%20DNS%20correct.%26nbsp%3BCan%20login%20to%20VM%20locally%20as%20user%2C%20just%20cannot%20assign%20any%20user%20to%20any%20VM%20for%20remote%20access%2C%20%22Internal%20Server%20Error%22%20isn't%20really%20helping.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1501881%22%20slang%3D%22en-US%22%3ERe%3A%20Update-AzWvdSessionHost%20Command%20error%20(internal%20server%20error%20spring%20update%202020)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1501881%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F713449%22%20target%3D%22_blank%22%3E%40Engineers1580%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E(internal%20server%20error%20spring%20update%202020)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20opened%20a%20support%20request%20with%20Microsoft%20support%2C%20we%20rebuilt%20the%20WVD%20and%20got%20the%20same%20errors%2C%20looks%20like%20a%20bug%20and%20now%20waiting%20for%20support%20to%20resolve%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Fhtml%2Fimages%2Femoticons%2Ffacepalm_40x40.gif%22%20alt%3D%22%3Afacepalm%3A%22%20title%3D%22%3Afacepalm%3A%22%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

When I run the below command I get the corresponding error.  This is using the Spring 2020 preview commands too.  What I am trying to do is directly assign a user to a session host, per the documentation this should work.  Anyone else get this error?

 

Update-AzWvdSessionHost -HostPoolName MyVirtuaDesktop -Name VM2.domain.com -ResourceGroupName MyResourceGroup -AssignedUser myupn@domain.com

 

 

 

Update-AzWvdSessionHost : The server responded with a Server Error, Status: InternalServerError
At line:1 char:1
+ Update-AzWvdSessionHost -HostPoolName MyVirtualDesktop -Name VM2.domain.com ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: ({ SubscriptionI...sionHostPatch }:<>f__AnonymousType24`5) [Update-AzWvdSessionHost_UpdateExpanded], RestException`1
+ FullyQualifiedErrorId : Microsoft.Azure.PowerShell.Cmdlets.DesktopVirtualization.Cmdlets.UpdateAzWvdSessionHost_UpdateExpanded

 

 

3 Replies
Highlighted

@dbachechi Did you try encapsulating the strings within quotes? Update-AzWvdSessionHost -HostPoolName MyVirtuaDesktop -Name "VM2.domain.com" -ResourceGroupName MyResourceGroup -AssignedUser "myupn@domain.com"

 

Highlighted

@dbachechi 

Did you resolve this issue?

 

I have the same problem, tried removing, rebuilding, adding licences, adding permissions and roles etc but nothing seems to solve the problem. Using the Web or Powershell gives same error with no clues...

 

Update-AzWvdSessionHost_UpdateExpanded: The server responded with a Server Error, Status: InternalServerError

 

Commands in quotes doesn't help

 

Everything seems correct, VMs joined to domain, AD connect setup and working, O365 licences installed, Owner permissions correct, DNS correct. Can login to VM locally as user, just cannot assign any user to any VM for remote access, "Internal Server Error" isn't really helping.

 

Cheers

Highlighted

@Engineers1580 

 

(internal server error spring update 2020)

 

I have opened a support request with Microsoft support, we rebuilt the WVD and got the same errors, looks like a bug and now waiting for support to resolve :facepalm: