List Domain Users having the dial-in permission in AD
Download the RRAS-vbs script and save the file.
Once script execution completes it will output a file called rras_vpn_users.txt in same folder as script.
Using Dsquery :
Run command prompt on a Domain Controller and then run the below command.
dsquery * -Filter “(&(objectCatgegory=person)(objectClass=user)(msNPAllowDialin=TRUE))”
PowerShell Get-ADUser (with AD modules):
Get-ADUser -LDAPFilter “(&(objectCategory=person)(objectClass=user)(msNPAllowDialin=TRUE))”