Hello,
I'm trying to use PowerShell to take a list of names in a .csv file and populate custom attributes with them. The process I'm using is to import the csv content to a variable, and then pipe that to some commands, like the following.
$stuff = import-csv "c:\filename.csv"
$stuff | % -process{
$data = $_.column1 `
get-mailcontact -filter {displayname -like "*/some kind of variable etc.." }| `
set-mailcontact -customattribute1 "$data"
}
The problem I run into is that I'm trying to search for mail contacts using the last portion of their displaynames. An example displayname is like the following.
Big Conference Room/North Carolina/RTT
I'm searching for this contact with a filter of {displayname -like "*/RTT"}.
I can search this way if I do it one at a time, but when I'm trying to do it in bulk, I'm having trouble passing a value to the filter that represents */RTT that will work correctly.
Any help on this would be great!!
Andrew