Freshly installed K2 – unable to access K2 workspace with HTTP Error 401.2

I’ve recently did some quick and dirty installation of K2 4.6.11 on Server 2008 (non R2) hence all you have there is PoSh 2.0 it is not possible to use amazing K2Field.PreReq script to take care about all the prerequisites (it will work for server 2012-2016). So I just went ahead and tried to satisfy complaints from K2 blakcpearl setup manager as I go adding IIS along with KB980368 as indicated by Setup Manager. Alas after installing I was not able to access K2 Workspace with the following error:

“You are not authorized to view this page due to invalid authentication headers.” Why? Quick check of K2 Workspace site authentication showed that Windows Authentication is missing, while according to K2 documentation (sourceK2 Workspace does not function if IIS is not configured correctly. Configure the IIS application pool Managed Pipeline mode setting to Classic and ensure that:  

  • Windows Authentication is enabled
  • Anonymous authentication is disabled

So I just went ahead and added Windows Authentication role service and all started work correctly after this. It tells us that: A) K2 setup manager created site config file correctly specifying required authentication method, it just was not installed/available B) Not sure why K2 Setup Manager does not have built-in check to flag this at the installation stage. C) Read up documentation carefully, in this case this page.

Facebooktwittergoogle_plusredditpinterestlinkedinmail

How to: enable Document Set in Document Library

I just recently bumped in into this thing – you have to enable Document Sets on a library level before you can actually use it. This little point baffled me a bit when I tried to use Create Document Set SmartWizard in K2 Studio:

It took me a while to switch over too my SharePoint document library to realize that I just can’t create document set there:

Normally the same New Document menu contains an option to create Document Set. Well now it’s clear that “Required field is empty” error is just a clumsy way employed by K2 Studio to tell you that Document Sets disabled for your library.

To enable them you just go to Library Settings > Advanced Settings > Allow management of content types as on screenshots below.

Click on Library Settings button on ribbon:

Click on Advanced Settings:

In advanced settings select Yes for Allow management of content types and hit OK:

Now you also need add Document Set content type using Add from existing site content types link in library settings:

At this point you should be able create document sets in SharePoint just fine:

Yet you still going to have problem with K2 SmarWizard I mentioned initially. Why? Just go to K2 App settings for your library to see the answer:

Just click on Regenerate SmartObjects, go back to K2 Studio and Create Document Set SmartWizard to see things working there:

Voila, we can now see our Document Set enabled library and use SmartWizard to create document sets in it.

Just to recap: To be able to create document sets within SharePoint libraries you have to Allow management of content types in Advanced Settings of this library and add Document Site content type using “Add from existing site content types” link in library settings.

Facebooktwittergoogle_plusredditpinterestlinkedinmail

How to: control Fast Startup setting via registry

If you navigate to Control Panel > All Control Panel Items > Power Options > System Settings you can find GUI option to disable/enable so called Fast Startup option (formerly known as Fast Boot):

This is sort of light-weight/hybrid hibernation mode – with this option enabled on shut down system log offs all users and closes programs yet leaves Windows kernel loaded and system session running, next it notifies drivers (those which have support for this) to prepare for hibernation and saves this system state into hibernation file. This allows for faster boot by means of loading this state into RAM on startup (you can read up more on this here).

Anyhow I just wanted to take a note of corresponding registry key which enables/disables this setting – this is registry key named HiberbootEnabled which can be found under HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power.

This is especially important as there is no GPO to control this feature, so you can use some scripting to control/verify state of this setting via registry key.

And in case you need to check for supported sleep states on your system (including Fast Startup) you can leverage  powercfg /a command.

Facebooktwittergoogle_plusredditpinterestlinkedinmail

CBT Nuggets Microsoft Windows Server 2012 70-410 with R2 Updates

I’m currently doing a bit of revision of 70-410 content going through “Microsoft Windows Server 2012 70-410 with R2 Updates” training by Garth Schulte. First of all I already passed 70-410 exam and did 70-410 course by James Conrad, but just to take a break before 70-411 I decided to review 70-410 content + go through 70-698 CBT Nuggets course and take an exams on Windows 10 (yes it counts as a pouse before 70-411).

Few words about updated 70-410 training by Garth. First of all it is fully designed with R2 in mind (James Conrad’s course was pre-R2 + some R2 modules added later) so you can’t find there gotchas and detours related with hiccups related with recent release of a product, instead as it covers stable and current release you will find there well structured up-to-date content and as one expect from Garth well covered PowerShell side 🙂 I also like very good slides summarizing key facts you have to memorize before exam – they provide you with compressed knowledge (I guess I stole getAbsract slogan here 🙂 ) you need before taking your exam. Some examples:

Those slides are just great to review before exam (so it could be a good idea to save some screenshots as you go through the course).

Good job Gath 🙂 Once I done with this training and my Win 10 exam I will be focusing on 70-411. And I’m just wondering how do I inject TCF exam and preparation for it in my schedule…

Facebooktwittergoogle_plusredditpinterestlinkedinmail

PS script to get SQL version from BAK file

Quite unpleasant thing about MS SQL Server database backup files it that you can’t restore them on an older version of SQL Server (it seems that even if you really want to create such BAK file it is not possible), moreover this is valid not only for major versions but also for things like R2, meaning you can’t restore BAK file created in SQL Server 2008 R2 on SQL Server 2008 Server (non-R2).

Just to save my time trying to restore BAK files against wrong versions of SQL Server I created this script which allows you to retrieve SQL version from BAK file headers and compare it with your server SQL version. Specify path to your BAK file and check the output – if BAK file SQL version is newer that your server version then BAK file can’t be restored on this server. Sample script output can be found below:

It tells you that backup was taken on SQL Server 2012 SP3, while you run SQL Server 2012 SP2. Once you install SP3 for SQL Server script output will change to this:

Once two numbers match you are ready for backup restore 🙂

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Unable to start SSRS sevice after upgrading SQL Server instance

I recently spent quite a few time trying to figure out why my SSRS service fails to start after performing upgrade from SQL Server 2012 to SQL Server 2016. Service was failing to start with quite generic error “System error 5 has occurred. Access is denied” which is a bit to broad, but after a while I looked into instance bin directory which contains log file where I seen some error indicating that configuration file is garbled somehow. At this point I revert to reinstall once again solution, and this time I noticed warning which I probably missed during initial instance upgrade attempt:

TITLE: Microsoft SQL Server 2016 Setup
——————————

The following error has occurred:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=13.0.1711.0&EvtType=0x35C10BED%25400xF538E98B

I proceed with upgrade I seen exactly the same problem – I can’t start SSRS service after upgrade completion. This warning essentially lead me to the thread on TechNet containing right solution. It seems that upgrade process somehow can’t handle SSL bindings for SSRS service or handles them differently (produces malformed XML configuration for them?) and what you need to do is remove SSL bindings for SSRS in Reporting Services Configuration Manager (see screenshot below).

Just to save some time which may be wasted on troubleshooting just remove your SSL bindings (I did it for Web Service URL & Web Portal URL) before starting upgade of your instance. You may add these bindings back after upgrade.

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Installing Exchange 2016

I’ve finally found some time to install Exchange 2016 in my test environment. This thing has been on my to do list for a long time, and recently Nicolas Prigent wrote a blog post at StarWind blog on exactly this subject – Installing Exchange Server 2016 on Windows Server 2016, leaving me no excuses for not completing task from my to do list anymore 🙂

So essentially instructions provided in the abovementioned blog post were sufficient for me for getting Exchange Server 2016 up and running in my test environments. Installation process itself is a bit lengthy and before that you have to take care of prerequisites as well as prepare your AD DS schema. With these preliminary parts I had couple of issues which I will mention below.

First of all you have to have the following update for Windows Server 2016 – KB3206632 which is available for download in Microsoft Update Catalog. When I installed this update on my Hyper-V VM with Windows Server 2016 I had an issue on reboot stage – system sort of went into applying updates and restart but then stuck with empty blue background. After waiting for about 8 hours (I just left box running during the night) I just powered off VM and switched it on again – update was applied successfully after this.

Next part is AD DS schema modifications you need to make before installing Exchange by issuing the following commands one after another (strictly in order specified):

I run into issues with steps 1 and 2. Step 1 failed with on Extending Active Directory schema with the following error:

There was an error while running ‘ldifde.exe’ to import the schema file

‘C:\Windows\Temp\ExchangeSetup\Setup\Data\PostWindows2003_schema0.ldf’ The error code is: 8224.

To solve this I just attached installation ISO to one of my DCs and run it there – operation completed without errors.

Next issue happened on step 2:

An Active Directory 0x51 occurred when trying to check the suitability of server. Error: ‘ActiveDirectory response: The LDAP server is unavailable.’

In this case re-running the same command from DC didn’t helped and what actually helped is moving schema master role from one DC to another. If you are a bit rusty on how to do this – see this blog post.

So thanks to Nicolas’ post I now have Exchange 2016 in my test environment, and I already reconfigured my K2 farm (yes I run 4.7 + Feb 2017 CU) to enable Exchange Server integration:

Facebooktwittergoogle_plusredditpinterestlinkedinmail

How to force AD DS replication

Just a quick note on how you can force AD DS replication. You ca do this issuing the following command:

To decipher parameters: /A(ll partitions) P(ush) e(nterprise, cross sites) d(istinguished names). Essentially with this command you can do the same as Replmon used to do in Windows 2003 but in in one step. Don’t forget to replace DC_NAME with name of one of your domain controllers. Of course there are other methods to do that, including using Active Directory Sites and Services console (dssite.msc) like that (from/to selected DC):

Or like that:

When to use? When you made some changes in AD DS partitions and don’t want to wait or when you want to have a quick test of AD DS replication.

Facebooktwittergoogle_plusredditpinterestlinkedinmail

How to get Exchange Web Services (EWS) URL – Exchange 2013

Just a short note on how to get Exchange Web Service (EWS) URL when “ask your Exchange administrator” is not an option 🙂

Method 1 – execute the following command in Exchange Management Shell:

Method 2 – Using “Test E-mail Auto Configuration” which available in Outlook client starting from Outlook 2007. Just right click on Outlook icon in tray holding Ctrl key and select “Test E-mail Auto Configuration” option, type in email address hosted on your Exchange server and Click “Test” – once you get output check “Availability Service URL” value – it contains you Exchange Server EWS URL.

Facebooktwittergoogle_plusredditpinterestlinkedinmail

How to install and manage Nano Server

My 2nd article about new Windows Server 2016 installation option “Nano Server” is now available @StarWind Blog. In my previous article, I covered general concepts around Nano Server, in this one I talk about more practical aspects: installation and management. At the end of the day, you would agree that the best way to learn new technology it is try to use it – this way you will be exposed to its strengths and weaknesses directly, and can get real understanding of whether it works for you or not. Though at this point even Microsoft admits that despite all its greatness, at the moment, Nano Server has quite limited utility as it supports only a small subset of roles and features out of those which you can find in full GUI version of Windows Server.

Read more @StarWind Blog…

Facebooktwittergoogle_plusredditpinterestlinkedinmail