Archive

Archive for May, 2014

Script: Get-CsFederatedConversationDetails.ps1 – See Stats About Conversations With Specific Federated Domains

May 13th, 2014 5 comments

Lync 2013 logo 128x128Description

Richard Schwendiman, PFE at Microsoft, came up with a great SQL query that you could plug into SQL Server Management Studio to see time & date info for conversations with federated or PIC domains. In Richard’s case, he used the aol.com PIC domain. Since PIC federation with AOL and Yahoo is ending next month, I thought this was great timing on Richard’s part. But sometimes, Lync admins can’t login to SQL servers to run queries due to security policy. Plus, the query is something you’d have to keep handy and edit accordingly each time you wanted to get data. So I figured – hey, why not whip up a quick script to allow an admin to query SQL for this data, allowing for any domain and time frame to be specified? Poof – out comes my script.

This script will query a specific SQL server for information about a specific federated SIP domain. The domain does NOT need to be in the allowed domains list if you’re open federating. Any SIP domain name works. You can specify a start date/time in the yyyy-MM-dd format, such as 2014-05-13 using the -TimeSpan parameter. Or, you can use some handy ranges I’ve included, including LastWeek (the last 7 days), Last30Days, Last year (last 365 days), FirstOfYear or ThisYear (since Jan. 1), FirstOfMonth or ThisMonth (since the 1st of the month), FirstOfWeek or ThisWeek (since Sunday). Optionally, you can specify an end date/time in the yyyy-MM-dd format. This script will default to FirstOfYear with no end date, and aol.com for the domain. As we see below, only the SQL server holding the LcsCDR database is queried.

aol3

Now, from this output, we see that there is not a lot of communications with people on AOL since the first of the year. The upcoming change should have very little impact.

If you’re using a named instance in SQL, you can specify it as well.

The script outputs a full object, just like other cmdlets, so you can pipe it to other commands to alter the display, including sorting, or my favorite, Out-GridView, as well as outputting to files such as .csv.

Hopefully, this tool will make life a little easier in digging out data.

Syntax

Get-CsFederatedConversationDetails.ps1 [[-SqlServer] ] [[-SqlInstance] ] [[-SipDomain] ] [[-TimeSpan] <object>] [[-EndDate] <object>] [-WhatIf ] [-Confirm ] [<commonparameters>]</commonparameters></object>

Installation

Execution Policy: Third-party PowerShell scripts may require that the PowerShell Execution Policy be set to either AllSigned, RemoteSigned, or Unrestricted. The default is Restricted, which prevents scripts – even code signed scripts – from running. For more information about setting your Execution Policy, see Using the Set-ExecutionPolicy Cmdlet.

Donations

I’ve never been one to really solicit donations for my work. My offerings are created because *I* need to solve a problem, and once I do, it makes sense to offer the results of my work to the public. I mean, let’s face it: I can’t be the only one with that particular issue, right? Quite often, to my surprise, I’m asked why I don’t have a “donate” button so people can donate a few bucks. I’ve never really put much thought into it. But those inquiries are coming more often now, so I’m yielding to them. If you’d like to donate, you can send a few bucks via PayPal at https://www.paypal.me/PatRichard. Money collected from that will go to the costs of my website (hosting and domain names), as well as to my home lab.

Assumptions

None

Download

v1.0 – 05-13-2014 – Get-CsFederatedConversationDetails.v1.0.zip

Changelog

See the changelog for information on what’s changed/included in each version.

 

Changelog: Get-CsFederatedConversationDetails.ps1

May 13th, 2014 No comments

This is the changelog page for Get-CsFederatedConversationDetails.ps1. You will find a complete list of released versions, their dates, and the features and issues addressed in each. Please refer to the script’s main page for more information including download links, installation details, and more.

v1.0 – 05-13-2014

  1. Initial version

Script: Get-CsUpdateVersion.ps1 – See the Cumulative Update Level Of All Lync/Skype for Business Servers

May 2nd, 2014 45 comments

Description

My work at Modality Systems often has me doing health checks for customer Lync environments. These can be due to customer requests, or as part of our onboarding for new managed support customers. If you’ve ever had an Active Directory Risk Assessment Program (ADRAP) or Exchange Risk Assessment Program (ExRAP), it’s quite similar. Lots of tasks to run, lots of data to sift through. So it’s always beneficial to standardize and automate the steps to get the data. The same is the case when you’re responsible for your own environment and want to ensure good health.

