Quantcast
Channel: Lync News
Viewing all articles
Browse latest Browse all 4272

… and I thought I saw a 2: Get-InvalidRgsAgents.ps1

$
0
0

On a recent window-shopping expedition through the event logs on a customer’s Front-End I stumbled across instances of warnings 31137 & 31138. These are generated when Lync realises that users belonging to RGS Agent Groups are no longer EV-enabled, or no longer exist.

During the Active Directory update non-UC enabled agents were found.
The following users are specified as agents, but are not UC enabled…

Warning31138

Annoyingly, the messages don’t identify the Group(s) the offending users belong to. Enter “Get-InvalidRgsAgents.ps1”.

What Does It Do?

This script searches the Event Logs on the local Front-End server for the most recent instance of each error. It then extracts the SIP addresses, tests their current state and reports this information to screen. If you add one of the “-restore” or “-remove” switches, the script will take action to correct the situation:

PS C:\> .\Get-InvalidRgsAgents.ps1

SIP URI                         Group Name         Owner Pool                Status
-------                         ----------         ----------                ------
jessica@contoso.net             Main_group         lync2013se.contoso.local  OK
derwood@contoso.net             Main_group         lync2013se.contoso.local  Not in Lync/AD
derwood@contoso.net             Dummy Lync10 Group lync2010.contoso.local    EV disabled
derwood@contoso.net             Main_group         lync2013se.contoso.local  EV disabled

-Restore

Any user that is confirmed to still exist in Lync but is EV-disabled will be re-enabled for Enterprise Voice. Other users won’t be touched.

PS C:\> .\Get-InvalidRgsAgents.ps1  -Restore

SIP URI                         Group Name         Owner Pool                Status          Action
-------                         ----------         ----------                ------          ------
jessica@contoso.net             Main_group         lync2013se.contoso.local  OK              Unchanged
homer@contoso.net               Main_group         lync2013se.contoso.local  Not in Lync/AD  Unchanged
derwood@contoso.net             Dummy Lync10 Group lync2010.contoso.local    EV disabled     Restored
derwood@contoso.net             Main_group         lync2013se.contoso.local  EV disabled     Restored

-Remove

Any user that is either EV-disabled or doesn’t exist in Lync will be removed from the Group.

PS C:\> .\Get-InvalidRgsAgents.ps1  -Remove

SIP URI                         Group Name         Owner Pool                Status          Action
-------                         ----------         ----------                ------          ------
jessica@contoso.net             Main_group         lync2013se.contoso.local  OK              Unchanged
homer@contoso.net               Main_group         lync2013se.contoso.local  Not in Lync/AD  Removed
derwood@contoso.net             Dummy Lync10 Group lync2010.contoso.local    EV disabled     Removed
derwood@contoso.net             Main_group         lync2013se.contoso.local  EV disabled     Removed

Other Features

  • On-screen progress bars just in case it takes a while to find a recent instance of the events
  • The output can be piped to a text file:
     .\Get-InvalidRgsAgents.ps1 > Output-dump.txt
  • In-built help and documentation – just run “get-help .\Get-InvalidRgsAgents.ps1”
  • If you have Response Groups across multiple pools, all are tested, however ONLY users homed to the local Front-End will be identified in that machine’s event log
  • And because it’s free-standing, you might even like to schedule it!

Download

Click HERE to view the script in a new window, or to download it as a .zip file: Get-InvalidRgsAgents.zip

 

G.


Viewing all articles
Browse latest Browse all 4272

Trending Articles