Any good Power Shell command or script to see connected users in real time for Lync 2013

Are there any good Power Shell commands or scripts that can tell you how many users are connected to a pool in real time so you can evaluate the current load. I have 3 FE servers in a single pool. We just started deploying the lync client to the users and
were curious as to how many are actually connected. I saw a number of home made scripts but really didn't care for any of them. I just want to find out how many users that are actually connected to the pool at a particular moment so we can see how many users
are really using the product.

Have you looked at Pat Richard's get-csconnections script?: http://www.ehloworld.com/269
Please mark posts as answers/helpful if it answers your question.
Blog
Lync Validator - Used to assist in the validation and documentation of Lync Server 2013.

Similar Messages

  • How to run 'Get-AssignedAccess' or 'Set-AssignedAccess' power shell commands in c# Application

    Hi,
    I have console application using which i am trying to run power shell command  like 'Get-AssignedAccess' or 'Set-AssignedAccess'.
    i am using below code for this it is throwing exception 'Get-AssignedAccess' doesn't exist in cmdlet which is correct because these commands belongs to function category.
    using (PowerShell pwInstance = PowerShell.Create())
                            pwInstance .AddScript("Get-AssignedAccess");
                            var result = pwInstance .Invoke();
    How can we execute this kind of command using c#?
    Thanks,

    Hi prakashlight,
    Thank you for comming back and tell us the result. For more information about how to run PowerShell script in C# language, you can refer to this blogpost here:
    Executing PowerShell scripts from C#
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Power Shell Command using CSOM

    Hi,
    We have prepared a Power Shell command using Client Side scripts as per client requirements. The client did not had access to the SharePoint Server. So, PS commands with
    server side scripts was out of scope. 
    The client requirement was to delete all the permissions on the list that was being inherited from site. Since the number of users were huge, so deleting all the users using ribbon was not possible.
    Please have a look at the scripts below and let me know your feedback. If you have better suggestion than this, please let me know.
    #location of client dlls on users' local system
    $loc = "C:\SharePoint\ClientDLL" 
    //SharePoint Site URL
    $siteUrl = "" 
    #Write your Login ID
    $loginname = "" 
    #Write the Name of the List
    $listname = "" 
    Set-Location $loc 
    Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.dll")
    Add-Type -Path (Resolve-Path "Microsoft.SharePoint.Client.Runtime.dll") 
    Write-Host "Please enter password for $($siteUrl):"
    $pwd = Read-Host -AsSecureString
    $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl) 
    Try
    # Remove or replace line below to change authentication method
    $ctx.Credentials = New-Object System.Net.NetworkCredential($loginname, $pwd) 
    $web = $ctx.Web
    $ctx.Load($web)
    $ctx.ExecuteQuery() 
    #Write-Host "Current web title is '$($web.Title)', $($web.Url)"  
    $list = $Web.Lists.GetByTitle($listname); 
    $ctx.Load($list); 
    $ctx.ExecuteQuery(); 
    Write-Host "Deleting Permissions on List : $($list.Title)" 
    if($list.HasUniquePermissions)
                    #Write-Host "Has Unique Permissions"
                    $list.ResetRoleInheritance()
                    $list.BreakRoleInheritance($false, $true)
                    Write-Host "Permissions deleted" -foregroundcolor Green
    if(-not $list.HasUniquePermissions)
                    #Write-Host "Does not has Unique Permissions"
                    $list.ResetRoleInheritance()
                    $list.BreakRoleInheritance($false, $true)
                    Write-Host "Permissions deleted" -foregroundcolor Green
    Catch
                    Write-Host "Some Error, Please Contact Administrator" -foregroundcolor Red
                    return
    $list.Update() 
    $ctx.ExecuteQuery();​
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

    Hi Sudheer,
    In Client-Side, we can also use .NET Client Object Model to achieve your requirement.
    Remove permission in Sharepoint List using Client Object Model
    https://rambabualaparthi.wordpress.com/2013/12/30/remove-permission-in-sharepoint-list-using-client-object-model/
    In order to better manage SharePoint in Client side, I suggest develop a Winform or WPF application and use .Net Client Object Model to achieve some requirements.
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to Execute Power Shell Command From Windows Application.

    Hi All Experts,
    I want to execute power shell commands from my windows application.
    Is it possible ?
    Please let me know your comments..
    Thanks.

    I have not tried this, but apprently it is easy as in the sample pasted below. please see this article for more details
    http://geekswithblogs.net/Norgean/archive/2012/09/19/running-powershell-from-within-sharepoint.aspx.
    Let me know how it goes...
    public string RunPowershell(string powershellText, SPWeb web, string param1, string param2) {
    // Powershell ~= RunspaceFactory - i.e. Create a powershell context
    var runspace = RunspaceFactory.CreateRunspace();
    var resultString = new StringBuilder();
    try
    // load the SharePoint snapin - Note: you cannot do this in the script itself (i.e. add-pssnapin etc does not work)
    PSSnapInException snapInError;
    runspace.RunspaceConfiguration.AddPSSnapIn("Microsoft.SharePoint.PowerShell", out snapInError);
    runspace.Open();
    // set a web variable.
    runspace.SessionStateProxy.SetVariable("webContext", web);
    // and some user defined parameters
    runspace.SessionStateProxy.SetVariable("param1", param1);
    runspace.SessionStateProxy.SetVariable("param2", param2);
    var pipeline = runspace.CreatePipeline();
    pipeline.Commands.AddScript(powershellText);
    // add a "return" variable
    pipeline.Commands.Add("Out-String");
    // execute!
    var results = pipeline.Invoke();
    // convert the script result into a single string
    foreach (PSObject obj in results)
    resultString.AppendLine(obj.ToString());
    finally
    // close the runspace
    runspace.Close();
    // consider logging the result. Or something.
    return resultString.ToString();
    Ok. We've written some code. Let us test it.
    var runner = new PowershellRunner();
    runner.RunPowershellScript(@"
    $web = Get-SPWeb 'http://server/web' # or $webContext
    $web.Title = $param1
    $web.Update()
    $web.Dispose()
    ", null, "New title", "not used");
    -Sangeetha

  • Need a power shell command for Front End fail over?

    We have a Lync 2013 infrastructure with 2 front ends and 2 edges. 
    The environment was setup by a partner and the servers were configured for failover in case one goes down in the pool. 
    However the last time windows updates were applied and the primary FE had to be restarted, the secondary FE did not automatically switch over as the active server and it caused a companywide outage. 
    In speaking with the contractor, they said that well no it would not automatically do this, you need to run a Lync PowerShell to have it switch over. 
    My BS radar went off, but I wanted to ask you if this sounds right or is possible. 
    If it must be done, could you give me the power shell command.
    Thanks

    Hi,
    Did you solve the issue with the help of the people above provided?
    If you use a Lync server Enterprise edition, it is recommended to deploy at least three FE servers.
    If you use two Lync server Standard edition for DR,
    when one of the servers fails in the Pool Pair, the administrator need to manually failover the pool to the other member of the Pool Pair using the
    command: Invoke-CsPoolFailover -PoolFQDN <Pool1 FQDN> -DisasterMode -Verbose
    The Automatic failover and failback for
    Voice option and the associated time intervals in Topology Builder apply only to the voice resiliency features that were introduced in Lync Server 2010. Selecting this option does not imply that the pool failover discussed in this document is automatic.
    Pool failover and failback always require an administrator to manually invoke the failover and failback.
    You can refer to the link below about how to failover a pool: 
    http://technet.microsoft.com/en-gb/library/jj204678.aspx
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support
    Does it help, yes and no.  FYI, we are running Enterprise Edition front ends for our single pool.  The new environment was setup as a proof of concept and we installed the bare minimum # of servers at the time.
    The articles suggested from above pretty much just say if one of your FE's goes down, bring it back up as soon as possible.  Both of our FE's need windows updates applied ASAP and it could an hour or more (likely).  Here is a quote from the article:
    If for some reason you need to bring both servers down at the same time, do the following when the downtime for the pool is finished:
    The best practice is to restart both Front End Servers at the same time.
    If the two servers cannot be restarted at the same time, you should bring them back up in the reverse order of the order they went down.
    If you cannot bring them back up in that order, then use the following cmdlet before bringing the pool back up:
    Reset-CsPoolRegistrarState -ResetType QuorumLossRecovery -PoolFQDN <FQDN>
    The last time the main FE went down for service, we left the secondary FE on but there was still an outage.  Then brought back the formerly active FE fist and service was restored.  Basically I need to know how to switch the passive to the active
    node before/while the primary is offline.  And if required once both FE's are back up, to switch the service from the secondary that became active, back to the primary server as it was before.  Make sense?  Perhaps I'm still missing something
    after reading the articles.  The powershell commands list just updating the topology after both servers come back online.

  • Power shell command not working in Power shell ISE

    I was looking for guidance on a problem I was having and found a post from
    Bigteddy on TechNet that had this command
    Get-ADUser -Identity sam -Properties memberof | select -ExpandProperty memberof
    I kept trying it many ways and it always fails in power shell ISE. 
    I get the below output
    The term 'Get-ADUser' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of
    the name, or if a path was included, verify that the path is c
    orrect and try again.
    At line:1 char:11
    + Get-ADUser <<<< 
    -Identity rwhite -Properties memberof | select -ExpandProperty memberof
    + CategoryInfo         
    : ObjectNotFound: (Get-ADUser:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    I put the same command in the power shell module window and it works perfectly
    Any idea how I can make this work for striping purposes in power shell ise
    ronald white

    Import-Module ActiveDirectory
    If that returns an error, chances are that you do not have the module on your computer.  You can verify that by running
    Get-Module -ListAvailable
    Rich Prescott | Infrastructure Architect, Windows Engineer and PowerShell blogger | MCITP, MCTS, MCP
    Engineering Efficiency
    @Rich_Prescott
    Windows System Administration tool 2.0
    AD User Creation tool

  • Power Shell command

    hi 
    I would like to help me with a command that will give me the clearance of each mailbox in Exchange 2013
    Thanks!

    Hi,
    Do you mean the security clearance of each mailbox in Exchange 2013?
    In Exchange 2013, we can use the EAC or the Shell to assign permissions to users or groups (called delegates) that allow them to open or send messages from other mailboxes. To perform this procedure, user need to be assigned a member of Organization Management
    role group.
    Refer to this article about Manage Permissions For Recipients.
    http://technet.microsoft.com/en-us/library/jj919240(v=exchg.150).aspx
    Best Regards.

  • HT201210 Iphone 4 dropped in water, now dried out two weeks later, showing IOS6. connect to Itunes but it will not update or install, any ideas in if there is anything I can do or is it time for a new phone?

    by juggling the phone whilst washing up, I accidently dropped it in the sink, I had just became unemployed so no more insurance by a day..
    I have follwed advice dried out phone in rice and in airing cupboard for nearly two weeks
    Screen looks OK minor discolour on top of screen but no IOS
    Tried connecting to Itunes it starts to restores then stops.
    any ideas in trying to get it to work or is that it, new phone required which I can not really afford at present.
    Controller 62

    It's time for a new (replacement) iPhone.  Take it to an Apple Store or Authorized Apple Service Provider.  You may well receive some credit for your old one.

  • How to bring a prompt to User sitting on a laptop/desktop using Power shell command/script before machine gets rebooted.

    Hi Experts,
    I am a novice in Powershell and trying to learn PowerShell.
    Currently, i need to reboot some 50-60 desktops remotely.
    i am using the below powershell command
    gc c:\Temp\machineList.txt |%{Restart-computer -computername $_ -force}
    It is working perfect for me but what i want is before machine gets rebooted User should get a prompt like "Your machine will be rebooted in 60 seconds, Please save your work".
    How i can achieve this in a powershell script.
    Thanks in advance.
    Daya

    an other option is to start taskmanager on Domain Controller
    go to users right click user Object send message
    regards Thomas Paetzold visit my blog on: http://sus42.wordpress.com
    "taskmanager"?
    That only works for users logged into the dc. Users should not be allowed to log into the DC directly.
    I suspect you mean to use the MSG facility if it is not disabled.  MSG /?.  This can send messages to uses on various systems.
    ¯\_(ツ)_/¯

  • Is there any power shell command available to get all information/settings from Config Database/Farm

    Hi,
    Basically we are rebuilidng a new farm which will be a replica of other environment. We have setup Sharepoint and migrated all contents.So everything looks same. Now the question is, what else info need to check from the current FARM whether it is 100% matched
    with new one.
    Is there any script I can run which will give me all information from SP FARM then I could have compared with new farm.
    Thanks  
    srabon

    Check the below script which provides common service application settings, AAM, Designer settings,Farm configuration and few more details..  you can run it in both farms and validate the outputs
    http://technet.microsoft.com/en-us/library/ff645391%28v=office.15%29.aspx
    Hope this helps.
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Problem with shell commands and scripts from an Applescript Application

    Hi-
    I am fairly new to OSX software development. I am trying to build an application that creates a reverse SSH tunnel to my computer and starts OSXvnc. The idea is that my Mom or anyone else who needs help can connect to me without having to tinker with their firewalls.
    There are plenty of resources on how to do this, and I have found them. What I have a problem with is the following.
    I am building this application in Xcode as an Applescript application, because Applescript and shell scripting are the only forms of programming I know. I use an expect script to connect through SSH, and a "do shell script" for the raw OSXvnc-server application to allow screen sharing.
    The problem is that when I click on the button to launch OSXvnc-server or the button to launch SSH, the application freezes until the process it spawns is killed or finishes. For example, I can set SSH to timeout after 60 seconds of no connection, and then the Applescript application responds again. I even tried using the ssh -f command to fork the process, but that doesn't seem to help.
    I am also using "try" around each of the items.
    What am I doing wrong? How can I make the buttons in my app launch SSH and OSXvnc-server without hanging the application while it waits for them to finish?
    Thanks so much!

    See here for an explanation of the syntax.
    (20960)

  • Find Software with Version using Power-shell Command

    Hi All,
             In have very urgent requirement to find the version of particular software .Is there any way to find the result as we write below snippet of code to find the software list using batch script.
    batch script.
    WMIC product where 'name like "%Opera%"' get name,version
    Thanks, Quality Communication Provides Quality Work. http://siddiq-sharepoint2010.blogspot.in/ Siddiqali Mohammad .

    Does that WMI query grab all installed software?  When I check via WMI I get many pieces of software, but some appear to not be registered there, e.g. adobe flash player.  most identify in both queries, however some show up in WMI but not in the
    registry and v/v.
    PS C:\WINDOWS\system32> Get-WmiObject win32_product | Select-Object -Property Name,Version | Sort-Object -Property Name
    Name Version
    64 Bit HP CIO Components Installer 4.2.1
    ActivClient x64 7.0.2
    Adobe Acrobat X Pro - English, Français, Deutsch 10.1.9
    Adobe AIR 4.0.0.1390
    Adobe Customization Wizard XI 11.0.0
    etc.
    When I check the uninstall reg keys (which processes a bitfaster, about 2-3 seconds instead of 12-13 seconds on a test machine ) I see:
    Function Get-InstalledProgramInfo
    $InstalledSoftware = (Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ | Get-ItemProperty)
    IF (Test-path HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\) {
    $InstalledSoftware += (Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\ | Get-ItemProperty)
    IF (Test-path HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\) {
    $InstalledSoftware += (Get-ChildItem HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ | Get-ItemProperty) }
    ($InstalledSoftware | Where {$_.DisplayName -ne $Null -AND $_.SystemComponent -ne "1" -AND $_.ParentKeyName -eq $Null})| Select-Object -Property DisplayName,DisplayVersion,InstallDate | Sort-Object -Property DisplayName
    DisplayName DisplayVersion InstallDate
    ActivClient x64 7.0.2 20140314
    Adobe Acrobat X Pro - E... 10.1.9 20140227
    Adobe AIR 4.0.0.1390
    Adobe Customization Wiz... 11.0.0 20140325
    Adobe Flash Player 12 P... 12.0.0.43
    etc.

  • What is the meaning of the status value in resulted table via power shell command?

    Hello,
    I have queries about result given by powershell command:
    Get-WmiObject -Class Win32_Processor results Status code as
    OK - What does it mean ? what are other status code options  ?
    Get-WmiObject -Class Win32_ComputerSystem results Status code as OK - What does it mean ? what are other status code options  ?
    [System.Net.WebRequest]::Create($site) > GetResponse() results StatusCode as OK - What does it mean ? whats are other status code options  ?
    Would you please clarify ?
    Thanks and Kind Regards,
    Dipti Chhatrapati

    Dipti...Check the msdn site for that particular class for all the info.
    The values will differ from class to class.
    http://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx
    Status
    Data type: string
    Access type: Read-only
    Qualifiers: MaxLen (10)
    Current status of an object. This property is inherited from CIM_ManagedSystemElement.
    The values are:
    "OK"
    "Error"
    "Degraded"
    "Unknown"
    "Pred Fail"
    "Starting"
    "Stopping"
    "Service"
    "Stressed"
    "NonRecover"
    "NoContact"
    "LostComm"
    Thanks Azam When you see answers please Mark as Answer if Helpful..vote as helpful.

  • Struggling with a simple Power Shell command

    I have been doing a lot of mailbox moving and after the move, the source winds up in Disconnected Mailboxes. I typically wait a few days before removing the disconnected mailbox to make sure the user is OK. Although I have never restored a mailbox from a
    disconnected state, I suppose the situation could arise some day. Anyway, I use the commands below to remove the disconnected mailboxes.
    $sdmailbox=Get-MailboxStatistics -Database DB1| where {$_.DisconnectReason -eq “SoftDeleted”}
    then
    $sdmailbox | foreach {Remove-StoreMailbox -Database $_.database -Identity $_.DisplayName -MailboxState SoftDeleted} $confirm
    Of course, the first command returns ALL the softdeleted mailboxes. Is there a way to run this command so it only returns mailboxes that were disconnected say 2 days ago?
    Been playing around with the variable $_.DisconnectedDate and just can't get it to work.

    Disconnected before two days...
    $sdmailbox=Get-MailboxStatistics -Database DB1| where {$_.DisconnectReason -eq “SoftDeleted” -and $_.DisconnectDate -ne $null -and $_.DisconnectDate -lt (get-date).AddDays(-2)}
    Disconnected in last two days ...
    $sdmailbox=Get-MailboxStatistics -Database DB1| where {$_.DisconnectReason -eq “SoftDeleted” -and $_.DisconnectDate -ne $null -and $_.DisconnectDate -gt (get-date).AddDays(-2)}
    Blog |
    Get Your Exchange Powershell Tip of the Day from here

  • Shell command authorization

    Hi all
    I am having a problem with Shell Command Authorization. I have a user setup who I only want to be able to display the config, this is for automated config archival on an hourly basis.
    I have configuered the device with the following aaa commands:
    aaa new-model
    aaa group server tacacs+ ACS
    aaa authentication login default group ACS
    aaa authentication login NOAUTH none
    aaa authorization config-commands
    aaa authorization exec default group tacacs+ group ACS
    aaa authorization exec NOAUTH none
    aaa authorization commands 15 default group ACS
    aaa authorization commands 15 NOAUTH none
    aaa accounting commands 15 default start-stop group ACS
    The static account I have configured logs in ok and can show config etc. Access to conf t is disabled which is good but for some reason he can do any show command instead of just show run which is all I have allowed in the Shell command authorization.
    Unmatched commands is set to deny and permit unmatched arguements is unchecked.
    ACS is 3.3(2) and the switch I am testing is running 12.1(9)EA1
    Any ideas?

    Most "show" command are level 1 commands. You can verify this by logging in as a normal user, issue a "sho priv" to ensure you're at level 1, and then type "sho ip route", "sho ver", etc, you'll see that all of them work fine.
    Your AAA commands only tell the switch to authorize level 15 commands, so when you do a "sho ver" or the like this command will not be sent off to the ACS server for authorization.
    If you add the following:
    aaa authorization commands 1 default group ACS
    then that shoud fix it, but be careful because it's easy to lock yourself out of being able to get into enable mode (add "enable" into your command set too).
    You should also have noticed that all those "show" commands weren't being accounted either, because you have also only enabled accounting for level 15 commands.

Maybe you are looking for

  • Warning when i am trying to refresh security in planning

    Hello, We are getting a Warning we are getting a warning....This is for the first time i am seeing this in Version 11. WARNING: Refresh will recreate the outline for all the Essbase cubes used in this Application based on the current metadata definit

  • How can I cancel one of my subscription?

    Yesterday, i'm done 2 subscribed with Attitude Thailand, one is happened on AIS Bookstore Application that is the first place, i'm tried to make a subscription with Attitude thailand. It didn't work, nothing appeared on screen just talking about the

  • Itune sync with outlook calendar

    everytime itune sync with outlook calendar, a calendar folder under Outlook calendar is created. iphone only sync with the newly created blank folder therefore, nothing.

  • Can you do a FLIP WIPE in fcp

    I know there is a 3D cube spin, etc but what about a basic FLIP WIPE in 2D space. Thanks. Craig

  • Displaying change documents(MM03) in Material master

    Hi All One User having problem in displaying change documents(MM03) made by the some of the users for the materials (It is not the authorization as he is provided with the same to diplay the change doc) Kindly let me know how i can view the change do