Using SharePoint Search Query Tool

SharePoint Search Query Tool

If you’re working on SharePoint deployments, and aren’t familiar with SharePoint Search Query Tool, you’re probably doing something wrong. Or you’ve gotten a really troublefree tenant and simple requirements.. 🙂 At least for technical issues, it’s the #1 tool for debugging what’s in the index and what isn’t. This blog post describes how to use it to investigate SharePoint Online Search index issues.

This blog post is about using SharePoint Search Query Tool to investigate search index issues in SharePoint Online. First of all, you can get the tool from here:

Continue reading

Updating files in an App Part (SharePoint Add-in)


Luckily, SharePoint Add-ins (or App Parts, like they were called earlier) are slowly getting killed and rooted out of all the sites they once were deployed to – and I don’t think anyone’s going to miss them. However, as so often happens with legacy implementations, there will still be thousands of sites, where SharePoint administrators and developers will be responsible for maintaining and developing the solutions further. This will occasionally require updating app parts, which is a process that kind of sucks. Here I’ll try to simplify the process.


Not all the files in an app part are updated during the deployment and upgrade of the app. This is difficult to debug and leads to new functionality or enhancements not being applied to the target system.

Continue reading

Using PowerShell to set ULS logging level to “extra verbose” to catch all the events in the logs

Stock photo from

This blog post describes how set the SharePoint’s ULS level to “Extra Verbose” (VerboseEx) using PowerShell. This is not possible using the browser UI.

Description of the solution

By default, ULS logging is somewhat non-detailed, and a lot of data that could be used to debug issues is omitted. The UI cannot be used to set this level of logging – it is limited to verbose. In case you really, REALLY need to get all the data logged to ULS, you can use PowerShell to enable verboseex -level tracing, using the following command:

Beware, though: this will generate a lot of data, and it’s likely you won’t be able to do anything with the log files using notepad++ or similar tool, as a single file can be hundreds of megabytes, and handling that might get a little tricky.

You can always reset this setting to default (medium-level tracing) by running the following command:


More info about the trace levels:

Disabling anonymous access on a single site through PowerShell

Anonymous access in SharePoint 2013

This post is about managing Anonymous Access on a SharePoint site (SPWeb) using PowerShell commandlets. It’s often a lot more feasible and even easier than using the browser interface!


Assume you have a site collection that’s published to the whole world. You’ll have anonymous access enabled at both web application and site collection -levels, and configured permissions at the root web -level. Now, let’s assume you want to disable anonymous access on a certain site deeper in the site structure. This way anonymous users could access your site at and, but not at As an added bonus, that web would even be removed from the navigation for anonymous users (security trimming).


Of course, you could do this through site permissions -page via browser ( by breaking permissions inheritance and disabling anonymous access, but there are multiple situations when this is not feasible – say, for example, that you already have a redirection for that certain url set in the IIS or gateway, and can’t access the page. Luckily, this can also be done with PowerShell.


This is a lot faster than through browser, right? 🙂 Just remember to use the right url for the web, SharePoint will find out the right zone for you!

Powershell Error: Cannot uninstall the LanguagePack 0 because it is not deployed.

Powershell: languagepack 0

Thi s post offers a solution to the very non-descriptive SharePoint error message “Cannot uninstall the LanguagePack 0 because it is not deployed”, which might appear while trying to update a wsp solution.


Assume you’re trying to install, update or uninstall a SharePoint solution (.wsp package) using PowerShell-commands Install-SPSolution, Update-SPSolution or Uninstall-SPSolution (respectively). Operation fails with the following (or similar) error:

I have actually seen this also in the form of “Cannot uninstall Language Pack 0 because it is not deployed”, but I think the other form of the error is the one that pops up in the PowerShell.

Powershell: languagepack 0

In Central Admin the solution is in Error state.



You can find quite a lot of solutions online, but they weren’t really working for me. I tried restarting services, removing the package and meddling with the dll-files, but to no avail. However, the actual “last operation details” on the CA page hinted that the problem was in fact in one of the features. The feature in question included some content types, and toying around with them is like playing baseball with hand grenades, so you have to tread carefully in cases like these.

Continue reading

Malformed web.config killing your ASP.NET-application or SharePoint (“Server Error in ‘/’ Application” or “Parser Error”)

Malformed web.config


Once you navigate to your site, you only get en error like this:

Server Error in ‘/’ Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Index was outside the bounds of the array.

The next few rows (source of the error) seem to vary wildly, but they’re something like this:

Parser Error

Line 3: <WebControls:XmlUrlDataSource runat=”server” AuthType=”None” HttpMethod=”GET”>
Line 4: <DataFileParameters>
Line 5: <WebPartPages:DataFormParameter Name=”RequestUrl” ParameterKey=”RequestUrl” PropertyName=”ParameterValues”/>
Line 6: </DataFileParameters>
Line 7: </WebControls:XmlUrlDataSource>

Continue reading

Quickest way to download all the wsp-packages in a SharePoint farm

PowerShell logo

Downloading all deployed farm solutions (wsp-packages) from a SharePoint farm is pretty simple using PowerShell. No need to download individual packages through cumbersome interfaces!


Got this one from the cool guys at C-Sharp Corner.

“Sign in as a different user” option missing from SharePoint Online and 2013 site menu

SharePoint Online site menu

SharePoint 2013 and 2016 don’t have that old and familiar “sign in as a different user” -option in the site menu, and for the time being, nor does SharePoint Online. However, sometimes it’s very useful functionality to have, so it’s a bit weird Microsoft chose to get rid of the option. This post outlines a method that I’ve found to work quite well!

Solution for logging in as a different user

There’s an url you can use to automatically log the current user out, and prompt for new credentials.

Continue reading