Rabih El Haj youssef
asked on
import list of users to Dirstrubition list
Hi Guys,
I am running Windows server 2008R2 and AD 2008 . I need to import emails address to one of the DL which is already created
Total of the users are about 1000, and I have them in Excel file.
IS any way I can import them by using power shell Script .
Please provide me with step by step on how to run the file and script as I am new.
I appreciate your help , if you can send me a good link also how to start to work with PS
Thanks you in advance
I am running Windows server 2008R2 and AD 2008 . I need to import emails address to one of the DL which is already created
Total of the users are about 1000, and I have them in Excel file.
IS any way I can import them by using power shell Script .
Please provide me with step by step on how to run the file and script as I am new.
I appreciate your help , if you can send me a good link also how to start to work with PS
Thanks you in advance
Here is a link to a Powershell Script : https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Bulk-AD-Group-4d873f35
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
HI ,
it is working
but ,I am getting a lots of object could not find when I run the above script
is any way I can export that DL to bring me All Emails address and logonID, if that possible
At the present I am using the below script and only give me display name and OU
dsquery group -name "testsl" | dsget group -members -expand >"name.txt"
please advise
[PS] H:\>.\EmailToDL.ps1
Couldn't find object "NAme@Domain.com". Please make sure that it was spelled correctly or specify a differe
nt object.
+ CategoryInfo : NotSpecified: (0:Int32) [Add-DistributionGroupMemb er], ManagementObjectNotFoundEx ception
+ FullyQualifiedErrorId : E9688D04,Microsoft.Exchang e.Manageme nt.Recipie ntTasks.Ad dDistribut ionGroupMe mber
it is working
but ,I am getting a lots of object could not find when I run the above script
is any way I can export that DL to bring me All Emails address and logonID, if that possible
At the present I am using the below script and only give me display name and OU
dsquery group -name "testsl" | dsget group -members -expand >"name.txt"
please advise
[PS] H:\>.\EmailToDL.ps1
Couldn't find object "NAme@Domain.com". Please make sure that it was spelled correctly or specify a differe
nt object.
+ CategoryInfo : NotSpecified: (0:Int32) [Add-DistributionGroupMemb
+ FullyQualifiedErrorId : E9688D04,Microsoft.Exchang
Try..
Get-DistributionGroupMember testsl | Select SamAccountName,PrimarySmtpAddress | Export-csv C:\testsl.csv -nti
ASKER
Hi Subsun,
last request ....
You did well. how about if I need to get the Full name or display name .
what do I have to add in this script
do you know why I am getting "Couldn't find object "NAme@Domain.com". Please make sure that it was spelled correctly or specify a differe
nt object."
Please advise
Thanks
rabih
last request ....
You did well. how about if I need to get the Full name or display name .
what do I have to add in this script
do you know why I am getting "Couldn't find object "NAme@Domain.com". Please make sure that it was spelled correctly or specify a differe
nt object."
Please advise
Thanks
rabih
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
My Script is working , it was an error in the File where the data coming from
Subsun , Excellent response and quick reply
Subsun , Excellent response and quick reply
ASKER
Hi Subsun ,
Could you please assist me with your Scripts
It is working but not on the Destrubution lists who has sub distribution list nest it
Get-DistributionGroupMembe r testsl | Select SamAccountName,PrimarySmtp Address | Export-csv C:\testsl.csv -nti
could you please kindly have a look if you can provide me with the script it does exports all users who are member and member of DL
Thanks
Rabih
Could you please assist me with your Scripts
It is working but not on the Destrubution lists who has sub distribution list nest it
Get-DistributionGroupMembe
could you please kindly have a look if you can provide me with the script it does exports all users who are member and member of DL
Thanks
Rabih
There is no option to find recursive members with Get-DistributionGroupMembe r.. You can try with AD Powershell..
In future, please open a new question for additional requests..
Import-Module Activedirectory
Get-ADGroupMember testsl -Recursive | Get-ADUser -pr * | Select SamAccountName,Mail | Export-csv C:\testsl.csv -nti
In future, please open a new question for additional requests..
ASKER
Thank you and I will do it next time .