Tuesday, 2 December 2014

Create and configure the View Web Analytics Data permission

After the Web Analytics service application is configured, the View Web Analytics Data permission needs to be created for users that are not a site collection administrator or site owner. This is the minimum required permission needed to view Web Analytics reports. End users who need to access a Web Analytics report must have this permission assigned to them.

To create the View Web Analytics Data permission for a site or site collection

  • Verify that the user account that is performing this procedure is that of a site collection administrator or a site owner.
  • From a site or site collection, click Site Permissions from the Site Actions menu.
  • On Site Permissions page, on the Edit tab, in the Manage group, click Permission Levels.
  • Click Add a Permission Level.
  • In the Name field, type View Web Analytics Data.
  • In the Permissions section, under the List Permissions, select the View Application Pages check box.
  • In the Permissions section, under the Site Permissions, select the View Web Analytics Data and Enumerate Permissions check boxes.
  • Click Create.



To configure the View Web Analytics Data permission for a site or site collection

  • Verify that the user account that is performing this procedure is that of a site collection administrator or a site owner.
  • From a site or site collection, click Site Permissions from the Site Actions menu.
  • On the Site Permissions page, on the Edit tab, in the Grant group, click Grant Permissions.
  • In the Users/Groups box, add the users that will be granted the View Web Analytics Data permission.
  • In the Grant Permissions section, click Grant users permission directly, and then select the View Web Analytics Data check box.
  • Click OK.



Wednesday, 19 November 2014

Solution for Zero Byte SharePoint 2010 Log files

If your SharePoint 2010 Log files are of  zero byte i.e. SharePoint is unable to record the Log information then perform the following steps to resolve it

Make sure the login account of “Windows SharePoint Services Tracing V4” is member of Local Administrators group.

Make sure you have restarted the “Windows SharePoint Services Tracing V4” service after performing step 1.


Wednesday, 12 November 2014

SharePoint: Health Analyzer: Databases require upgrade or not supported

Situation, the health analyzer points out there is a problem with the SharePoint environment:“Databases require upgrade or not supported” is the message received.

Clicking on the link within the error message will get show the details of the problem encountered.
The image below gives us an idea, it shows that the problem is the version of the database and the remedy is running the Upgrade-SPContentDatabase cmdlet (i.e. PowerShell script) or running the PSConfig.exe for all other types of databases.


In the remedy section there is a link, this link references the general SharePoint products page. It is not very helpful to remedy the error. The text below will explain how to upgrade the content databases and how to upgrade all other databases.

Finding the databases that need upgrading.
Opening “Central Administration”.
Click “Upgrade and Migration”
Click “Review Database Status”
The administration will show a screen with all the Sql Server Instances, the database names, the type of the database and their status. The Status will show whether or not an upgrade is required.


Upgrading content databases require the GUID of the database that is linked to the site-collection. The site-collection is the key with which we can find the GUID of the database. The name of the content database should supply a clue.


In the case used for this example the content database that was serving the Central Administration Site needed an upgrade. To make sure validating the assumption is always a good idea.

Validating the connection between the content database and the site collection.
In the Central administration –> “Application Management”
Under “Databases” –> “Manage content databases”
Select the Web Application which you think is linked to the content database that needs upgrading.


If the content database shows up under the Database Name, the content database and the web application are validated to have a relation with each other.

Upgrading Content databases using SharePoint 2010 Management Shell
Start the “SharePoint 2010 Management Shell”
In the Shell enter : Get-SPContentDatabase –site [url towards your site collection]


The yellow marked text shows the GUID of the content database.

Cut and paste the GUID to the following command:Upgrade-SPContentDatabase [guid]


It will take some time before the 100% appears.

Upgrading ‘all other’ type of databases using psconfig.exe
Open a command box in ‘run as administrator’ mode.
Navigate to the bin directory of the SharePoint root. C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN
Run the following command: PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures
The PSConfig.exe tool will go though several steps to upgrade all the databases in the correct sequence.

