[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Get SIP Addresses from a CSV list

Posted on 2016-09-17
7
Medium Priority
?
290 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

Expert Comment

by:Mark Jones
ID: 41803437
Displaynames
0
 
LVL 14

Accepted Solution

by:
Schnell Solutions earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
In this video we show how to create an email address policy 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…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
Suggested Courses

656 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