Solved

Get SIP Addresses from a CSV list

Posted on 2016-09-17
7
49 Views
Last Modified: 2016-09-19
Hello

I am trying to import a CSV of names and see if any of the users have a SIP Address associated with them

This is what i wrrote...  However instead of just getting the names in the CSV file it just goes directly to Get-CSuser and grabs everyone..

Any thoughts..??

Import-Csv D:\temp\mark\test.csv | foreach{Get-CsUser |Select-Object displayname, sipaddress}
0
Comment
Question by:mwjones75
7 Comments
 

Author Comment

by:mwjones75
ID: 41803343
or this is another way I am trying to get them...  however with this it works however it pulls all of the email address and I just want the Primary and SIP if they have one...

Get-DistributionGroupMember -Identity "Zzzz-" -ResultSize Unlimited |
Select DisplayName,PrimarySMTPAddress -ExpandProperty EmailAddresses | Export-CSV "c:\temp\mark\dl\0915_Zzzz.csv"
0
 
LVL 14

Expert Comment

by:Schnell Solutions
ID: 41803347
It is just that you need to specify the field that you want to use from your CSV file. I do not know what is the name of the column that you are using on the top to represent the User name or the field that you want. But if this is called user you need to include it like the following example:

Notice that I am adding ' $_.User' after your command. It means than that is the field that I want to use each time that a line is processed.

Import-Csv D:\temp\mark\test.csv | foreach {Get-CsUser $_.User |Select-Object displayname, sipaddress}
0
 
LVL 14

Expert Comment

by:Schnell Solutions
ID: 41803348
Which ones are the headers that you have in your file?
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Expert Comment

by:Mark Jones
ID: 41803437
Displaynames
0
 
LVL 14

Accepted Solution

by:
Schnell Solutions earned 500 total points
ID: 41803445
I made one example here and it works for me in this way:

Import-Csv D:\temp\mark\test.csv | foreach {Get-CsUser $_.Displaynames |Select-Object displayname, sipaddress}

Is it working for you? If not... What is it returning to you now?
0
 
LVL 49

Expert Comment

by:Akhater
ID: 41803477
Just add $_ after your get-csuser command

Import-Csv D:\temp\mark\test.csv | foreach{Get-CsUser $_ |Select-Object displayname, sipaddress}
0
 

Author Closing Comment

by:mwjones75
ID: 41805176
This worked perfectly!
0

Featured Post

Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

Join & Write a Comment

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now