Validate that all the databases where updated successfully.

Open “Central Administration”.
Click “Upgrade and Migration”
Click “Review Database Status”
When the process is complete all of the databases should say ‘no action required’

Thursday, 6 November 2014

Blob Cache in SharePoint

1. What is Blob Cache?

Disk-based Caching for Binary Large Objects
Disk-based caching controls caching for binary large objects (BLOBs) such as image, sound, and video files, as well as code fragments. Disk-based caching is extremely fast and eliminates the need for database round trips. BLOBs are retrieved from the database once and stored on the Web client. Further requests are served from the cache and trimmed based on security.


2. Enabling and modifying disk-based caching for SharePoint sites.

Disk-based caching is disabled by default. To enable and customize the disk-based cache, you must modify the following statement in the web.config file for the SharePoint Web application.
By default, it looks like this:
<BlobCache location="C:\blobCache" path="\.(gif|jpg|png|css|js)$" maxSize="10" enabled="false" />
In order to improve the performance of your site, the BlobCache should be enabled.
<BlobCache location="C:\blobCache" path="\.(gif|jpg|png|css|js)$" maxSize="10" enabled="true" />
Example:
<BlobCache location="C:\blobCache" path="\.(gif|jpg|png|css|js)$" maxSize="10" max-age="86400" enabled="false"/>
In the preceding example:
• location is the directory where the cached files will be stored
• path specifies in the form of a regular expression which files are cached based on the file extension
• maxSize is the maximum allowable size of the disk-based cache in gigabytes
• max-age specifies the maximum amount of time in seconds that the client browser caches BLOBs downloaded to the client computer. If the downloaded items have not expired since the last download, the same items are not re-requested when the page is requested. The max-age attribute is set by default to 86400 seconds (that is, 24 hours), but it can be set to a time period of 0 or greater.
• enabled is a Boolean that disables or enables the cache.


3. Flushing the Disk-based Cache:

We can flush the current site collection object cache. To do this, browse to the following location on the web site,
Site collection administration -> site collection object cache -> disk based cache reset.
If we have multiple WFEs in the farm, each WFE will maintain its own copy of Disk-based Cache. SharePoint does not have a Web user interface (UI) to flush the disk-based cache on all the servers in a farm and neither is there an option to select a specific WFE.
4.The option provided in the Administration page for flushing the cache is only to the flush the cache on the web front end to which you are currently browsing.
if you would like to flush the complete binary large object (BLOB) caches associated with a specific Web Application on different Web front-end computers in a farm, then you can use the STSADM command to do so.
STSADM -o setproperty -propertyname blobcacheflushcount -propertyvalue 11 -url http://web:port 


5. Internals of the blob cache functionality within SharePoint:

After enabling blob cache in web.config, do an IISRESET and browse to the /settings.aspx first, instead of home page (Collaboration portal site).
When we browse to the settings.aspx, it will create the following files change.bin, dump.bin and flushcount.bin (all the files will be 1KB in size).
Browse to the home page now, it will create a folder PUBLISHINGIMAGES, all the images rendered from the database will be stored here and the above bin files will also get updated (we can see the difference in file size).
Every time when a new image file is rendered from the database, the image folder gets a copy of the image. The bin files (index) will get updated with an additional entry for the new file.
Every request from client will check the index file first. It will only check the cache index and not the image folder directly for the image. If the index file does not have an entry for the image, then the request is served from the database. During this time, a copy of the image will be stored in the images folder and the index file also gets updated, so that the next request will not go to the database.


6. What happens I manually delete just the image file in the cache folder or the image file in the cache folder gets corrupted?

We will not see the image on the client page; we get a broken image ‘X’.


7. How are these cache files stored?

Filename.extension.cache is the file naming format.


8. What can I do if the cached file gets corrupted?

