Just the Shell commands for Skype Trouble Logging

I wanted to take a few minutes to just document a simple thing. Well the scope of the subject can become complex quickly. But this is not that. This is just a quick review of how to get the basic log output so you can troubleshoot a Skype issue.

I have a Video for this topic on Youtube.

So now matter how you approach logging, you will end up needing the Skype Debugging Tools.

The Debugging tool contains the Snooper log tool you will use to analyze the log. But It also contains the Skype GUI for also collecting the logs. So let me say your best method to collecting the Skype logs is to use the Gui in the Debugging tool kit. Here is a link for covering that topic: here

If the debugging tool kit is not working, you have another choice here that will act as a GUI for Log collection and analysis. Why not have a back up.


Command Line Logging

We are not going deep into Command line. If you want that please look here.

This is the emergency list of command if you just need to get logs now. below are the basic commands in order.

 

  • Show-CsClsLogging -Pools “pool.domain.com”
  • Start-CsClslogging -scenario  alwayson
  • Stop-Csclslogging -scenario “AlwaysOn”
  • Search-CsClsLogging -OutputFilePath “C:\Users\admin\mylogs\ouput.txt

 

This is the bare bones commands you can use in a pinch to get your basic logs.


Scenarios there are many you can run

So the one item missing from the commands above is a way to get the different scenarios you can choose. In order to get this information, just run the following:

  • Get-CsClsScenario | fT name

This command is important as you can target what your looking for more clearly by using the right scenario to log:

clsloggingscenario

So one thing to note is that the always on log will collect the sip stack trace, which is used in the lion share of Skype troubleshooting.

So now below I will include some examples of command you may find useful. this is not exhaustive, but this is the main things you may need for an average log collection

 

  1. Is logging running – Show-CsClsLogging -Pools “skypepool.domain.com
  2. Run Edge Log- Start-CsClsLogging -Pools pool.domain.com -Computers edge.domain.com -Scenario alwayson
  3. Complex search by time- Search-CsClsLogging -pools “pool01.contoso.net” -StartTime “11/20/2012 08:00:00 AM” -EndTime “11/20/2012 09:00:00 AM” -OutputFilePath “C:\Logfiles\logfile.txt”

 

To conclude, this is the crude basics you need to get those logs. if you want additonal information on hoe to make your own scenarios, that is very doable. see here for additional information if you are interested.

 

Thank you and happy logging.

 

Louis

 

 

 

 

Edge Replication Status is false and the Last Update Creation time stops updating for command get-csmanagementstorereplicationstatus

When it comes to Edge Replication checking, this looks like a false positive below. But I know we all like to see true. So you see where the date says 6/22? That change means the last status report was a few month’s earlier. That missing update creation, is possibly saying the replication is not working. this is not hard to fix, so lets fix it!

 

Perform the steps below:

  1. Go to the Front end server and open Skype Management Shell
  2. Run the command Export-CsConfiguration –Filename C:\filename.zip
  3. Copy the file to the Edge Server.
  4. Open the Skype for Business Deployment Wizard
  5. Choose Install Or Update Skype for Business Server System
  6. Choose install local configuration store.
  7. Browse to the file and finish the wizard.
  8. You can restart the Edge Server or just wait several minutes.
  9. If this fails, you just need to restart the SFB replication service on the FE and Edge Servers.

 

This is the point at which you browse to the configuration Zip file. Its Step 7.

I hope this helps your issue. I have seen this just stop refreshing and this step normally fixes the issue in my experience.

 

Louis

Creating or migrating the CMS of a SQL 2014 Always on Availability Group for Skype for Business 2015.

Creating or migrating the CMS of a SQL 2014 Always on Availability Group for Skype for Business 2015

 

I think one you get done with your deployment, you get to sit back and Enjoy the Honey of your Efforts. But If you are Migrating a SQL Always On Availability Group, See Below for some steps!

 

 

