Migration of Modern Layout Between Multiple Tenant

if this might help anyone on the “Get a site provisioned using the ‘classic’ sites method – SharePoint Admin Centre, Site Collections, New Private Site – but using the Office 365 Group team site (with modern UI home page) as the template”, type angle …

How to save the team site of an Office 365 Group (Unified Group) as a template, and create sites via the “classic” provisioning process from that template


Create a Unified Group with associated team site.  This team site will be used as the source for the site template.

Navigate to team site, Site Settings (Site information, View all site settings), notice Save site as template is missing.

Notice that appending _layouts/savetmpl.aspx to the URL doesn’t work, you get “Sorry, you don’t have access to this page”.

This is due to scripting being disabled in the Unified Group team site, which over-rides the SharePoint Admin Centre, Settings, Custom Script, configuration.

To enable the scripting for the site, per this article, …




… run the following PowerShell …


# Import general SPO module and connect

Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking

Connect-SPOService -Url https://yourname-admin.sharepoint.com/


Set-SPOsite “https://yourname.sharepoint.com/sites/yoursite” -DenyAddAndCustomizePages 0


Return to the Unified Group team site, Site Settings, notice Save site as template is now available.

Click Save as a template and save the site as a template.

Go to Site Settings (Site information, View all site settings), Web Designer Galleries, Solutions.

Notice the site template you just saved, click the file, Save the .wsp file locally.

Go to SharePoint Admin Centre, site collections, New, Private Site Collection, and create a site collection using Custom, <Select template later… > .

Go to the home page of the new site collection, in the Template Selection choose Solution Gallery.

In the Solution Gallery click Upload Solution, browse locally and select the .wsp file you just downloaded.

Click Activate to activate the template solution.

Return to the home page of the new site collection, the Template Selection is displayed again.

Select Custom, then your template you just uploaded.

Use the default SP groups for the site’s groups setup.


So this new site collection has the following properties: –


  1. The home page is a genuine Unified Group team site home page, because it is based on a template that was a Unified Group team site.
  2. The site collection appears in SharePoint Admin, Settings, site collections, because it was provisioned using the “classic” site collection provisioning process.
  3. None of the steps performed are “unsupported” by Microsoft.       There was no “copy-and-paste” of the _layouts/savetmpl.aspx URL (as, for example, can be performed to save Publishing Sites as a template and thereby render them unsupported by Microsoft). Microsoft technical support confirmed this.
  4. The site is linked into the Unified Group that is associated with the source site of the template. Clicking on “Group Conversations” on the home page of the newly created site takes you into Outlook positioned on the Unified Group associated with the source of the template. So now instead of a 1-to-1 relationship between the Unified Group and the Site, it is 1-to-many.
  5. If you create sub-sites using the template, in either the source site or any site created from the template, these behave similarly i.e. all have the relevant properties 1, 3-4 above.


All References







AWS .NET SDK Jump start

Last week was a bit easy iin terms of workloads so I thought i should clean up the mess which is created by all developers in AWS universe. there were hundreds of EC2 instances without any information of cost center. i m an old school developer who only knows .net. everything else is an alien manuscript. after wasting few hours I realized to stick in my court. so i created a .net application to add custom tags to all resources

well you need to download .net SDK 3.0 first and then a sample AWS program.