Recommendation: We can reset the index file. Site settings -> Site collection object cache -> Check the box for “Force this server to reset its disk based cache”. It will completely delete all the images and reset the bin files back to 1KB, so that next request will go to database and the complete index will get rebuilt.
Workaround: If you do not want to reset the complete index. Find out the missing image and copy just that file to the cache folder, name it as “filename.extension.cache”
Refresh the page now; it should pick up the image.


9. How is the Index file maintained?

Every time when the web.config initializes, the index file is loaded from the blobcache folder to memory. All new entries will keep getting updated in index file when in memory.
IISRESET /stop will flush the updated index file from memory to disc within the blobcache folder.
IISRESET /start will load the index file from blobcache folder to memory.
As long as the application pool is alive the index file will be getting updated in memory itself.


10. Can an Index file get corrupt?

Index file corruption is possible only when IIS crash or the index file is overwritten with wrong information. When IIS tries to load the index file from blobcache to memory and identifies that it is a corrupted file (not a valid file), it will get completely rebuilt (flush) as fresh file (1KB), all the old entries and images will be lost.


11. In a farm environment, is there any way of having all the WFEs' blob caches synchronized among each other?

No, this cannot be done because SharePoint maintains the index and the cache files individually on each server.


12. In a single WFE environment using web gardening, how does blob caching function? Is there any sync that happens among the working processes?

Web gardening is not supported.


13. What would be the best way of using blob cache in a farm environment (best practices)?


If the requirement is to “centralize” static cached files, then 3rd party content distribution network (CDN) solutions like Akamai need to be used.
What are the limitations of SharePoint and blob caching in a farm environment?
a. Blob caching does not work with Web Gardening.
b. Blob caching does not synchronize data across WFEs – so we might be seeing different versions of the files for a short duration across different WFE servers.

Thursday, 16 October 2014

Office web apps cache creation failed

If you got this error in your farm:

office web apps cache creation failed "Object reference not set to an instance of an object."



and you have tried this all:


  • modifying the Cache DB's settings with Set-SPOfficeWebAppsCache
  • moving the Cache Db onto a different Content Database
  • removing the Word Viewing Service Application
  • stopping Excel Calculation Services, PowerPoint Service, Word Viewing Service
  • disabling and re-enabling the Office Web Apps Site Collection Feature
You might need to re-run the OWA setup and select Repair, This will sort out the issue.

However don't forget to run the SharePoint 2010 Products Configuration Wizard after the installation if your search doesn't work.


Tuesday, 14 October 2014

Troubleshooting SharePoint HTTP 500 Errors and IIS Failed Request Tracing

When I tried to access the SharePoint Central Administration site, I would get HTTP 500 errors.  I was able to resolve this issue so I thought I should share some of my troubleshooting tips.



As SharePoint admins, we get sucked into IIS and SQL Server, it's just the nature of the beast.  Save yourself therapy and hours crying yourself to sleep and just accept it.  Today we’re going to look at a few different steps as we troubleshoot issues with issues when the SharePoint sites don’t come up, specifically in IIS.

First, what is the HTTP 500?




Ah yes, our nemesis, our old friend, the page could not be displayed.  The important piece of this page is the status code on the top right – 500.  That’s the status code.  You can find more on general status codes in this Microsoft KB article.  It’s a fairly generic error code.  How do we know what’s broke?  There are many causes for this error, so I just try to give you a basic checklist of things to check that should point you in the right direction.

Troubleshooting Steps
Here are a few steps that I like to do when SharePoint appear to be down:

1. If the SharePoint sites don’t come up for you, first try another client machine to make sure it’s not just you.  These are unlikely to be client-side, but let’s rule that out anyway.  OK, so neither you nor your users can get to SharePoint, awesome.

2. The next step in my mind is to get on the SharePoint server and let’s rule out DNS or networking issues.  Pull up the SharePoint sites via their URL on the server desktop.  If this works, then go to your IT admins as Domain Name System (DNS) or there’s something with the network.  I had one issue one time where IT had switched the subnets around, and only users on a remote subnet couldn’t access SharePoint.  It happens.  If it still doesn’t come up, it’s definitely something server-side and it’s time to dig deeper.