Basic Bullets steps

 

  1. Review Prerequisites
  2. Don’t try this on Lync 2013. This must be done using A fully patched SFB Fe Servers, as well as Fully Patched Server 2012 R2 Machine.
  3. So point # 2 is the reason for this article. The word is, Lync 2013 is not supported, but it works. Below you may see the gotcha, and be able to set it up.
  4. Install the Clustering Role on both SQL Servrs with Add-WindowsFeature Net-Framework-Core, Failover-Clustering, RSAT-Clustering-Mgmt,RSAT-Clustering-PowerShell -Source d:\sources\sxs
  5. Do not try to use SQL 2016. Only use SQL 2014 with SFB 2015 and Server 2012 R2-
  6. Test-Cluster -Node SQL1, SQL2 and make sure you have pre-requisites correct.

Follow the documentation of your choice to install your Skype for Business on SQL, but please review the notes from my friend in the Field, Timothy E Boudin. His notes may come in helpful, if you’re facing the move, and see no documentation. This is what he ran across, and brought to me. Thank you to Tim , for bringing this issue up so I could write about it:

First Find your Links for the Job

Skype

SQL

 

So to summarize, you should basically move the CMS when you do the SQL always on Availability group in my opinion. Otherwise, you are going to have to come back later, and do the second part of this cold. This is just an opinion. Below, Please Find Tim’s, Comments on his Move of the CMS with SQL Always on and Lync 2013, and SFB 2015 Migration.

 

Skype for Business setup using SQL always on Clustering

This configuration requires some unique settings for the build of the Skype for Business (SFB) support when dealing with the issue of supporting the CMS migration from Lync 2013 or previous versions to SFB 2015.

 

For this discussion the servers are as follows

Enterprise Front End Servers (3)

FE1, FE2, FE3

Always on SQL Cluster servers (2)

SQLNode1, SQLNode2, SQL Listener

During the process of defining a new Enterprise Front End pool, you provide the names of the Servers that are members of the pool as normal, but when providing the new Back end servers information you have to handle this in a specific way to be able to support fail-over.

Create the new SQL Server Store as follows

 

Fill in the name of the SQL Listener in the SQL Server FQDN field

 

Provide the name of the SQL Instance if your using one.

Check the High Availability Settings option

Select SQL Always-on Availability Groups

Fill in the name of the SQL Node1 server

Click OK and complete the Front End pool Wizard.  When you Publish the changes to topology you should be prompted to provide details on how you want to establish the tables for the Cluster.  If this is setup by a DBA check with them on location of the Data and Log files.

Once publishing is completed, go back and edit the SQL Store settings and change the SQLNode1 setting to SQLNode2 server name.

 

Publish the change and then do an Install or upgrade a Database

Once publishing is completed, go back and edit the SQL Store settings and change the SQLNode1 setting to the SQL Listener server name.  Now publish a finial time.  There is no need to do an Install Database for this change.

 

Once the finial publish is complete you should be able to start services on the Front End Pool servers.

Move the CMS

To move the CMS from the previous location to the Front End pool using the Always-on Cluster use the following process.

  • Stop Services on the Front End Pool to be hosting the new CMS location
  • Open the Lync Power-Shell and use the following commands:

Stop-cswindowsservice

  • Backup the CMS to a file with the following

Export-CsConfiguration –filename c:\media\cmsbackup.zip

 Create the new Tables for the CMS on the new Front End pool specifying the node1 of the cluster, when you specify the database paths they are listed by Log file location first and then by Data file location.

Install-CsDatabase –CentralManagementDatabase –SQLServerFQDN SQLNode1.contoso.com -databasepaths g:\RTC_logs,f:\RTC_data -sqlinstancename RTC –verbose

 Once the tables have been created, have the DBA verify Mirroring between the nodes is in place.

 Enable-cscomputer

Get-CsManagementStoreReplicationStatus