private static void ApplyTags(AmazonEC2Client ec2Client) {
 DescribeInstancesResponse allinstances = ec2Client.DescribeInstances();
 //List<Reservation> res = allinstances.Reservation;
 string instanceId = string.Empty;
 foreach(Reservation res in allinstances.Reservations) {
   instanceId = res.Instances[0].InstanceId;
   Instance ins = res.Instances[0];
   Amazon.EC2.Model.Tag tag = ins.Tags.Find(t => t.Key == "cc");

   if (tag != null) {
    Console.WriteLine("Tag is " + ins.InstanceId + "   " + tag.Value);
    var response = ec2Client.DescribeVolumes(new DescribeVolumesRequest {
     Filters = new List < Amazon.EC2.Model.Filter > {
      new Amazon.EC2.Model.Filter {
       Name = "attachment.instance-id", Values = new List < string > {
    }); //, new Amazon.EC2.Model.Filter { Name = "attachment.delete-on-termination", Values = new List<string> { "false" } }
    List < Volume > volumes = response.Volumes;
    foreach(Volume vol in volumes) {
     var volTag = vol.Tags.Find(x => x.Key == "cc");
     if (volTag == null) {
      ec2Client.CreateTags(new CreateTagsRequest {
       Resources = new List < string > {
        Tags = new List < Amazon.EC2.Model.Tag > {
         new Amazon.EC2.Model.Tag {
          Key = tag.Key, Value = tag.Value

     var snapshotresponse = ec2Client.DescribeSnapshots(new DescribeSnapshotsRequest {
      Filters = new List < Amazon.EC2.Model.Filter > {
       new Amazon.EC2.Model.Filter {
        Name = "volume-id", Values = new List < string > {
     List < Snapshot > snapshots = snapshotresponse.Snapshots;
     foreach(Snapshot item in snapshots) {
      var snaptag = item.Tags.Find(x => x.Key == "cc");
      if (snaptag == null) {
       CreateTagsResponse crtags = ec2Client.CreateTags(new CreateTagsRequest {
        Resources = new List < string > {
         Tags = new List < Amazon.EC2.Model.Tag > {
          new Amazon.EC2.Model.Tag {
           Key = tag.Key, Value = tag.Value


    var networkresponse = ec2Client.DescribeNetworkInterfaces(new DescribeNetworkInterfacesRequest {
     Filters = new List < Amazon.EC2.Model.Filter > {
      new Amazon.EC2.Model.Filter {
       Name = "attachment.instance-id", Values = new List < string > {
      new Amazon.EC2.Model.Filter {
       Name = "attachment.delete-on-termination", Values = new List < string > {
    List < Amazon.EC2.Model.NetworkInterface > lans = networkresponse.NetworkInterfaces;
    foreach(Amazon.EC2.Model.NetworkInterface lan in lans) {
     var volTag = lan.TagSet.Find(x => x.Key == "cc");
     if (volTag == null) {
      ec2Client.CreateTags(new CreateTagsRequest {
       Resources = new List < string > {
        Tags = new List < Amazon.EC2.Model.Tag > {
         new Amazon.EC2.Model.Tag {
          Key = tag.Key, Value = tag.Value


  //for (int i=0; i<= InstanceState.)
  //Console.WriteLine("Launch Instance {0}", instanceId);

on similar pattern i wrote more code to get rid of old images, AMI and rest of the junks.

Login failed for user Administrator. Reason: Could not find a login matching the name provided. [CLIENT: ]

Spent last few hours in order to fix a sql server. The story is that we took an image of an existing server and made it work within another domain, by changing the server name and it’s domain we put that server in to a great trouble.

I was unable to login by any means to I decided to play and fix it before rebuilding a server from scratch after few searching a did following

Consider my server is only set up for windows authentications another twist in the menu

  • Stop SQL server from services
  • net start mssqlserver /c /m /t3604
  • it will put sql server in a kind of confusing state and service will show as starting but good to go
  • run SQLCMD with –E which is SQLCMD –E
  • now you are in sql server
  • CREATE LOGIN recovery WITH PASSWORD = ‘TopSecret 1’
  • Go
  • sp_addsrvrolemember ‘recovery’, ‘sysadmin’
  • Go
  • Once done go to registry by Regedit and find following key
  • “LoginMode”=dword:00000002 originally it should be 1 if it’s windows login otherwise it’s fine. I change it from 1 to 2
  • Kill SQL server process and restart SQL server services again
  • Boom login with SQL auth with give username and password with new hostname
  • Print current SQL server name print @@servername
  • sp_dropserver oldname;
  • GO
  • sp_addserver newname, local;
  • GO


Based on you requirement you can change the security mode again otherwise keep it

The remote computer that you are trying to connect to requires Network Level Authentication (NLA), but your Windows domain controller cannot be contacted to perform NLA. If you are an administrator on the remote computer, you can disable NLA by using the options on the Remote tab of the System Properties dialogue box

Recently spent few hours on the subjected issues

so far able to login with local user, no other local or domain user is able to access the server, machine is currently in AWS so don’t have any other option to access the server.

one in the server try to get power-shell script for msdn code gallery


Running the functions

First import the functions using the Dot Sourcing method

. .\Get-Set-NetworkLevelAuthentication.ps1

Use the function Get-NetworkLevelAuthentication to retrieve the current setting.


Use the function Set-NetworkLevelAuthentication to change the NLA setting

Set-NetworkLevelAuthentication -EnableNLA $true

details can be obtained from 

Developers Habits

Few years ago I had a discussion about developers habits and shared some notes with previous employer and colleagues. You can disagree with my finding but this is what I face every day it’s my bread and butter.

Developers are complacent:

The true nature of developers are very complacent they really don’t want to break the comfort zone. They do what they love to do but people are running software as business so they cannot afford it. Solution is simple challenge them every day. Ensure they are in an unrest state not by workload but by challenging them;

You code is your masterpiece not a secret.

Most of the developer protect their code as a secret, they just code without any comments, pseudo or instructions which always result in failure. Ideally I would say always write what you are doing so when you pull the plug someone could take care of your problems.

Even cobblers needs to mend their shoes.

Most of the programmers like me just code and forget, I personally believe that refactoring is the only way of survival of any project. Yes I agree we don’t have time and we will never have time unless we consider it as priority.

Code is self-explanatory.

Recently spend a huge amount of the time in identifying reported issues by clients but they turn out to be business rules. In most of the cases, project engage during lifecycle of development normally relocate after go-live live or completion leaving no traces behind, an ideal approach is to retain the key project people for some time for quick resolution but if that is not possible due to financial constraint, ensure that people are actually putting comments around their code so that others could understand.

Stress is the key to success not the quality.

Development is a creative activity like painting or any other thing, there is always is a difference between free range eggs and farm egg, as a development remember they difference of natural thought process and enforced ideas. Stay relax and keep producing good work.

Don’t code if you don’t know how to

Experiments are good but not in development. If you are not creative thinker or an artist try something else. Programming is a delicate combination of creativity and business. Don’t try to behave like programmers if you don’t have temperament to do it. It is a profession and skill that can be learnt but at the same time it is an art, which cannot be taught.

Spend time on pseudo

don’t ever consider yourself a the one who can perceive an end to end scenario while writing code.

Revisit your thoughts but don’t rewrite your code

Developers are welcomed to refactor the code but not to rewrite everything from scratch I have seen such examples a lot people just comment out everything and start again which is really a problem especially when you are billed on hourly basis.






Kentico 8.0:

just came across this error due to some reason but i couldn’t figure out for couple of hours. i think the error is related to page corruption between database indexes and actual file index.

Delete exiting search index from admin screen and try to create new one based on pages.


  1. Open the Smart search application.
  2. Click New index.
  3. Fill in the index properties. Most importantly, you need to select the:
    • Index type – determines what type of content the search index stores
    • Analyzer type – determines how the index breaks text into searchable tokens

CRM 2016 IFD Integration with BizTalk 2013 R2

Spent some time recently in configuration of a magical send port which should be able to communicate with biztalk took some time of mine but at the end of the managed it.

Add following segments in machine configs, i had multiple version of framework so to avoid any confusion i changed all config files.

<?xml version="1.0" encoding="UTF-8"?>
         <clear />
         <binding name="stsBinding">
            <security mode="TransportWithMessageCredential">
               <transport clientCredentialType="None" />
               <message clientCredentialType="UserName" establishSecurityContext="false" />


<?xml version="1.0" encoding="UTF-8"?>
<BtsActionMapping xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Operation Name="Create" Action="http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Create" />
   <Operation Name="Retrieve" Action="http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Retrieve" />
   <Operation Name="Update" Action="http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Update" />
   <Operation Name="Delete" Action="http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Delete" />
   <Operation Name="Execute" Action="http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute" />
   <Operation Name="Associate" Action="http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Associate" />
   <Operation Name="Disassociate" Action="http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Disassociate" />
   <Operation Name="RetrieveMultiple" Action="http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/RetrieveMultiple" />

dont forget to increase the pool sizes


<message establishSecurityContext=”false”>