3. From the SharePoint server, try to pull up the Central Administration site.  This should usually come up with this error.  If this doesn’t come up, we would likely be facing like a database access error or something.  But it’s good to rule out.  Assuming it comes up, go check the AAM (alternate access mappings) and make sure nothing changed.

4. From here you could do a couple things.  But since one web application works and one doesn’t, there’s only a few things that allow some sites to work and others not.  Let’s go check the IIS application pools.  Open up IIS Manager, expand the server node and click Application Pools.  Make sure the application pool that hosts your non-working SharePoint site is started (note – it’s normal for the SharePoint web services root to be stopped).  Sometimes this can happen after a server reboot.  You could also do an iisreset or even a full reboot here, but it is unlikely to resolve it.



Besides being stopped, it could be started or continuously stop.  Causes could be authentication related.  Check the IIS event logs (Event Viewer), and the SharePoint ULS logs and see if they point you in a direction.

5. While in your IIS, go to the site(s) in question and check their bindings.  Are the correct hostname bound to the site?  This just makes sure that IIS is listening on the right host.

6. So at this point, we’ve checked all the normal things and the problem seems to point with the site itself.  What does this leave?  Things like the web.config, applicationHost.config, etc.

7. Go to c:\inetpub\wwwroot\wss\VirtualDirectories\<sitename>.  Look at the web.config file.  Does it have a recent modified date?  In my case, it did.  OK, so we’re highly suspect of the web.config, how do we know what?

Let’s go back to IIS and let’s enable Failed Request Tracing.


In IIS, click on the down site in the left pane under the Sites heading.  We have to enable Failed Request Tracing.  Do this via the right panel, under the Configure heading, click Failed Request Tracing.  Click the Enable checkbox, and notice the path of the logfile.



Now that FRT is enabled, we have to tell it what to capture.  In the middle pane, under the IIS group, click the icon called Failed Request Tracing.  On the right under Actions, click Add.



In the wizard, leave All Content select and choose Next.

For the status code, enter 500.  Click Next.



Leave all providers checked, and click Finish.
8. Now go try to access the site, and get the 500 error.

9. That should have written what we needed to the log file.  Go to the path defined for the log earlier.  You will find two files, an XML file (the log with errors) and an XSLT that styles the XML for easy viewing.  Open the XML in a browser to see the error.

10. Review the error for details:




This will show you a specific error, and notice that the line number with the issue is listed as well.  Great!  Now we have something to work with.

11. In my case, in the web.config there was a Session state entry was duplicated.  This is normal, but there was a remove statement that prevented one of them from being loaded, which was commented out, in turn causing the duplicates to both load:

<!-- <remove name="Session" /> –>

I removed the comment out lines (highlight) and saved my web.config.  Success - the site came up!  Confetti fell from the rooftops, Champagne flowed from the heavens, and there were many celebratory handshakes.

So do you want to leave tracing enabled?  I don’t see the harm.  It is capped per the initial configuration, so it won’t fill up the C drive.  If you’re getting that many HTTP 500 errors, you likely have other issues.

I hope this gives you a few more tools in your bag of troubleshooting tricks when SharePoint won’t come up!


Wednesday, 1 October 2014

SharePoint MIME types for a web application

Find all the MIME types for a web application.


Get-SPWebApplication "http://ecdc.europa.eu" | Foreach-Object {$_.AllowedInlineDownloadedMimeTypes}

Tuesday, 30 September 2014

SharePoint Default Trusted file (MIME) types

Each Web Application in SharePoint 2010 and 2013 has an AllowedInlineDownloadedMimeTypes property within which a list of trusted file (MIME) types exists. Firstly, there is no “untrusted” list, only a “trusted” list. It is safe to assume that if a MIME type is not included in this list, it is untrusted by default and is subject to the “X-Download-Options: noopen” HTTP Response header. The most common example of this is PDF documents, MIME type “application/pdf”. 


In the SharePoint 2010 Management Shell, you can easily find out which types are trusted out of the box by executing the following PowerShell snippet:


Get-SPWebApplication "http://yourwebapplicationurl" | Foreach-Object {$_.AllowedInlineDownloadedMimeTypes}


You could also use the following snippet to achieve the same output: 



$webApplication = Get-SPWebApplication "http://yourwebapplicationurl"            
$webApplication.AllowedInlineDownloadedMimeTypes


Again, it is important to note that each web application has its own AllowedInlineDownloadedMimeTypes property. 

Force Browser to save office files locally

if you are stuck like me and trying to find a solution to force browsers to only save office documents (word and excel) locally and not try to open in browser follow the steps below:


$webApplication = Get-SPWebApplication "http://localhost"
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/vnd.openxmlformats-officedocument.wordprocessingml.document")
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/msword")
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/vnd.ms-word.document.12")
$webApplication.AllowedInlineDownloadedMimeTypes.Remove("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
$webApplication.Update()

Wednesday, 24 September 2014

Configure outgoing email for a farm

You can configure outgoing email for a farm by using the SharePoint Central Administration website. Use the following procedures to configure outgoing email. After you complete the procedures, users can track changes and updates to individual site collections. In addition, site administrators can, for example, receive notices when users request access to a site.
To configure outgoing email for a farm by using Central Administration
  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators group on the server that is running the SharePoint Central Administration website.
  2. In Central Administration, click System Settings.
  3. On the System Settings page, in the E-Mail and Text Messages (SMS) section, click Configure outgoing e-mail settings.
  4. On the Outgoing E-Mail Settings page, in the Mail Settings section, type the SMTP server name for outgoing email (for example, mail.example.com) in the Outbound SMTP server box.
  5. In the From address box, type the email address as you want it to be displayed to email recipients.
  6. In the Reply-to address box, type the email address to which you want email recipients to reply.
  7. In the Character set list, select the character set that is appropriate for your language.
  8. Click OK.

Friday, 8 August 2014

Sharepoint 2010 Content Deployment Failing (cannot find feature)

So my content deployment kept of failing giving error

Could not find Feature <My Feature Name>.

I did everything and Feature was correctly deployed etc.

Turns out the features were not in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES folder on the central admin server... only on the web server. Once I copied them over it worked like a charm. Weird that when you install them with stsadm it doesn't put them everywhere. 

Monday, 4 August 2014

SharePoint: Grant Replicate Directory Changes Permission on a domain

In order to ask replicate directory changes permission to a domain controller, it does not have to be a domain admin. by delegation, we can create this.

Why do we do this?

like say, user wants to update their information from SharePoint by themselve, we can allow the information that store in SharePoint database and replicate to the Active Directory. Some also need to be done as well in SharePoint Administration.



How to Grant Replicate Directory Changes?



  • At your domain controller, open up the Active Directory Users and Computers.
  • Right-click the domain. for example, netoverme.local ans select Delegate Control
  • Click Next on the Delegation Control Wizard.
  • On Users and Groups windows, click Add.
  • type a name of synchronization account. For example, sp_admin .click Nextsp_admindelegeate

  • on task to delegate, select create a custom to delegate and click next.
  • on the Active Directory Objext Type, Select This Folder,existing objects in this folder, and creation of new objects in this folder, and click Next.
  • on the Permission pages, select Replicating Directory Changes.replicating directory changes



click Next and Finish.

Event ID 6398 due to CEIP Data Collection for SharePoint Foundation


If you have seen this error in your Job History, here is a workaround.

You can implement the following workaround to disable the CEIP Data Collection Job.

1.) Launch an elevated SharePoint 2010 Management Shell