If replication is good then move the CMS to new server by using the Move command on the Front end server in the target pool.

Move-CsManagementServer

 

Once the move is complete, allow for server replication and then Run local Setup in the deployment wizard on all affected Front end servers and reboot them and Monitor replication

Get-csmanagementconnection

Get-CsService –CentralManagement

 

I hope this is helpful Documentation, if you have to face this situation.

 

Thank you,

 

Louis

Using Jperf Graphical Interface for Iperf, for basic network testing and Diskspeed or Dskspeed for storage testing.

 

Late night yawl.

Its 11:52 PM on 3/28/2017. It has been pouring in Edmond for a few hours now. For some reason I am not sleepy yet. I thought I would spend a few minutes putting together how to use a tool I was interest in.

Jperf is a script that runs on windows, and takes the place of IPERF.This little GUI should do most of the things you need, from a two windows machines. If you want to do it on Linux, then you can just use the Iperf command line.

Half the battle for Jperf is just finding the Bits. They are located here:

JPERF Download

There is also a copy of DiskSPeed or DSKSPEED.

The concept of running Jperf is simple:

  • Java must be running on both machines
  • Unzip the Jperf Folder to the Desktop
  • Use PowerShell 5 to run the Batch file on both machines
  • The server just sends data to the test subject, so to start the server, you just select the Server Radio button and hit Run IPERF in the upper right hand corner.
  • This will look like this:

 

1

 

and to run the script, all you had to do was run a batch file called Jperf.bat:

 

2

Now after starting the Jperf on the Server machine, you simply run the same batch file, on the machine that is going to be the client. Choose the client radio button, the Server Port, and Server IP. You have other choices, but you can test various packet configurations after you have showed that the two applications are doing the basic monitoring succeeding.

 

SO now that you have both GUIs up, chose run IPERF on the server, then on the client. you should see some graphing immediately.

3

The tool is nice to just show how the network is working between two points, with various network conditions, that you can control.

If you look at the enclosed User Guide, you will find where it calls out a baseline number you can use for making comparisons  the average file transfer size and the time for that average transfer, in the last line of the test is what I am talking about (see figure below)

These numbers you want to take note of. you can use this as your baseline, to compare other situations or other iterations of the test.

4

That’s IT!

Good luck and I hope this helps to explain how you can use IPERF with a basic GUI and provide good troubleshooting  information The tool is called Jperf and It uses Iperf. Its all in the download folder.

Next Time

Watch out next time when I will review the replacement for SQLIO. The tool is called DSKSPD or Disk Speed. We will talk about how  “dsksped test not valid for hyper-v virtual machine storage” Hyper-v performance is not as easy as just using Disk SPeed

MS even states that Dynamically expanding disks should not be used for production. That is also where counters start to come back with irrational results.

Here is something to read on Hyper-v Storage optimization, until I have time to write the next article

Update all of your Skype For Business Servers

 

SFBupdates

Good Morning Class, Today I just wanted to put into your hands a needed cheat sheet that puts together all of the update changes in SFB into one simple upgrade document for any set of SFB servers.  So lets begin.

Pre-Requisite Install work for Skype for Business Updates

Updates should be done in the following groups, in the following order:

  • Standard Edition Servers
  • Front End Servers
  • Mediations Servers, Director and Edge Servers
  • Back End SQL Servers

To begin, If you have Skype for Business (SFB) Standard Edition, you will follow this process:

Standard Edition Updates for SFB Server Environment

  • 1 Stop-CsWindowsService
  • 2 net stop w3svc
  • 3 SkypeServerUpdateInstaller.exe
  • 4 Once this is complete move to step 5
  • 5 Open a new SFB Shell after closing the update window
  • 6 Stop-CsWindowsService
  • 7 net start w3svc
  • 8 Depending on your Database setup- you may run one or the other
    1. Install-CsDatabase -Update -ConfiguredDatabases -SqlServerFqdn <SQL Server FQDN>
    2. Install-CsDatabase -Update -ConfiguredDatabases -SqlServerFqdn <SQL Server FQDN> -ExcludeCollocatedStores
    3. Install-CsDatabase -Update -LocalDatabases

