New-CsOnlineSession returns (404) Not Found

For some time ago I was in the process of setting up a Hybrid “Skype for Business Online” and “Lync 2013 On-oprem” environment.
When it was time to activate the Lync-federation with the New-CsOnlineSession cmdlet I got rejected with a (404) Not Found

I received the following output:

VERBOSE: Determining domain to admin
VERBOSE: AdminDomain = ‘domain.onmicrosoft.com’
VERBOSE: Discovering PowerShell endpoint URI

Get-CsPowerShellEndpoint : The remote server returned an error: (404) Not Found.
At C:\Program Files\Common Files\Skype for Business Online\Modules\SkypeOnlineConnector\SkypeOnlineConnectorStartup.psm1:94 char:26
+ $targetUri = Get-CsPowerShellEndpoint -TargetDomain $adminDomain
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-CsPowerShellEndpoint], WebException
+ FullyQualifiedErrorId : System.Net.WebException,Microsoft.Rtc.Management.OnlineConnector.GetPowerShellEndpointCmdlet

The solution to this wasn’t easy to find since 404 usually means network issues.
The Office 365 support was very help full and we discovered after a few hours that the Skype for Busniess Online tenant wasn’t “Active”.
So the solution was to give a user, any user, a license for Skype for Business so that users shows up in the Skype for Business admin portal.

Monitor IIS Performance Data with Nagios / NSClient

I’ve been working on a script for our customers so we more accurately can measure the load on IIS Websites using Nagios.
Currently the script only gets the performance data and outputs an OK (exitcode 0). In the future I will implementĀ  WARNING and CRITICAL the performance values we need.

Example graph from a labserver.
IIS:Performance Check

Feel free to use and modify this script as you like.
Continue reading