Written by Jatin Makhija October 1,2019  
upnlist.txt = Contains list of user's UPN  
e.g. xyz@technethub.com  
<GroupName> = This group will be removed  
from the user's mentioned in the upnlist.txt file #>  
$upnlist = Get-Content 'c:\temp\upnlist.txt'  
Foreach ($upn in $upnlist)  
{ $var = Get-ADUser -Filter "UserPrincipalName -eq '$upn'" 
Remove-ADgroupmember -identity '<GroupName>' -members $var -Confim:$false }

Sharing a Simple script with few lines of code which you can use to remove a Group from list of Active Directory Users. Users UPN will be mentioned in the file upnlist.txt which will be read in a variable $upnlist. Confirm:$false has been mentioned which will suppress the confirmation prompts. Switch it to $true which will prompt you for each user for your confirmation. Here is a link of my blog site which also explains more about the script: