Advertisements

Skype for Business 2016 from Office 2016 media endless authentication loop

For those of you who have upgraded to Microsoft Office 2016 and are using Microsoft Skype for Business 2016 with Microsoft Office 365, you may have noticed a seemingly endless authentication loop where after having successfully signed in with your Office 365 credentials, you keep getting prompted to indicate if this is a work or Microsoft Account.

This basically  makes Skype for Business 2016 (Lync’s new name) unusable so we opened a case with Microsoft to try to get a fix.

The result of the case was as follows:

1. Exit out of Skype for Business, and delete following files:

C:\Users\profile\AppData\Local\Microsoft\Office\15.0\Lync\Tracing   

2. Make sure you empty Lync folders under:        

C:\Users\profile\AppData\Local\Microsoft\Office\15.0

C:\Users\profile\AppData\Roaming\Microsoft\Office\15.0

3. Create these two DWORD32 entries

HKCU\SOFTWARE\Microsoft\Office\16.0\Common\Identity\EnableADAL

REG_DWORD

0

HKCU\SOFTWARE\Microsoft\Office\16.0\Common\Identity\Version

REG_DWORD

1

4. You may have to reboot the computer.

Start Skype. You will be prompted once to enter User/Pass to access corporate address book.

image

 

The other issue that we’ve noticed with Skype for Business 2016 is that after a few minutes of use the backspace key stops working in message replies and you’re stuck having to highlight words that you want to delete and use the DEL key instead.  We haven’t got a fix for that one yet, so my personal recommendation is to just avoid Skype for Business 2016 completely and revert to Skype for Business 2015 which is part of the Microsoft Office 2013 media.

To do this, in Programs and Features, select Microsoft Office 2016 and choose change.

Remove the checkbox beside Skype for Business 2016.

When that’s done, go back into Programs and Features and this time select Microsoft Office 2013 (assuming that it is still listed) and choose Change.

Check the checkbox beside Skype for Business 2015.

 

When done, you’re back up and running on the stable release of Lync (Skype for Business 2015) and aren’t stuck in endless authentication loops and you can actually use the backspace key.

I’ll update the article later when we get a solution to the backspace key.  For the moment we’re going to block the upgrade of Skype for Business from our volume media setup files.

Advertisements

Deleting User Profiles to which you do not have permission

Every once in a while I encounter user profiles for employees who have long since left the company that need to be deleted.

In the example below, I have a user account: "dmacdonald" that I want to delete.  The profile consumes 2 GB of storage, their user data folder another 6GB.

Step 1: Delete the user Profile from User Profiles tool:

The fastest way to get to the System Utility for user profiles:

clip_image001

Is to just key “User Profile” into the start menu and choose the  “Configure advanced user profile properties” link.

image

You can then select a profile, and then click the “Delete” button.

image

Normally this is all that’s required to delete the files and folders.

But this time, although it DID delete the profile from the User Profile utility and did delete the \Users\dmacdonald folder it did not actually delete the UserData files.  Those files if you attempt to access them still show Permission Denied, but using a tool like SpaceSniffer.exe I could see that the folder was still consuming nearly 6GB of storage so I didn’t just want to leave it around.

clip_image004

You could click through the continue boxes, and manually try to seize ownership of EACH sub-folder one at a time, and then after doing so grant yourself permission to the folder, but you don’t have time for that.  So instead, use these commands:

To fix this run these commands from an administrator command prompt:

takeown /F dmacdonald /R /D "Y"

Followed by:

icacls dmacdonald /grant Everyone:F /T

After that you can access the files and/or delete them.

Cisco AnyConnect Failed to initialize connection subsystem after applying MS15-011