If you have Standard SFB, Stop. You have completed all you need for your Deployment. If you have SFB Enterprise, Follow the Steps Below.

SFB Enterprise Updates of Servers and SQL

Front End Servers Patched First. Patch One Pool At a time, One Server at a time.

Run: 1. Get-CsPoolUpgradeReadinessState

Only if you get a failure, and only if your results show a missing replica, then you run this command:

    • Get-CsPoolFabricState -PoolFqdn <PoolFQDN>
    • Reset-CsPoolRegistrarState -ResetType QuorumLossRecovery

Otherwise Continue

  • 2. (Ignore if non Clustered or Mirrored) Invoke-CsComputerFailOver -ComputerName <Front End Server to be patched>
  • 3. Get-CsWindowsService (services will be running) & Get-CsPoolFabricState (Fabric will show 1 less server in the pool)
  • 4. Run the latest Installer package
  • 5. Don’t Be impatient!!!
  • 6. Only when the updates are done, move to step 7 or 8
  • 7. (Ignore if non Clustered or Mirrored) Invoke-CsComputerFailBack –ComputerName <Front End>
  • 8. You may check for the pending restart. Be aware you may want to do the restart before moving to the next server

Mediations Servers, Director and Edge Servers Patch One at a time

The Steps are the same for this group of servers as well. However, they need to be completed as a separate group. So begin with the same steps and when complete, Make sure you have restated your servers if needed.Edge Servers should be done together as well.

Back end SQL Servers and other SQL Servers

Once all of these servers in your deployment are updated, You need to update the SQL instances:

  • 1.On the Back End SQL machines OR On the Master FE sever of your Pool (RTClocal) or Monitoring Database

      • Install-CsDatabase -Update -ConfiguredDatabases -SqlServerFqdn
  • If any of #1 is on the back end with the root BE database instance, Use:
      • Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn <FEBE.FQDN> -ExcludeCollocatedStores -Verbose

Once you have completed the final step, you can then run the command Start-CSPOOL, and that should cause the SFB Pool to verify the pool fabric is happy and all will e started up again properly.

Thus having done this, you will have successfully updated you Skype for Business Environment. I hope this makes it a little easier to carry out Your updates.

Yours Truly.

Louis

How to Start, Stop and Search For failures or Issues in Skype For Business Server AKA CsClsLogging AKA Centralized Logging

tree

 

I have a video which complements this blog located at YouTube. Have a look if you need help-

Logging in Skype for Business has a lot of potential. However, it is made difficult by the need to use The command line. If you remember the Skype 2015 Resources tool kit, This kit contains CLSLogger And Snooper. This CLSLogger should be made part of the SFB product. It is a natural thing to do to help users gets the logs they need, without the size that command line logging can yield. If you Download CLS logger, I will show you in just a few steps, how to get the logs you need. Download the Performance toolkit from:

Microsoft.com CLSLOGGER

Once you have the tool in your hand, you simply run the default install, and the tool will be created in the path:

Start the application C:\Program Files\Skype for Business Server 2015\Debugging Tools\ClsLogger.exe

Before I even get started, I will tell you three times during this article, “Ignore the middle tab”. This is for advanced use. If you

Are just starting out, only pay attention to the first and third tab. Your going to run a trace and get a copy of the trace. That is

Our goal.

You are going to see three tabs, Ignore the Edit One

clip_image001

Begin at Tab1 Stop and Start Scenario

YOUR GOING TO RECEATE YOUR ISSUE DURRING THIS STEP. BEGIN REPRODUCING AS SOON AS THE START SENARIO BUTTON