Just like Get-CsDatabaseUpdateStatus.ps1, Dave Howe from the Lync product group and I teamed up to automate something. In this case, it’s looking at what Cumulative Updates are installed on each server throughout a Lync environment. This script queries each pool, then finds what servers are part of that pool, and queries each server to find the CU that’s installed. It then provides an easy to read output of the entire environment (with exceptions) for easy review. As shown below, we see three multi-server pools, the version number and “friendly” Cumulative Update info.

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

ComputerName   : sjc-edge01
PoolFqdn       : sjc-edge01.contoso.com
Version        :
Product        :
Update         :
FriendlyResult : PSRemoting failure
UpToDate       :
UpdateUrl      :

ComputerName   : sjc-fe01
PoolFqdn       : sjc-fe01.contoso.com
Version        : 6.0.9319.272
Product        : Skype for Business Server 2015
Update         : CU4 - 11/04/2016
FriendlyResult : Skype for Business Server 2015 CU4 - 11/04/2016
UpToDate       : False
UpdateUrl      : http://support.microsoft.com/kb/3199093

ComputerName   : sjc-pc01
PoolFqdn       : sjc-pc01.contoso.com
Version        : 6.0.9319.272
Product        : Skype for Business Server 2015
Update         : CU4 - 11/04/2016
FriendlyResult : Skype for Business Server 2015 CU4 - 11/04/2016
UpToDate       : False
UpdateUrl      : http://support.microsoft.com/kb/3199093

The script works fine with Standard Edition servers as well.

In the first example, you see that the first two servers show “PSRemoting failure”. This is because the script uses PowerShell Remoting to connect to each remote server to query information (see installation notes below). PSRemoting doesn’t really work the same when dealing with non-domain joined machines, such as the first two, which are edge servers. So the script isn’t able to communicate with them via PSRemoting, and flags them. If the script can’t ping a server, it will show as “offline”. The friendly name of the CU shown is coded in the online XML file that the script queries. So I’ll update it each time a new CU is released.

By default, the script checks all pools. But you can specify a single pool by using the -PoolFqdn parameter.

Syntax

Get-CsUpdateVersion.ps1 [[-PoolFqdn] ] [-WhatIf] [-Confirm]

Installation

This script uses PowerShell Remoting to query remote servers. PSRemoting is enabled by default on Windows Server 2012 and later, but disabled by default on 2008 R2. To enable PSRemoting on 2008 R2 servers, see Enable-PSRemoting. The script requires Internet access on the machine the script is running on. This is to query the XML file containing the update information.

Execution Policy: Third-party PowerShell scripts may require that the PowerShell Execution Policy be set to either AllSigned, RemoteSigned, or Unrestricted. The default is Restricted, which prevents scripts – even code signed scripts – from running. For more information about setting your Execution Policy, see Using the Set-ExecutionPolicy Cmdlet.

Donations

I’ve never been one to really solicit donations for my work. My offerings are created because *I* need to solve a problem, and once I do, it makes sense to offer the results of my work to the public. I mean, let’s face it: I can’t be the only one with that particular issue, right? Quite often, to my surprise, I’m asked why I don’t have a “donate” button so people can donate a few bucks. I’ve never really put much thought into it. But those inquiries are coming more often now, so I’m yielding to them. If you’d like to donate, you can send a few bucks via PayPal at https://www.paypal.me/PatRichard. Money collected from that will go to the costs of my website (hosting and domain names), as well as to my home lab.

Assumptions

None

Download

v3.9 – 03-08-2017 – Get-CsUpdateVersion.v3.9.zip

v3.8 – 02-14-2017 – Get-CsUpdateVersion.v3.8.zip

v3.7 – 02-05-2017 – Get-CsUpdateVersion.v3.7.zip

v3.6 – 01-06-2017 – Get-CsUpdateVersion.v3.6.zip

v3.5 – 11-28-2016 – Get-CsUpdateVersion.v3.5.zip

v3.4 – 11-12-2016 – Get-CsUpdateVersion.v3.4.zip

v3.3 – 08-31-2016 – Get-CsUpdateVersion.v3.3.zip

v3.2 – 07-15-2016 – Get-CsUpdateVersion.v3.2.zip

v3.1 – 07-05-2016 – Get-CsUpdateVersion.v3.1.zip

