Solved

How to find users already enabled in Lync 2013 Server using CSV or Text file?

Posted on 2014-11-18
6
1,478 Views
Last Modified: 2014-11-22
I have a CSV or Text file containing usernames. I need to use it in a PS script to see if they are already enabled in Lync Server.

Thank you,
0
Comment
Question by:K Anthony O365
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:Mai Ali (MVP)
ID: 40450282
using the Lync management shell type this command:
get-csuser | Select-Object DisplayName, SAMAccountname, SIPAddress >e:\user.csv
user file will be filled with the lync enabled user.
Also you can check below command
http://www.techysnippets.com/export-lync-user-info-to-csv/
0
 

Author Comment

by:K Anthony O365
ID: 40450348
Actually, what I'm looking for is to take a list of users from a text or CSV and use it as a filter to see if they are enabled in Lync.  Your script simply shows how to export a list of users into a CSV file.
0
 

Author Comment

by:K Anthony O365
ID: 40450379
How can I use filter below to find users in a text file to see if they are enabled on Lync or not?

Get-CsAdUser –Filter {CsEnabled –eq $False}
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 5

Expert Comment

by:Mai Ali (MVP)
ID: 40450642
The above command will list to you all enable users if you want to run command from Lync Server.
To filter which is enable or not. That based on AD by checking sip address who have sip address is enable.
Also you can run below script
http://blogs.technet.com/b/meacoex/archive/2011/04/24/powershell-script-get-group-members-and-check-for-users-that-are-not-enabled-for-lync-and-enable-these-users-using-e-mail-address.aspx
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 40452525
So if you are trying to verify the user accounts from a list then the following code will help you..
Import-Module lync
GC C:\user.txt | %{
Try{Get-CsUser $_ -ea stop | Out-Null;$Status = "Enabled"}Catch{$Status = "Disabled"}
$_ | Select @{N="User";E={$_}},@{N="Lync";E={$Status}}
} 

Open in new window

C:\user.txt Input file should be like.
UserA
UserB
UserC

Open in new window

You can also use Export-csv to export the result to a csv file..
0
 

Author Closing Comment

by:K Anthony O365
ID: 40459971
This script was very helpful.

Thank you!
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

"Migrate" an SMTP relay receive connector to a new server using info from an old server.
A procedure for exporting installed hotfix details of remote computers using powershell
The goal of the tutorial is to teach the user how to instant message and make a video call in Skype.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

808 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