Remove-AzWvdUserSession doesn't work as good as invoke-RdsUserSessionLogoff
We use some Azure Automation to allow the users to Self Service their Logoff when application freeze the WVD session.
For WVD classic it was this command: invoke-RdsUserSessionLogoff and it worked fine.
For WVDv2 (Spring Update) it is this command: Remove-AzWvdUserSession
And it fails horribly because we make it a best practice to put a delete lock on the Resource Groups.
So please make "Remove-AzWvdUserSession" work when a Delete Lock is in place, or rename the command to invoke-AzWvdUserSessionLogoff.
Thank you very much!
Pistle Jumbo commented
The Remove-AzWVDUserSessions does not delete anything, it only logs off a user. The old commandlet name was better: "invoke-RdsUserSessionLogoff" and that command does the same for WVD Classic and works perfectly with Delete Lock on the Resource Group. Please make the new command work as the old command with an in place DeleteLock. Our users trigger the usage of this command via PowerAutomate to self-service their logoff in case of session hangs. The DeleteLock is also required to prevent accidental removal of servers. I don't want to remove the lock, remove the user session and put the lock back on via the script, that put's the servers at risk of being deleted.
So please change the behaviour of this commandlet or create a second commandlet called: "Logoff-AzWvdUserSessions" that will not be blocked by the DeleteLocks.