add users script


I have to add hundreds of users from our domain to WVD. Does anyone have a script to add the users from a csv file?  I assume there is still no way of adding a group?

1 Reply

@Eric Fehn Here is a script I came up with, it added 500 names in a half hour


Import-Module Microsoft.Rdinfra.RdPowershell
Add-RdsAccount -DeploymentURL
# the csv file must have a column called UPN
$Users = Import-CSV -Path “c:\Temp\WVDUsers.CSV”
ForEach ($User in $Users){
$UPN = $User.UPN
Add-RdsAppGroupUser -TenantName "Your Tenant Name" -HostPoolName "Your Host Pool name" -AppGroupname "Your App Group" -UserPrincipalName $UPN

# Check the names with this,
Get-RdsAppgroupUser -TenantName "Your Tenant Name" -HostPoolName "Your host Pool" -AppGroupname "Your App Group"

Related Conversations
I want users to add New lines items in response
osman_124 in Microsoft Forms on
1 Replies
Intune Scripting
jesusleon in Microsoft Intune on
2 Replies
RDS Collections Not Showing
Tim Hunter in Windows Server for IT Pro on
4 Replies
SharePoint Groups: Help Me Understand
smithme in SharePoint Developer on
2 Replies