Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

Scripting

Need to set an attribute on a about 2000 users but dont have anything in common ... can you guys maybe share how this can be achieved
0
vicky19
Asked:
vicky19
  • 4
  • 2
  • 2
2 Solutions
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
According to my knowledge you need to have something common to filter out these users

- Rancy
0
 
vicky19Author Commented:
Someone else has some idea
0
 
Rajitha ChimmaniCommented:
Do you have the list of users? If so, you can feed the input to txt or csv file and get it done.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
vicky19Author Commented:
I just have their first name would i need something additional and what would that be and what to do after that
0
 
Rajitha ChimmaniCommented:
Yes, you would need one unique attribute of those users like displayname, alias or primary SMTP address.

Then once you have them you can try the below lines. i have given the command to update the mailbox properties as you have not mentioned which attribute you are trying to set.

If you have the names in a txt file, use the following (assuming that you would like to set the customattribute1 to test)

Get-Content users.txt | set-mailbox -customattribute1 test
0
 
vicky19Author Commented:
What should the TXT look like, something like below is fine

LastName, FirstName
LastName1, FirstName1
LastName2, FirstName2
LastName3, FirstName3
LastName4, FirstName4
0
 
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
Yes thats fine or even could be with SamID or similar information for all users

- Rancy
0
 
vicky19Author Commented:
Thanks guys
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now