v3.0 – 04-21-2016 – Get-CsUpdateVersion.v3.0.zip

v2.9 – 04-07-2016 – Get-CsUpdateVersion.v2.9.zip

v2.8 – 01-26-2016 – Get-CsUpdateVersion.v2.8.zip

v2.7 – 12-14-2015 – Get-CsUpdateVersion.v2.7.zip

v2.6 – 11-17-2015 – Get-CsUpdateVersion.v2.6.zip

v2.5 – 11-11-2015 – Get-CsUpdateVersion.v2.5.zip

v2.4 – 10-03-2015 – Get-CsUpdateVersion.v2.4.zip

v2.3 – 09-09-2015 – Get-CsUpdateVersion.v2.3.zip

v2.2 – 07-14-2015 – Get-CsUpdateVersion.v2.2.zip

v2.1 – 06-21-2015 – Get-CsUpdateVersion.v2.1.zip

v2.0 – 05-12-2015 – Get-CsUpdateVersion.v2.0.zip

v1.9 – 02-19-2015 – Get-CsUpdateVersion.v1.9.zip

v1.8 – 02-09-2015 – Get-CsUpdateVersion.v1.8.zip

v1.7 – 01-01-2015 – Get-CsUpdateVersion.v1.7.zip

v1.6 – 12-12-2014 – Get-CsUpdateVersion.v1.6.zip

v1.5 – 11-21-2014 – Get-CsUpdateVersion.v1.5.zip

v1.4 – 09-24-2014 – Get-CsUpdateVersion.v1.4.zip

v1.3 – 09-02-2014 – Get-CsUpdateVersion.v1.3.zip

v1.2 – 08-07-2014 – Get-CsUpdateVersion.v1.2,zip

v1.1 – 06-02-2014 – Get-CsUpdateVersion.v1.1.zip

v1.0 – 05-02-2014 – Get-CsUpdateVersion.v1.0.zip

Changelog

See the changelog for information on what’s changed/included in each version.

Changelog: Get-CsUpdateVersion.ps1

May 2nd, 2014 3 comments

This is the changelog page for Get-CsUpdateVersion.ps1. You will find a complete list of released versions, their dates, and the features and issues addressed in each. Please refer to the script’s main page for more information including download links, installation details, and more.

v3.9 – 03-08-2017

  1. Converted script to return PowerShell objects instead of the previously used write-host and write-output. While this sheds the nicely colored output, it makes it far more effective, and better aligns with PowerShell best practices.
  2. Converted the script to ONLY use the online data for version info. This means that every time a new update is released for Lync Server 2010, Lync Server 2013, and/or Skype for Business Server 2015, I don’t need to release a new version of the script – merely update the hosted XML file containing the data. This also means that users of the script won’t need to always download a new version. This doesn’t mean there will be no further updates to the script.
  3. Fixed an issue where when using the online data (available in the last couple of versions using the -online switch) doesn’t check the online data for each server (and due to a glitch, sometimes twice for each server). The data is retrieved once when the script starts.
  4. Added some more verbose output, as large environments or those with slower connections to remote servers, or those with unreachable servers would slow the script down. Running it with the -verbose option will at least give the user some running information.
  5. Some code cleanup and optimization.

v3.8 – 02-14-2017

  1. added version 6.0.9319.277 for Skype for Business Server

v3.7 – 02-05-2017

  1. Code cleanup/optimization
  2. added version 5.0.8308.984 for Lync Server 2013

v3.6 – 01-06-2017

  1. Added 5.0.8308.977 for Lync Server 2013

v3.5 – 11-28-2016

  1. Added 5.0.8308.974 for Lync Server 2013
  2. Fixed an issue with the Get-UpdateInfo function that was causing unexpected “PSRemoting Failure” errors later in the script.
  3. Added the -online option, which will query update information from an online source instead of the info within the script itself. If this pans out ok, it will be the default method in future versions. It does require that the machine running the script have Internet access.

v3.4 – 11-12-2016

  1. Added new update mechanism
  2. Added some logging
  3. Added 4.0.7577.728 for Lync Server 2010
  4. Added 6.0.9319.272 for Skype for Business Server 2015

v3.3 – 08-31-2016

  1. Added build 5.0.8308.965 for Lync Server 2013

v3.2 – 07-15-2016

  1. Added build 5.0.8308.956 for Lync Server 2013