After applying recent security fixes for Windows 8.1 (https://technet.microsoft.com/library/security/MS15-011) my Cisco ANYConnect client failed to load.  Error:

Cisco AnyConnect: Failed to Initialize connection subsystem.

I’m not sure what it is about the most recent security updates that made it stop working, but I found that by setting it into Windows 7 Compatibility mode the issue was resolved.

The registry hack for doing this was:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\AppCompatFlags\Layers

Add a string value with the string name set as the full path to this file:

C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe

Then set the string value to:

$ Win7RTM

 

image

After making the registry change, right-click the AnyConnect icon, and choose Quit:

image 

Then re-launch the AnyConnect client. and all seems to work.

Dell M3800 missing pause/break key

I love my Dell M3800 but shortly after unboxing I realized that there was no PAUSE/BREAK key on the keyboard so breaking into code was not looking good.

I eventually found a registry hack to re-map another key on the keyboard, but then I loss the functionality of that key. 

Finally a co-worker of mine discovered that pressing CTRL+Fn+F12 = CTRL+BREAK!

Windows 10 Beta–how to sign into Domain instead of Microsoft Account

After installing the Windows 10 Enterprise beta the first thing you’ll notice is that Microsoft tries to make you sign into a Microsoft account immediately instead of giving you the option to first join your domain.

If you sign in immediately and then join the domain later, you’ll end up with two different profiles, both loaded with Microsoft Profile stuff, which is NOT A GOOD THING.

image

There’s no obvious way to “not” sign into the Microsoft account and instead join the domain.

So here’s the work around I’ve come up with.

At this point in the installation, disconnect from the Internet by either unplugging a physical netwok cable, entering airplane mode if you have the switch on your computer to do so, or otherwise just break your connection to the Internet.  If testing in a virtual machine, enter the settings of the VM< and either change the network adapter to “Host Only” such as in VMWare workstation
image

image

or if using a Windows Hyper V server, open Settings…

image

image

Then change the Networking Adapter Virtual Switch to “Not connected”.

When that step is complete, click the Back arrow at the top left of the screen to return to the previous screen, then click the “Next” button again to be presented with the old “Local Account” creation tool:

image

 

On this screen create an account name such as “Admin” – something OTHER THAN the name that you intend to log into this computer with later when joined to the domain.  This step is important to avoid ending up with your C:\User\ folder being called YourName.DomainName instead of just YourName.

When done, re-connect the machine to the network, then join the machine to the domain:

image

Type “Join a domain” in the box at the bottom of the screen.

image

Click “Change”

image

Enter the computer name that you want, the domain name that you want, then have a domain admin or user with add computer rights on the domain to authenticate to the domain and you’re set.

image

After restarting your computer, click the “Back” arrow to switch user:

image

Click the “Other User” option:

image

Then finally sign in with your domain credentials.

image

Note: if you aren’t normally a domain administrator, you may need your domain admin to first log into the machine to make your domain account be an admin of the machine if that is appropriate for your usage scenario.

 

NOTE: If you’re reading this from home and are trying to figure out how to join the domain over a VPN connection, this IS POSSIBLE by creating a shared network connection while logged in as that “Admin” user.  But that’s a topic for a different post.  If doing this with VMWare workstation, and using NAT networking as long as the host computer is already connected to the VPN this VM should also be able to use that VPN connection for the domain authentication.

Another note: Windows 10 Beta build 9926 seems to install just fine on VMWare Workstation 10 and does not appear to require an upgrade to version 11 even though the VMWare web site seems to encourage that.  I was able to successfully install VMware v10 tools to the Windows 10 machine.

One limitation of VMWare Workstation 10 however seems to be that it limits the maximum screen resolution to 2560×1920:

image

Supposedly version 11 fixes that and adds support for full QHD+ (3200×1800) displays like the one in my Dell M3800.  That alone may be worth the upgrade just to not be annoyed by the screen resolution not matching the actual display.  Otherwise the VM seems to run fine on Version 10.

Deleting Duplicate Rows, Keeping only most recent using ROW_NUMBER()

Every once in a while I encounter a data migration scenario where the destination table doesn’t enforce a Unique Index and when re-running data migration code if you forget to purge records in the destination prior to inserting without the unique index you could end up with duplicates.

Today’s posting focuses on one way of deleting the duplicates – using the Row_Number() OVER (PARTITION BY ) ORDER BY  syntax in SQL Server to assign row numbers by what I want to be the Unique records and then delete those that are duplicates.

In the example below, I have a table that stores salesperson assignments – it populates a table called the CommissionSalespersonDefaults.

The inserts in this example were run 3 times over a period of months.  But since the delete was omitted, every time the statements were run I ended up with duplicates/triplicates, etc. in that table, like this:

CommissionSalespersonDefaultsID

CustomerCode

ShipToCode

Commissionable

Salesperson1

22

20THC

 

TRUE

AA1

9538

20THC

 

TRUE

PrI

21971

20THC

 

TRUE

PrI

There should only be one record for this CustomerCode/ShipToCode combination in this table – I need to delete two of them, but in case some attribute is different like in this case the sales rep changed from the 1st migration to the 2nd/3rd I only want to keep the last one – the one with ID 21971.

There are a number of ways to get this done, but for today’s article I’m focusing on the Row_Number() OVER (PARTITION BY ) ORDER BY feature in SQL Server.

Here’s a Select statement showing just the first 9 records with this in action:

I like to see what I’m about to do when it comes to delete statements so I usually start with a select statement giving me a preview of what’s about to happen:

SELECT TOP 9 * FROM CommissionSalespersonDefaults s 

INNER JOIN (

  SELECT *

  , ROW_NUMBER()

    OVER (

           PARTITION BY CustomerCode, ISNULL(ShipToCode, )

           ORDER BY CommissionSalespersonDefaultsID DESC

         ) AS RowNumber

  FROM CommissionSalespersonDefaults

) Numbered ON s.CommissionSalespersonDefaultsID = Numbered.CommissionSalespersonDefaultsID

What the query does is add the RowNumber, with it resetting after each change in whatever you put in the Partition By part – in this case, in each change in CustomerCode+ShipToCode.  The ORDER BY Clause tells SQL Server the order in which to order the records prior to assigning the row numbers.  Here’s a sample of the output

RowNumber

CommissionSalespersonDefaultsID

CustomerCode

ShipToCode

Commissionable

Salesperson1

1

21971

20THC

 

TRUE

PrI

2

9538

20THC

 

TRUE

PrI

3

22

20THC

 

TRUE

AA1

1

21972

212

 

TRUE

SCS

2

9539

212

 

TRUE

SCS

3

23

212

 

TRUE

SCS

1

21973

280T

 

TRUE

TSW

2

9540

280T

 

TRUE

TSW

3

24

280T

 

TRUE

TSW

So it’s easy to see here that what we want to delete are any records where the RowNumber is > 1.

DELETE CommissionSalespersonDefaults

FROM CommissionSalespersonDefaults

INNER JOIN (

  SELECT *

  , ROW_NUMBER()

    OVER (

            PARTITION BY CustomerCode, ISNULL(ShipToCode, )

            ORDER BY CommissionSalespersonDefaultsID DESC

          ) AS RowNumber

  FROM CommissionSalespersonDefaults

) Numbered ON CommissionSalespersonDefaults.CommissionSalespersonDefaultsID = Numbered.CommissionSalespersonDefaultsID

WHERE RowNumber > 1

Now I have a table containing only the most recently imported records.

 

Security Update MS14-066 causes major performance problems in Microsoft Access / SQL Server applications

http://www.microsoft.com/en-us/download/details.aspx?id=44618

This week Microsoft released a number of security updates this week to patch an issue with schannel as described in this article:  When the update is installed to a server running Microsoft SQL Server (So far, confirmed as issue with SQL Server 2008 R2, SQL Server 2012, SQL Server 2014) client applications that access the database via ODBC such as Microsoft Access clients pointing to SQL Tables encounter a major performance hit.

https://technet.microsoft.com/library/security/MS14-066

Our customers are reporting that this security update causes MAJOR performance problems in any Microsoft Access application with a SQL Server backend (any version).  For example, a simple operation such as clicking from one line of an order to another (without performing ANY data updates) can take from 5 to 15 seconds!  For users having to update hundreds of lines of orders, the application becomes nearly unusable – an activity that used to take 5 minutes could take hours.to complete.

Please, if you have not installed this update yet – DO NOT INSTALL IT to the SQL Server machine (it can be installed to clients or other servers).

If you have installed the update and are experiencing this issue, please remove the following specific update from the computer running Microsoft SQL Server to get your system back to performing normally:

Click Start, then type: “Update”, click “View installed updates”

clip_image002

In the list of updates scroll down until you find the list of updates installed recently (your exact date may differ).  Select “Security Update for Microsoft Windows (KB2992611)” and click Uninstall.  After a reboot application performance restores to normal.

image

As of November 13th at 11:49 AM we know that if you select each one of these under this group, and uninstall, then reboot that performance returns to normal.

KB3010788, KB3008627, KB3006226, KB3005607, KB3003743, KB3003057, KB3002885, KB2993958, KB2992611, KB2991963, KB2978120

Update: as of 2014-11-13 3:20PM our most recent test looks like it may only be KB2992611 as the root cause of this performance problem.  The client machine does not appear to have to have the update removed.

Update: as of 2014-11-13 5:00PM we have a case open with Microsoft to figure out the underlying performance problem.  Obviously we want our customers to be able to install security updates, but it can’t be at the expense of being able to use the software that runs your company.  I’ll post additional updates when we hear back from the Windows Team.

Update: as of 2014-11-14 1:30PM: Update from Microsoft on our open case: The SQL Team is working directly with the Windows team and have been able to reproduce performance issues.  They’ve created a specific tool to gather performance stats related to the issue and are working with one of my techs to gather the stats in our lab environment with both the patch installed and with it removed.

Update as of 2014-11-17 2:00 PM: Microsoft has completed data capture of several traces of client to server communication with the patch applied and removed.  Status: Ball in Microsoft’s court.  Waiting on analysis.

Update: Per the user comments below, this performance issue may affect any client (not just MSAccess clients) that happen to use the built-into-Windows SQL Server Driver: 

image

Put differently, you may be affected if your connection string looks like this:

Driver={SQL Server};Server=ComputerNameRunningSQL;Database=SQLDBName;Uid=SQLAuthUser;
Pwd=SQLAuthPass;

Or like this:

Driver={SQL Server};Server=ComputerNameRunningSQL;Database=SQLDBName;
Trusted_Connection=Yes;

Update: 2014-11-28 1PM – Just received this notification e-mail from Microsoft:

The following bulletins have undergone a major revision increment.

* MS14-066 – Critical

Bulletin Information:

=====================

MS14-066 – Critical

https://technet.microsoft.com/library/security/ms14-066

– Reason for Revision: V2.0 (November 18, 2014): Bulletin revised to announce the reoffering of the 2992611 update to systems running Windows Server 2008 R2 and Windows Server 2012. The reoffering addresses known issues that a small number of customers experienced with the new TLS cipher suites that were included in the original release. Customers running Windows Server 2008 R2 or Windows Server 2012 who installed the 2992611 update prior to the November 18 reoffering should reapply the update. See Microsoft Knowledge Base Article 2992611 for more information.

– Originally posted: November 11, 2014
– Updated: November 18, 2014
– Bulletin Severity Rating: Critical
– Version: 2.0

We have not tested this yet, but will shortly. 

UPDATE: 2014-11-18 1:50PM: Part 2 of the Rev 2 patch worked!

In my example, I went back to the URL: https://technet.microsoft.com/library/security/ms14-068, selected the Windows Server 2008 R2 patch (for the test machine I was using this time I needed that one), then when I clicked download I now see a second option:
 image

Windows6.1-KB3018238-x64.msu

On installing that 2nd file listed the problem was resolved.  Performance is back to normal for this particular Windows Server 2008 R2 server with SQL installed!

UPDATE: 2014-12-01: Windows 7 SP1 No patch available.

If you are running SQL Server on your laptop for example to demo your application or as a developer we’ve discovered that there is no KB3018238 available.  Attempting to install that KB on Windows 7 simply results in an error: The update is not applicable to your computer:

image

I’ve contacted Microsoft under my original case on this issue. Their reply so far: “KB3018238 is not available in Windows 7.” – Yes, that would be the point of my call…

So for those of you who do development on Windows 7, or those of you who are salespeople with copies of your company’s ERP database installed locally are in the same situation – either do not install KB2992611 and have a working application, or do not install it, have a working application but be at risk.