SharePoint Site restore error duplicate site found with name already exists

When trying to restore a site down to a test server for developers to work with the other day I got a big red error in PowerShell that said the site was already created in SharePoint in another place. I retried the restore a couple of different ways, but I kept getting the error:

Duplicate site found with name already exists

To prove this, open up SSMS on your SharePoint box and select the content database with the site in it you are trying to restore.

Run this SQL query against the content database:

SELECT

   CONCAT([DirName], N’/’, [LeafName]) AS [FullRelativePath],

   LEN(CONCAT([DirName], N’/’, [LeafName])) AS [Length]

    FROM

   [dbo].[AllDocs]

    ORDER BY

    [Length] DESC

If any of your results come back larger than 256 value, that’s the issue. You need to go into the SharePoint site and either delete the offending content or rename it with a smaller shorter file name below the 256 character limit.

Once this is done, you should be able to take a backup from one farm and restore it to your dev farm onto another separate content database.

This is one way we handle restoring dev sites in multiple places that might have the same name previously in another place. I just make sure to use something like : $a = Get-SPSite -id blah blah

Then $Uri = New-Object System.Uri(“https://newsitename.domain.com”)

Than after that use $a.Rename($Uri)

This way multiple devs could work on projects for the same site and not work on top of each other.

Hope this helps anyone that runs into a similar issue on a SharePoint restore.

Thanks,

BJ

Passing the AZ-900 exam

Today I wanted to share that I took and passed the AZ-900 certification exam. The test was something I had wanted to start looking at for a while and really helped give me a good start to learn the basics of the services and products that are offered by Azure. Plus it gives a good overview if you are new to cloud concepts in general that someone could build on and use in many different paths.

If you saw my previous post on taking and passing the MS-900 test, you can find that one here:

https://bjfentress.wordpress.com/2020/01/14/passing-the-ms-900-exam/

My prep for this particular exam was very similar to the MS-900 is the main reason I wanted to mention it here.  The link to the MS Learn course is here and was my main focus of study here:

https://docs.microsoft.com/en-us/learn/paths/azure-fundamentals/

Another great resource I used for my time to study was the exam prep guide offered by @Microsoft365Pro here:

For this site, I think he goes into a bit better deeper dive on certain topics that the MS Learn site does, so I enjoyed reviewing this site several times before I went to take the exam.

At this time (February 2020) I didn’t really find good content on PluralSight to prepare for this particular exam. I hope some good video content gets added soon for this test.

However, I was able to find a new series from @TechTrainerTim on his YouTube channel that can be found here:

https://www.youtube.com/channel/UCim7PFtynyPuzMHtbNyYOXA/featured

Tim is actually doing a video on each area of the study guide which I think is a great idea and look forward to it even though I have already passed.

One final reference I looked at during my prep time was from Vlad Cantrinescu. The link to his prep guide can be found here:

AZ-900 Study Guide: Microsoft Azure Fundamentals

For this exam I started strong in my studying and then took a break in the middle of the month due to working more during the evening, but then about a week before the exam reviewed as much content and I could before taking the test.

I hope this helps anyone trying to prepare for the test as well. Let me know in the comments below anything that helped with your studying for this exam.

Thanks!

-BJ

SQL Saturday Nashville 2020

This past Saturday I had the opportunity to attend another great day of training provided by the great folks who are a part of the Nashville SQL Server User group as SQL Saturday Nashville 2020.

This was the 9th year in a row for the group to put on the event and this year the event was actually held outside of Nashville on the campus of Middle Tennessee State University in the Business and Aerospace building.

It was a great event location spread across multiple floors and had a great layout for being able to find the right session that you were supposed to go to.

The list of sessions for the event can be found here:

https://www.sqlsaturday.com/933/Sessions/Schedule.aspx

The sessions I attended were:

Do Your Part – Be Security Smart

Given by Julie Mclain-Harper

@GoddessofDB on twitter

Speaker said SQL Sat Cincinnati registration ends this month for event later this year

Secure your db accounts

TDE demo

When you install an instance 4 DB’s get created and sa is owner or the person who creates them

You can disable sa to have the ability to login, but still keep ownership of the db

If you rename sa it will cause running jobs to fail

Have separate service accounts per instance? Good for multiple instances per server

You can grant users the ability to execute as the owner

Dynamic Data Masking creates ability for no users to tell data exists, but they cannot view the actual data (ie. Personal info)

TDE encrypts data at rest, only works in enterprise edition

Has a good step by step demo of TDE on her slides/website

DBATools.io has a new function to rotate certs for you

Intro to GitHub

Given by Joshua Higginbotham

Git has many flavors but in the end, git is git

Usable in AzureDevops, Gitlab, bitbucket

@codenameSQL

Jhiggin/codenamesql

In order to set up a remote environment, do your research

Start with an org, sets up with a company, not an individual

Project Licensing (most common is MIT)

First setups have markdown files to describe what the project is about

Securing the project – protected branches, code owner level access

Dependabot new in product that scans for dependency vulnerabilities

.gitignore file? Used to help overlook certain things when publishing

Fork – make copy of a repository. This is done when changing someone else’s project

Git Clone – creates a repository on the local system and syncs between the remote and local locations

Git Init – intializes an existing dir as a repository

Working States: Untracked, Unmodified (staging), Modified, Committed

Branching , needs a good strategy

Supposed to live only a couple of days

Tutorials https://lab.github.com

Learn GitHub branching https://learngitbranching.is.org

GitHub cheat sheet

GitHub help permissions

Cassidy Williams look up on GitHub

Check for verified pull requests

AzureDevOps has a bit more granular ability to approve based on files and others

The Future is Here for Containers

Given by Marsha Pierce, Architect, Pure Storage

@Marsha

Docker going away being replaced by Kubernetes

Containers use Linux functions to isolate and get better consolidation

Check out Bob Ward’s session on containers

Why Containers work better with Storage Strategies:

Deploy containers in seconds

Create clones in seconds

Mount multiple copies of DB’s without consuming extra space.

Majority of people are running Linux based containers

If you go with windows based, you might be tied down to certain vendor relationships

When using persistent storage, add files as a variable to use later when deploying the container

MS demo has a good walkthrough of creating a container, check the session slides

Rancher is a good place to start for setting up a place to test containers

Clone the volume for multiple instances

Ansible and terraform for orchestration or Jenkins

Moving past imposter syndrome

Given by Wendy Pastrick

Not necessarily how to overcome it but to reframe it as self-doubt

Alicia Liu – great blog

Fake it until you make it misrepresentation

Only an issue if you have no ideal or motivation to find the answer

Dunning-Kruger effect (overconfidence)

Gaslighting

There is often environmental factors

Take a moment and ask is it me, or could it be other externalized factors

Don’t let the world stifle being able to have fun and enjoy what you are doing

The reality is when we share what we know with others we benefit each other

Self-doubt can be a good driver to learn more

PowerShell for the DBA

Given by Amy Herold

@texasamy

Blog at sqlkitten

DBATools.io getting set up and installed

Always review the code on this

Check out GitHub repo for her scripts to be able to learn more about dba tools

Also grab the Pshell module for AD groups and tools

Deployment Automation

Source Control – GitHub, TFS

Also used SQL compare and such to help with code verification

All in all it was a great day with so much new stuff to learn and was a great time had by all.

Thanks to everyone of the speakers and volunteers who help put on the events and of course thanks to all the sponsors who help put on these free events! We couldn’t do this without your help and support!

Dont forget about the giveaways at the end of the day!

Hope to see everyone again next year for the big 10th anniversary!

Passing the MS-900 exam

Today I am happy to announce I was able to take and pass the MS-900 certification exam. It was a truly hard test for me that kept me guessing in several areas (mainly Exchange and the security sections), but I was able to score well enough to pass the exam.

So, the next questions is, what did I do to prepare and get to a point to pass the exam?

Let’s start with my current workload. As of now (January 2020), I am in a job role where I have been working with Office 365 and Microsoft 365 on a daily basis for about a year now. I normally don’t get too deep into the technical sides of things in certain areas, but I do focus most of my time in Azure AD and SharePoint Online.

This part is hard to prepare for unless you sign up for a developer tenant and really go in and try new things out or support an existing tenant on an ongoing basis. There was one test lab guide that I found that was a great overview on how to look at different aspects of Microsoft 365.

The link to that is here:

https://docs.microsoft.com/en-us/microsoft-365/enterprise/m365-enterprise-test-lab-guides

In the same area a great resource for new businesses to 365 to get an idea on exactly where to start in the process is here:

https://docs.microsoft.com/en-us/microsoft-365/enterprise/deploy-microsoft-365-enterprise

Another main resource I used for my time to study was the exam prep guide offered by @Microsoft365Pro here:

There are so many good resources in this website if you are starting as a beginner to get you all the details needed to pass the exam in this site. For the test there are a lot of other specific details you should dive deeper into in the source above to help round out your knowledge.

Another great resource to prepare for this exam is by Vlad Catrinescu. He has a great guide found here:

https://vladtalkstech.com/ms-900-study-guide-microsofticrosoft-365-fundamentals

His 3 course videos on Pluralsight were great to watch to get up to speed quickly on the topic.

These can be found here:

https://www.pluralsight.com/paths/ms-900-microsoft-365-fundamentals

Finally, another great resource to prep for the test is the MS-900 learning path on the MS Learn site that can be found here:

https://docs.microsoft.com/en-us/learn/paths/m365-fundamentals/

I applaud the folks who worked on this section of courses. There was great content and in certain cases they even had demo walkthroughs you could do to get more familiar with a topic. Great material here to prep for the exam with.

All in all I would say from a time perspective I committed about a good solid month of time to prep for this exam before going and taking it. It might take a shorter amount of time if you dig into a lot of advanced areas of the 365 product group or have been working on it a lot longer.

One thing to keep in mind through all of this is that you should focus on business ideas for this exam. Its not tech heavy and focuses on the overall view of services and concepts in Microsoft 365.

I hope this helps anyone trying to prepare for the test as well. If you have any luck from it, feel free to comment below.

Thanks!

-BJ

2013 Upgrade blocker: missing media web part file

This article is to describe how I resolved a very odd error in the ULS logs and with some external help, I was able to figure out and remove it to get the issue out of the way for an upcoming conversion from 2013 to 2016.

The error showed up when I ran Upgrade-SPContentDatabase on a database I got some errors described below:

Feature Upgrade: Hidden activation dependency Feature ‘MediaWebPart’ (Id: 15/’5b79b49a-2da6-4161-95bd-7375c1995ef9′) could not be activated.  Exception: Failed to instantiate file “AlternateMediaPlayer.xaml” from module “MediaPlayerStyles”: The specified list does not exist..

Feature upgrade incomplete for Feature ‘PublishingWeb’ (Id: 15/’94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb’) in Web ‘http://webappname.domain.com/sites/sitename/subsite1/‘. Exception: Failed to instantiate file “AlternateMediaPlayer.xaml” from module “MediaPlayerStyles”: The specified list does not exist.  (Inner Exception: <nativehr>0x81070588</nativehr><nativestack></nativestack>Failed to instantiate file “AlternateMediaPlayer.xaml” from module “MediaPlayerStyles”: The specified list does not exist.)

So in order to verify this was a problem I looked into the Site Contents section and from there we noticed the style library folder wasn’t showing on the site contents.

Here’s the strange part:

If I opened up another library in explorer mode or looked at the site in SharePoint Designer I does in fact show a library named ‘Style Library’. Um…okay…

Maybe it was corrupted? At this point I am not sure.

The start of the fix was renaming the existing Style Library one so it doesn’t conflict any more. In my specific case I just added ‘_Error’ to the library name in explorer mode or SP Designer.

Next, I created a brand new document library on the site and named it ‘Style Library’.

Once that was created I needed an uncorrupted Style Library from another site to copy its contents from. Luckily I have about 250 or so to pick from… 🙂

The next step was to open the uncorrupted Style Library from either explorer mode or SharePoint Designer and copy the 4 sub folders and contents from the good site to a newly created library in the upgrade error site.

Once we did this, then we could run the upgrade-spcontentdatabase command without getting any errors. I think for good measure I may have done an IISRESET on the site as well after the upgrade attempt.

In my case though this didn’t remove the upgrade message from central admin, but after running psconfig after this the message was removed from central admin.

Hope this helps anyone who sees the same error and helps move things along to upgrade more versions of SharePoint.

Enjoy!

DevOps Days Chattanooga 2019

Recently I was able to attend a great one day conference locally focused on DevOps and discussing some of the methods behind the effort.

If you’re curious, you can find out more about it here: https://devopsdays.org/events/2019-chattanooga/welcome/

The conference was help in a great venue called the Chattanoogan Hotel. The meeting space was great and really offered a lot of room to move around and see the presenters when they were onstage.

If you would like to see some of my notes and thoughts I took from the conference, you can get them from my GitHub repo here:

https://github.com/brfentr/DevOpsDaysChatt2019

I really learned a lot of good content and best practices for different parts of using DevOps in the day to day work I do. However, for me the best part of the day was during the afternoon sessions called Open Spaces.

A description of the concept can be found here: https://devopsdays.org/open-space-format/

The crux of open spaces is that the attendees can define topics or talks that they would like to be developed or discussed further in a self-organized manner with people who may have already done the topic or are just looking to

find out more about a topic.

The two topics I attended for open spaces were DevOps for non-developers and automated remediation.

Just from these two sessions alone I was able to hear from many different people from different companies talk about how they tackled each of these as well as different tools they are using to accomplish it.

Also we had one entire session on trying to find out exactly what tools were available to be used.

Great quality content for someone who doesn’t know maybe where to start or how to begin.

I would recommend this again to anyone from beginner to advanced in the area of DevOps, because I think there was truly something for everyone who could benefit at this event.

I am looking forward to this event again next year!

Thanks to all the speakers and volunteers who made this event possible! You did a great job!

How to create a demo Office 365 environment with data

How do you go about learning about Office 365 if you don’t have access to it? That’s a great question and one that I personally have tried to figure out without having to pay any money. I am of the opinion that if something is worth learning, then there should be free ways to go about learning more about it and getting your hands dirty while learning it.

Fortunately this is the case with Office 365. It’s quite a beast to get your arms around with so many service offerings and options to go out and start playing with. My goal with this post is to show you some resources that not only get you started with Office 365, but also help you get a demo environment with some data in it that makes testing actually useful.

Frist thing we are going to need if we want to start learning about Office 365 is a demo tenant. Again fortunately there is an option for this if you sign up through the Microsoft Developer Program at https://developer.microsoft.com

When you go to this site you’ll be able to click into the Office 365 developer section that will allow you to sign up for a 90 day E5 (the license with most of the bells and whistles) tenant to practice with.

After signing up for the developer program and verifying your email, then it will take a few hours to spin up a tenant with the information provided. Another description of this ca be found here:

https://docs.microsoft.com/en-us/office/developer-program/office-365-developer-program-get-started

While you’re waiting for this process to complete, you might as well head over to the MS Learn section to begin learning about different Office 365 topics here: https://docs.microsoft.com/en-us/learn/

Once your tenant has been created you can start poking around with your new tenant at https://portal.office.com

After about an hour of poking around, its nice, but wouldn’t it be great if there were some test data to sort of flesh things out? I’m glad you asked! The next two items I will describe help do just that.

First item of note are sample data packs in Office 365. A link to learn more about them is here: https://docs.microsoft.com/en-us/office/developer-program/install-sample-packs

Now after going through the process of adding both those sample pack into your tenant, you now have some test users and data to play around with.

For the next part of fleshing out your tenant with some good test data, wouldn’t it be great if you had some great looking SharePoint Online sites to tinker with and see as well?

Have no fear my friend, once again you are in luck with the following site: https://provisioning.sharepointpnp.com/

First off, to see whats possible in SharePoint Online, take a few minutes to flip through the SharePoint look book at https://provisioning.sharepointpnp.com/assets/SharePoint_lookbook_2019.pdf

You can also learn more about some of the pieces that make up these great SharePoint sites by looking at:

https://spdesign.azurewebsites.net/

On the provisioning site, you can click under the view the designs section to see what all kinds of different sites are being offered. As you go through and view each of them there is a list of features, web parts, and content used that is described in each section.

Before trying to deploy one or all of these examples, I think when I originally did this for the first time I had to deploy an app catalog in my test tenant before it could work.

A good description for this can be found here: https://docs.microsoft.com/en-us/sharepoint/use-app-catalog

Plus under each example there is a button where you can deploy this example to your newly created Office 365 tenant.

From here you can really deploy a lot of examples to help flesh out a test instance with very god content to give demos or test more deeper functionality in Office 365.

If you have any questions or comments feel free to let me know.

Enjoy!

Missing Pages library from Publishing site – Upgrade blocker

I wanted to describe an upgrade error I ran across the other day in a SharePoint 2016 site that needed to be cleared in order for the content database to be upgraded correctly.

First, the error I received when trying to do Upgrade-SPContentDatabase:

Feature upgrade action ‘CustomUpgradeAction.Activate404ErrorPage’ threw an exception upgrading Feature ‘Publishing’ (Id: 15/’22a9ef51-737b-4ff2-9346-694633fe4416′) in Web ‘https://webapplication/sites/spsite ‘: The site is not valid. The ‘Pages’ document library is missing.

So the error I got is pretty straight forward, but when I went to look deeper inside the site, I noticed that indeed in the past or for some unknown reason the library ‘Pages’ had been removed or renamed to something else.

I am fortunate in that I have the migration tool ShareGate at my disposal to use to help this. So what I did was find a default site with the Publishing feature enabled as well. Then I set up my source as the default publishing site and the target as the problem site missing the pages library. The I used the copy structure option in order to bring the pages library over to this site that was missing it.

 One thing I noticed when it copied this library is it also copied over the ‘Reusable Content’ list as well in this process.

I guess if you do not have ShareGate at your disposal, you could always download a trial copy of the program from here or you could copy both the pages library and the reusable content over to the needed site by PowerShell or other method…YMMV.

After the copy had completed, I noticed the library was in place correctly as it should be and nothing looked to be wrong with the main site itself.

Finally I fired up PowerShell and ran the Upgrade-SPContentDatabase command with the correct content database and sure enough now this previous error did not show up and the DB is now marked ‘No Action Required’

Hope this helps anyone who runs into this error in the future.

Enjoy!

-BJ

PowerShell on the River 2019 #PSOTR

Lunch time crowd taking a break

On August 9th and 10th I had the wonderful privilege to attend and speak at the 2nd annual PowerShell conference in Chattanooga, TN. It was held again at the great venue of Chattanooga State Community College. It was a great event put on by @PSJamesP , @LittlejohnPSH , and a great group of folks who knocked it out of the park again this year!

Friday the all day session I attended was Advanced PowerShell Scripting WorkShop given by none other than @JeffHicks . I learned even more about best practices when building new scripts and have included my notes in my new GitHub repo here.

On Saturday, it was a busy time of multiple short 45 minute talks given by a great group of speakers:

@Schlauge -Search Event Logs Like a Boss

@JeffHicks – An Intro to Desired State Configuration

@steviecoaster – Choco for Beginners

@techTrainerTim – Git and Github: Newbie to Intermediate contributor in 45 minutes

@nocentino – Containers you better get on board

Lastly was my talk given about SharePoint Online PowerShell intro.

Links to the repo for the entire event can be found here

All my notes for my session can be found here

Once again thanks to everyone who spoke and put on this event, everyone did a great job and I look forward to next years event very very soon!

PowerShell on the River coming up, August 9-10!

This is a quick reminder that there’s a great local event coming up on August 9 and 10th in Chattanooga, TN if you are free for a full two days of learning PowerShell and various other topics related to PowerShell.

Check out the link here

Don’t forget to sign up soon and see you there!!!