v3.1 – 07-05-2016

  1. Added build 6.0.9319.259 for Skype for Business Server 2015

v3.0 – 04-21-2016

  1. Added build 4.0.7577.726 for Lync Server 2010
  2. Added build 5.0.8308.949 for Lync Server 2013

v2.9 – 04-07-2016

  1. Added build 6.0.9319.235 (03/18/2016) – Thanks to Geir Age Moretensen for pointing it out

v2.8 – 01-26-2016

  1. Added support for Lync Server 2013 build 5.0.8308.945 (01/03/2016) – Thanks to Geir for pointing it out

v2.7 – 12-14-2015

  1. Added support for Lync Server 2013 build 5.0.8308.941 (12-14-2015)

v2.6 – 11-17-2015

  1. Added support for Skype for Business Server 2015 build 6.0.9319.102 (11/17/2015).

v2.5 – 11-11-2015

  1. Added support for Skype for Business Server 2015 build 6.0.9319.88 (9/26/2015).
  2. Removed references to Skype for Business Server 2015 Cumulative Updates due to general confusion.

v2.4 – 10-03-2015

  1. Added support for Lync Server 2013 CU15 (5.0.8308.927)
  2. Added support for Lync Server 2013 CU14 (5.0.8308.927). Thanks to Geir for submitting the info.
  3. added -SkipUpdateCheck to skip update check

v2.3 – 09-09-2015

  1. Added support for Skype for Business Server 2015 CU2 (6.0.9319.72)
  2. Added default of “Unknown version”. Thanks to Bernard for the idea.
  3. Code optimization
  4. server name is now only displayed as NetBIOS name to help reduce wordwrap (was previously FQDN). It’s red if the version is not the latest (or unknown), and green if it’s the latest version.

v2.2 – 07-14-2015

  1. Added support for Lync Server 2010 CU16 (4.0.7577.713) – Thanks to Martin for pointing it out.
  2. Added support for Lync Server 2013 CU13 (5.0.8308.920)

v2.1 – 06-21-2015

  1. Added support for Skype for Business Server 2015 RTM (6.0.9319.0)
  2. Added support for Skype for Business Server 2015 CU1 (6.0.9319.45)

v2.0 – 05-12-2015

  1. fixed typo for Lync Server 2010 CU15. Thanks to @greiginsydney for pointing it out.
  2. Updated Lync Server 2013 CU 11 – original download was 5.0.8308.871, but current download of CU 11 shows as 5.0.8308.872
  3. Added support for Lync Server 2013 CU 12 (5.0.8308.887)

v1.9 – 02-19-2015

  1. Added Lync Server 2013 CU 11 (5.0.8308.871)

v1.8 – 02-09-2015

  1. Added Lync Server 2010 CU 15 (4.0.7577.710)

v1.7 – 01-01-2015

  1. Added Lync Server 2010 CU 13 (4.0.7577.707)
  2. Added Lync Server 2010 CU 14 (4.0.7577.708)
  3. Added Lync Server 2013 CU 10 (5.0.8308.866)

v1.6 – 12-12-2014

  1. Added Lync Server 2013 CU 9 (5.0.8308.857)

v1.5 – 11-21-2014

  1. Added Lync Server 2013 post CU5 (5.0.8308.803)
  2. Added Lync Server 2013 CU 7 (5.0.8308.831)
  3. Added Lync Server 2013 CU 8 (5.0.8308.834)

v1.4 – 09-24-2014

  1. Added Lync Server 2013 CU6

v1.3 – 09-02-2014

  1. Added Lync Server 2010 CU12

v1.2 – 08-07-2014

  1. Added script check for updates. This is key because each time a new cumulative update comes out, the script will be updated with version info
  2. Added some preliminary code around getting version info for OWAS servers. Need to find a graceful way of getting the server names in a OWAS farm.
  3. Added Lync Server 2013 CU5

v1.1 – 06-02-2014

  1. Tweaked the PSRemoting code block for retrieving version numbers per Chris Irons. This should resolve unexpected results when querying Lync Server 2010 pools.
  2. Filtered out “Debugging Tools” “Resource Kit Tools” “Best Practices Analyzer” and “Meeting Room Portal” which could have a higher version number and cause incorrect results – thanks to Andy G for pointing that out.
  3. Shortened some of the output text to reduce the likelihood of word wrap.

v1.0 – 05-02-2014

  1. Initial version