Hi,
I have a script which allows me to add domain users to AD groups using their UPN. The script works great but I am now having trouble figuring out how to display the output results of the script on the console screen.
Here is the script:
Powershell
Import-ModuleActiveDirectory#Import the CSV. The directory listed should always be used otherwise the script will fail.$csv=import-csv'P:\Scripts\PowerShell\Add_UsersToADGroupUsingUPN\AddUsersToGroups.csv'#Foreach item in the CSV...Foreach($itemin$csv){#Specifying which items in the CSV will be applied to the $upn variable. $upn=$item.upn#The user name is retrieved by filtering each e-mail address that is listed in the UPN part of the CSV. get-aduser-filter"userprincipalname -eq '$upn'"|#The user name(s) that have been retrieved are now added to the AD groups found in the...