• RSS
  • Twitter
  • FaceBook

Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

Change attributes for multiple users w/ CSV

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2010] >> General >> Change attributes for multiple users w/ CSV Page: [1]
Login
Message << Older Topic   Newer Topic >>
Change attributes for multiple users w/ CSV - 17.Jul.2012 11:29:57 AM   
Spaced

 

Posts: 3
Joined: 17.Jul.2012
Status: offline
Hi

I am trying to change an attributes of a list of users in a CSV file in bulk. I have all the displaynames, not aliases or login names, and want to import the csv file then edit all attributes. This is what I have so far..

import-csv "C:\names.csv" | foreach {Get-Mailbox | where {-identity $_.DisplayName} | Set-Mailbox -CustomAttribute1 "internet" }

I am returning this error: Missing expression after unary operator '-'.
At line:1 char:64

thanks for your help.
Post #: 1
RE: Change attributes for multiple users w/ CSV - 4.Aug.2012 6:55:02 PM   
Exchange_Geek

 

Posts: 1287
Joined: 31.Dec.2006
Status: offline
import-csv "C:\names.csv" | foreach {Get-Mailbox | where {-identity $_ DisplayName} | Set-Mailbox -CustomAttribute1 "internet"}

Try it.

Regards,
Exchange_Geek

(in reply to Spaced)
Post #: 2

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2010] >> General >> Change attributes for multiple users w/ CSV Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Follow TechGenix on Twitter