2.) Run the following command to find out the current status of CEIP at the Farm and Site level

Get-SPBrowserCustomerExperienceImprovementProgram -Farm <- This will return the status of the Browser CEIP at the farm level
(Get-SPFarm).CEIPEnabled <- This will return the status of the CEIP at the farm level
(Get-SPWebApplication).BrowserCEIPEnabled <- This will return the status of the CEIP at the site level

3.) If CEIP is enabled, run the following commands to disable CEIP at the Farm and Site level

Set-SPBrowserCustomerExperienceImprovementProgram -Farm -Enable:$FALSE
Set-SPBrowserCustomerExperienceImprovementProgram -WebApplication "SBS SharePoint" -Enable:$FALSE

4.) Next, open SharePoint 2010 Central Administration

5.) Click System Settings

6.) Click Configure Privacy Options under Farm Management

7.) Under the section Customer Experience Improvement Program, select the radio button for 'No, I don't wish to participate.' and then click OK.

8.) Next, disable the CEIP Data Collection job by running the following command

Get-SPTimerJob job-ceip-datacollection | Disable-SPTimerJob

9.) Run IISRESET /noforce from an elevated command prompt.

Friday, 1 August 2014

Remove SharePoint DB without having SQL Management Studio access

Just a quick tip that can help a lot in some situations, when in the situation when you for example have deleted a service application and the DB’s are still there, the DBA’s have all left and you have no way of connecting to SQL with a management tool…

This is what you can do, given that you have the permissions…(high?)

Get-SPDatabase
 (Will list all databases used by SharePoint, Name and GUID and Type.)

$DatabaseToDelete = Get-SPDatabase <GUID of the database you need to get rid of>
 (Load the database as a SPDatabase object)

$DatabaseToDelete.Delete()
 (It’s now gone…)

Enable Anonymous Access in SharePoint 2010

Here are 8 simple steps on how to set up anonymous access in MS SharePoint 2010.  It is not much different then SharePoint 2007 set up, the only difference is the GUI or the Ribbon.

1. Starting in Central Administration, under Application Management, click on the Manage web applications.
 

2. Make sure you select the site you want to enable anonymous access and click on the Authentication Providers icon.




3. On the Authentication Providers pop-up window click on the Default zone.



4. Under Edit Authentication, check Enable anonymous access and click Save.


5. Going back to Web Application Management click on the Anonymous Policy icon.


6. Under Anonymous Access Restrictions select your Zone and set the Permissions to None – No policy and click Save.


7. Now, web application will allow anonymous access to be set. So, navigate to your top level site collection for the web application. Click the Site Actions > Site Settings. Under Users and Permissions click Site permissions.

8. Under Permission Tools, click Anonymous Access icon and set the permissions to Entire Web site and click OK.




That’s all, folks! If you followed these steps properly you should have now Anonymous Access enabled.

How to Download All Your SSRS Report Definitions (RDL files) Using PowerShell

Here’s a short PowerShell script that :
1. Connects to your report server
2. Creates the same folder structure you have in your Report Server
3. Download all the SSRS Report Definition (RDL) files into their respective folders

