I have added a user to the azure vm and added the user to the "Remote Desktop Users" group, they can access the server using rdp but not via powershell like the main user.
How can I allow the user to also access the server via powershell.
In your Windows Server 2016, you can add the user in the Remote Management Users group or you can use Powershell command to check what group are allowed to do PSSession.
Option for adding other groups to have access to PSSession.
Set-PSSessionConfiguration -Name Microsoft.PowerShell -showSecurityDescriptorUI
Check also the Azure NSG that is connected to your VM network card to allow inbound security rule for WinRM port.