Only a few more days until Skype for Business Server 2015 is here! We’re eagerly prepping a virtual server for testing.
Is anyone seeing Skype for Business Online in their Office 365 accounts yet? If so, please comment or email. I’d like to hear your thoughts on the transition experience.
In the meantime, we have another troubleshooting post for today. This one’s on PowerShell – or more specifically, Lync Server Management Shell.
NOTE: Today’s issue took place on Windows Server 2012 R2. You’ll see why that’s important in a moment.
While working on a client’s Lync Server Front End, Larry kept noticing that he would load the Lync Server Management Shellâ€¦but he didn’t receive a command prompt. Only an empty black window would pop up.
Removing & recreating the shortcut didn’t help. Larry confirmed that the Management Shell and Control Panel showed no errors. What was causing this?
Discussion amongst the Lync team found none of us had encountered this before. To the search engines!
The Culprit: The Shortcut Target String
Microsoft Support Forums didn’t yield an answer in the first couple searches. But they did lead us to a fellow IT consultant’s blog, over in the UK:
Lync 2013 Powershell â€“ Blank Screen: MSV Blog
Matt posted about the very same PowerShell error last year. Interestingly, he notes that he didn’t get a Management Shell prompt “from time to time.” It would seem that this error is sometimes “overcome” by the OS, allowing it to run PowerShell properly.
That suggests the problem isn’t with PowerShell itself, but with something calling it. And indeed, that’s what Matt discovered. His Lync Server Management Shell shortcut target was missing something:
powershell.exe -noexit -command â€œcd $env:UserProfile; Import-Module â€˜C:\Program Files\Common Files\Microsoft Lync Server 2013\Modules\Lync\Lync.psd1â€²
Can you spot it? Look at the end of the string. A single quotation markâ€¦but no closing quote for the one before “cd $env:UserProfile”.
We checked the client’s Windows Server again. Sure enough, its Management Shell shortcut didn’t have a closing quote either.
We added the quote back into the Management Shell shortcut, like so:
powershell.exe -noexit -command â€œcd $env:UserProfile; Import-Module â€˜C:\Program Files\Common Files\Microsoft Lync Server 2013\Modules\Lync\Lync.psd1â€²â€
Then unpinned the shortcut from the taskbar & repinned. Poof, PowerShell came right up.
Kudos to Matt for his sharp eyes! Please visit his blog for more detail on this error & many other Microsoft-related troubleshooting posts.
Where Does This Bug Come From?
Matt believes this is a Windows Server 2012 R2 bug, as it didn’t occur consistently among his Lync Server2013 installations. I’m inclined to agree, though I can’t fully dismiss a Lync Server bug, for one reason. PowerShell is not limited to Lync Server, but it’s the Lync Server Management Shell shortcut which “hosts” the bug.
Either way, it was likely introduced by a recent Microsoft Update. Since Matt’s post is dated March 2014, it could be this Windows Server 2012 R2 Update: https://support.microsoft.com/en-us/kb/2928678
Or one of the packages in this Lync Server 2013 Update: https://support.microsoft.com/en-us/kb/2863908
We’re not 100% sure. But the important thing is, if you keep your Windows Servers up-to-date (which you should always do), you may encounter this error with PowerShell.
And thanks to Matt, we have a quick solution.
As we saw with last week’s Skype4B UI post, PowerShell continues its importance in the next version of Lync. Have you experienced a PowerShell error? If so, please comment or email with the details.
(P.S. – A couple people commented that they could not find the “EnableSkypeUI” parameter! Here’s a post to help you out, courtesy of Blog.Kloud.com.au: EnableSkypeUI Where Art Thou? – Kloud)