In addition to backing up your Source Project, your ReportServer database, or good old RSScripter (see http://sqlserver-indo.org/blogs/mca/archive/2009/03/08/extract-and-transfer-rdl-files-from-ssrs.aspx) this is just another way you can “backup” or archive your reports.


#note this is tested on PowerShell v2 and SSRS 2008 R2
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Xml.XmlDocument");
[void][System.Reflection.Assembly]::LoadWithPartialName("System.IO");
 
$ReportServerUri = "http://yourreportserver/ReportServer/ReportService2005.asmx";
$Proxy = New-WebServiceProxy -Uri $ReportServerUri -Namespace SSRS.ReportingService2005 -UseDefaultCredential ;
 
#check out all members of $Proxy
#$Proxy | Get-Member
#http://msdn.microsoft.com/en-us/library/aa225878(v=SQL.80).aspx
 
#second parameter means recursive
$items = $Proxy.ListChildren("/", $true) | `
         select Type, Path, ID, Name | `
         Where-Object {$_.type -eq "Report"};
 
#create a new folder where we will save the files
#PowerShell datetime format codes http://technet.microsoft.com/en-us/library/ee692801.aspx
 
#create a timestamped folder, format similar to 2011-Mar-28-0850PM
$folderName = Get-Date -format "yyyy-MMM-dd-hhmmtt";
$fullFolderName = "C:\Temp\" + $folderName;
[System.IO.Directory]::CreateDirectory($fullFolderName) | out-null
 
foreach($item in $items)
{
    #need to figure out if it has a folder name
    $subfolderName = split-path $item.Path;
    $reportName = split-path $item.Path -Leaf;
    $fullSubfolderName = $fullFolderName + $subfolderName;
    if(-not(Test-Path $fullSubfolderName))
    {
        #note this will create the full folder hierarchy
        [System.IO.Directory]::CreateDirectory($fullSubfolderName) | out-null
    }
 
    $rdlFile = New-Object System.Xml.XmlDocument;
    [byte[]] $reportDefinition = $null;
    $reportDefinition = $Proxy.GetReportDefinition($item.Path);
 
    #note here we're forcing the actual definition to be 
    #stored as a byte array
    #if you take out the @() from the MemoryStream constructor, you'll 
    #get an error
    [System.IO.MemoryStream] $memStream = New-Object System.IO.MemoryStream(@(,$reportDefinition));
    $rdlFile.Load($memStream);
 
    $fullReportFileName = $fullSubfolderName + "\" + $item.Name +  ".rdl";
    #Write-Host $fullReportFileName;
    $rdlFile.Save( $fullReportFileName);

Enterprise Wiki template is unavailable when you create a new SharePoint subsite

You have a Microsoft SharePoint site collection. When you try to create a new subsite, you notice that the Enterprise Wiki template is not available as an option.

To resolve this issue, turn on the Publishing feature at the site collection level. To do this, follow these steps:
  1. On the Site Actions or Settings menu (depending on your version of SharePoint), point to Site Settings, and then click Modify All Site Settings.

    Note If you do not see additional items when you point to Site Settings, click Site Settings.
  2. If you are not at the root of your site, under Site Collection Administration, click Go to top level site settings.
  3. On the Site Settings page, under Site Collection Administration, click Site collection features.
  4. On the Site Collection Features page, next to Office SharePoint Server Publishing Infrastructure or SharePoint Server Publishing Infrastructure (depending on your version of SharePoint), click Activate.

sps3:// Search Crawl Access is denied error

If you are looking at SharePoint Search Crawl logs, and find a top level Error, in details you'd find:

Access is denied. Verify that either the Default Content Access Account has access to this repository, or add a crawl rule to crawl this repository. If the repository being crawled is a SharePoint repository, verify that the account you are using has "Full Read" permissions on the SharePoint Web Application being crawled. ( HttpStatusCode Unauthorized The request failed with HTTP status 401: Unauthorized. )

You need to go to the site settings of the site giving error and do the following:

In Site Administration section of Site Settings, find Search and offline availability click that link. Make sure the Allow this site to appear in search results is set to Yes.


Thursday, 17 July 2014

Verify that OAuth is configured correctly for the Machine Translation Service application proxy in SharePoint 2013

So I have just installed SharePoint 2013 SP1 and the Health Analyzer showed up this error.

Resolution: Ensure that every Web application with a Machine Translation Service application proxy has a connection to a User Profile service application and an App Management service application, and is in claims-based authentication mode.


  • Verify that the user account that is performing this procedure is a member of the Farm Administrators group.
  • On the Central Administration website, click Application Management.
  • On the Application Management page, in the Service Applications section, click Configure service application associations.
  • In the Application Proxy Group column, click the proxy group for the Web application or service application that you want to configure. Usually it is the default Application Proxy Group.
  • Select the User Profile Service Application Proxy check box and the App Management Service Application Proxy check box.
  • Go back to the Central Administration Home page. In the Application Management section, click Manage web applications.
  • Click the Web application you want to configure, and then click the Authentication Providers button on the ribbon.
  • Ensure that the Membership Provider Name for the Default zone is Claims Based Authentication. If not, you have to migrate the Web applications from classic mode to claims-based authentication. For more information, see Migrate from classic-mode to claims-based authentication in SharePoint 2013.

The Machine Translation Service is not running when it should be running (SharePoint 2013)

So I just installed SharePoint 2013 SP1 and got this error, here is how to solve this.


  • Verify that the user account that is performing this procedure is a member of the Farm Administrators group.
  • On the Central Administration website, click Monitoring.
  • On the Job Definitions page, in the list of timer jobs, click Machine Translation Service Timer Job.
  • On the Edit Timer Job page, in the Recurring Schedule section, specify when you want the timer job to run, and then click Enable.

Tuesday, 1 July 2014

Grant local admin rights on Windows Server 2012

Running your SharePoint development environment as a domain user is pretty much a requirement. But running a SharePoint development environment without being local administrator is also a pain.

To grant your domain user the appropriate rights for being a local admin and being able to run everything as administrator without specifically asking to “Run as administrator” you have to do the following.

Add domain account to the local administrators group with the following command line (must be run as a local admin): net local group administrators /add domain\user

Run gpedit.msc and go to Windows Settings > Security Settings > Security Options and set the User Account Control policies as show on the image.



On earlier versions of windows you could go to the control panel and the users account and modify the UAC settings from there, which would effectively make you run everything as administrator without the need to use run as administrator, but this doesn't work on windows 8 or windows server 2012, not that option just removes the prompt of whether or not you are sure you want to run as an administrator.

Wednesday, 18 June 2014

Office Web Access PreRequisites Install on Windows 2012 Powershell

If you are stuck like installing an old Office Web Access 2010 on a Windows 2012 and thinking how to install Prerequisites here is the powershell command:

Add-WindowsFeature Web-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Static-Content,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,InkandHandwritingServices

Thursday, 12 June 2014

New-SPManagedAccount PowerShell Access is Denied Cross-Domain Accounts

I guess you have see this error when you tried to add another domain's user to your farm's managed accounts.

New-SPManagedAccount : An error occurred while getting information about the user <username> at server <servername>: Access is denied.

You need to follow the instructions as follows to get round the issue:

1. You need to add the Remote domain user to the local admins of the server but before that you run this command Add-SPShellAdmin -UserName DOMAIN\UserName



2. Add the DOMAIN\UserName to the Local Administrators Group

3. Run PowerShell as different user (using this DOMAIN\UserName)


4. run $cred = Get-Credential


Enter the user and password you want to add in the managed account (DOMAIN\AnotherUserName) and press OK, now the credentials of the Remote user is saved in the $cred

5. run New-SPManagedAccount -Credential $cred

Press Enter and there you go, the Remote user from a different domain is now added to your Managed accounts.

You can check that in your Security ->  General Security -> Configure Managed Accounts in the SharePoint Central Administration






Wednesday, 19 February 2014

New SharePoint 2010 Instance with Databases on your own naming convention

If you want to install a new SharePoint 2010 instance with Configuration database and Administration Content database with your own naming convention follow these simple steps:

first install all the SharePoint bits and once completed do not run the wizard.

open the SharePoint Management Shell

Run this command

PS C:\Users\administrator> psconfig.exe -cmd configdb -create -server
<Your SQL Server> -database <Config Database Name> -user <User> -password
<Password> -admincontentdatabase <Admin Content DB Name> -passphrase <Your Pass Phrase>

Once you have run this command you'll have your config and admin database with the names you have provided.