IS PUSHED. MABYE 5 SECONDS AFTER-

 

  1. 1. Choose the Stop and stop scenario (1) See Figure 1 Below
  2. 2. Choose “Incoming and outgoing call” from the Drop Down. This choice will work for most issues because we just need the S4 and Sip Stack Flags (2)
  3. 3. Check the Front end server- or what ever sever you want logs from. you should collect FE servers and Edge logs separately (3)
  4. 4. Choose “start scenario”, when you are ready to recreate issue. In our case we are making a call to another user. (4)
  5. 5. Once the call is finished chose “stop scenario” (5)

 

Figure 1

  clip_image002  

Now Tab 3 the Search CLS LOGS

(Skip tab2 in the middle, it will only confuse things)

Use Figure 2 below to help with instructions

Go to search CLS logs tab. (ignoring the Edit Tab) and follow these steps

1. Log File Folder: Output is going to be where you want your output log to be placed

2. Log level- We usually want “All”

3. Start and stop Time is most important. we want to include the period where the issue occurred. So be early and log a little longer to make Sure you captured the issue

4. Like I said generally select Sip Stack and S4 for SIP calls or IM’s (Voip yes I said it)

5. Finally, You should only select what you captured, an if you captured only front end traffic. Capture Edge traffic in a separate trace

  1. That’s It! Your log should be on your Desktop, or wherever you specified!

 

Figure 2.  clip_image003

Now you should have your log. You can open the log with SNooper, which is in the same folder as CLSLogger. Good Luck and I hope this

was helpful.

Snooper tool is located in C:\Program Files\Skype for Business Server 2015\Debugging Tools\Snooper.exe. By Default.

 

How do I change the name of the Skype for Business Pool?

 

bunny

 

Happy new year all! I will start the year off with the shortest blog ever. You don’t! Ok please keep those cards and letters coming!

 

Louis.

 

As tempted as I am to just leave that as its own punch line, I have that responsibility to write this down for my future old self, who will not recall why I don’t want to delete the Skype for Business Pool and recreate it.

So to put this as mildly as possible, There is generally only one direction with Pools, and that is forward. You may change a pool by introducing another pool, and then moving your desired attributes out of the old pool and into the new pool. There may be various ways to do it in fact. But my experience is the only time you care about a pool name is when you named the pool with a hostname instead of an FQDN. In addition, this is at the beginning of your deployment.

I have learned enough in life to say that if you don’t feel 100% comfortable in the beginning of your Deployment, when are you ever going to be?

So in all my reading I could never pin down Microsoft as saying anything other then the following:

  • 1. You cannot rename the Pool
  • You have to remove lync and or Move the SFB CMS store.
  • Verbal and written word from MS is a consensus that you don’t want to rename the pool.

SO most articles discuss the scorched earth policy and command, enough to just make you want to leave it all alone:

Bootstrapper /scorch

I came up with the commands I use to get back to my install with the least about of trouble. I cant speak for the MS support for this, but I think this is as relevant as any of the other articles you may run into on the subject. Below you will find two steps, and then you can get back to your Deployment.

  • 1. Run the SFB command Remove-CsConfigurationStoreLocation
  • 2. Remove the RTC service (all inside too)  from the ADSIEDIT.MSC configuration partition.
  • 3. Start with checking the SFB configuration Wizard to make sure you get your AD schema, Forest and Domain Prepped. It will say partial now.
  • 4. Next Create a Clean Topology TBXml and publish it.
  • 5. Finally, go back to the Config wizard and Install your Config and the rest of the deployment is yours !
  • 6. In a rare circumstance, you may have to go in and correct the name of the file share in the topology, and re-publish the Topology. This should be the only sorts of issues you would find. Otherwise. don’t look for any Drama. Just move on.

Mind you, you really did wipe your environment but it did seem painless didn’t it? Be aware of the SFB users and other items that will also be blown away by the choices.

Have a Great 2017!

Louis