Search This Blog

Friday 31 May 2013

SP2010: View Health Reports in Central Admin disabled

Hi,

This explains how to enable Health Reports in Central admin when you get this message:

Ok, first go to Manage Services on Server.
There make sure that Web Analytics Data Processing Service are running.
Then go to Monitoring -> Review Job Definitions.

Here look for Microsoft SharePoint Foundation Usage Data Processing

Make sure it is enabled and if not enable it.
After it is enable you will see a run now

Go back to your Health Reports and you should see some data...

Sync SP2010 User Profile Photos with Active Directory

Hi,

Steps to Sync User Profile Photo's in SharePoint 2010:

Download and install Exclaimer Outlook Photo's in your Domain Controller http://www.exclaimer.com/outlook-photos/

Log onto your Central admin -> Service Applications -> User Profile Service App -> Manage User Properties.


Edit the Picture Property:
You can set it so that users cant change the property but the important part here is at the bottom,.
Choose your connection, select the Thumbnaillogo in the Attribute and direction must be Import.(Not Blank as in screenshot)

After this run a full User Profile Sync under Start Profile Sync.
This might take a while to run after which you need to open SharePoint PowerShell in admin mode and run the following script.

Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http://YourMySiteHost

If you get this error:
Update-SPProfilePhotoStore : Object reference not set to an instance of an object.
Go to Service Applications, Select the User Profile Service Application and click on permission. The user you are using needs full rights

This should be it!

Thursday 30 May 2013

Infopath: The Visual Basic or C# project for this form template cannot be found.

Hi,

i Have been asked to look for hard coded code in a InfoPath form.

So, how do you get the Project if you ony have access to the SharePoint site?


There should always be a folder on your SharePoint site that is part of the SharePoint List where the template was published to.

Just download that folder and point your info path form to it...
So i clicked on "All site Content" on the site wherer the form was located and there it was....the code for my Project.


Thursday 23 May 2013

SP2010: The backup file should be restored to a server with version '4.0.145.0' or later.

Busy testing a backup & Restore procedure.
***If you are busy with a disaster recovery this post wont help you. If you are testing your backups and getting version '4.0.145.0' error, then i suggest you have a look at this or at least scroll to the bottom to not get caught with your pants down***

Create a Site-Collection backup using:
backup-spsite -Identity http://siteurl -path c:\filename.sps


Then i try and restore on the same server to a diffrent web app using:
Restore-SPsite -identity http://diffrentsiteurl -path c:\filename.sps
Your backup is from a different version of Microsoft SharePoint Foundation and cannot be restored to a server running the current version. The backup file should be restored to a server with version '4.0.145.0' or later.

So, there is something wrong here...This is trying to restore to the same SP instance...

Run this:
psconfig -cmd upgrade -inplace b2b -wait –force

ok, still fails

Now trying this:
PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

No luck...and not sure what else to try...
Now i tried this command:
(get-spserver $env:computername).NeedsUpgrade

Ok, so i get back False...

Ok, my next plan is to install the latest CU's and then try again...The message say "or Later"

Ok, so installing Feb 2012 CU and then ran the wizzard.
No Luck
Now going to force upgrade again

Ok, not getting this backup restored.

What i did now was take another backup and then try and restore it. WORKED....


If you are trying to recover for disaster recovery then im afraid i dont have an answer for you...

What i can tell you...
Looks like with SP1 there might be an issue restoring backups made with this command.
Really do some testing of your backups and consider upgrading to at least 2011 Feb CU






Wednesday 22 May 2013

List all Site Collections under a Database

Hi,

Here is a PowerShell Command to list all your Site Collections under a DB.

Run Powershall as Admin

Get-SPContentDatabase | %{Write-Output "- $($_.Name)”; foreach($site in $_.sites){write-Output $site.url}}




SP2010: Save Site as Template and Import when you have SharePoint Server Publishing Enabled

Hi,
Here is how to save a site as a template and how to import it.

Go to your site, Site settings.
Under site Actions if you are luck there would be a Save Site as Template.

If not first do the following:
Are you a Admin? If not become one.
Are your SharePoint Server Publishing enabled? If this is enabled you wont see the Save as template feature.
Add this "“_layouts/savetmpl.aspx”"to the end of your url to go to the "Save as Template" directly (Thanks for pointing this out Jacob)

So now however you got there you should be in save as template.


Fill in the details and decide if you want to include content.
Saved!

If you ever want to recall your template and delete it you will find it under Site Setting -> Solutions





Thursday 16 May 2013

SP2010: Database has large amounts of unused space.

Hi,

This error i have seen a few times.

You need to Trunk your log file:

Following databases have large amounts of space allocated on the disk but not in use. This may be due to recent deletion of data form the database, or because the database has been pre-grown to a larger size. This database will take up a larger amount of space on the file system unless it is shrunk down to a smaller size.

Do this following:
Backup your DB,
Change recovery mode to simple
Right click on the DB it is warning you about and select Shrink and database

You can also do a Transaction log backup which should truncate it.
If you just need to shrink your Log file choose files and select Log File

Wednesday 15 May 2013

SharePoint Health Analyzer: Drives are at risk of running out of free space.

Hi,

Seen this error a few times and most of the people recommend you disable it. a False Alert.
This is more of a recommendation than a warning. More for when you are going to use memory dump for troubleshooting or debugging.

The SharePoint Health Analyzer detected a condition requiring your attention.  Drives are at risk of running out of free space.
Available drive space is less than five times the value of physical memory. This is dangerous because it does not provide enough room for a full memory dump with continued operation. It also could cause problems with the Virtual Memory swap file:


Here is how to disable this warning:
in Central Admin open Monitoring and then Review rule definitions


Find the rule "Drives are at risk of running out of free space"
Edit it and remove the Enabled check box



Wednesday 8 May 2013

Adding a Web Part to a farm - Add-SPSolution

Hi,

Here is how to add a wsp file to a SharePoint Farm:
Open SharePoint PowerShell in Admin Mode

Command:

Add-SPSolution -LiteralPath <Path and File Name>

Now open Central Admin
Goto System Settings and then click on Manage Farm Solutions



Click on the solution you added and then on Deploy Solution.
Then you change the settings to what you want and click ok


Your Solution is now deployed

Now you need to go to your site settings and enable the future you added under "Site Collection Features"

Friday 3 May 2013

SP2010: Adding tabs to your mySite

Hi,

Had to add a tab to a mySite Host.

it Is actually pretty simple.

Go to your mySite Host, Site Settings, Under look and feel there is a quick launch.

Add it there.

Depending on what you want to add, i created a new List and under the url added the url for the list...This will open in a new window.

To open the tab the same way the other tabs open (Keeping the user profile box) you need to use ASPMenu.
Have not done this but you will prob get a solution if you include ASPMenu in your search



Win 8: Enable .net 3.5 on Win 8

Hi,

This is not Sharepoint but always find myself googleing for the command...
In Windows 8 if you goto add windows components there is a error...Dont know when this is going to be fixed.

What you do:
Insert win 8 dvd.

Open command prompt(i open as Admin)
Run this command:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxs
Make sure you change the path of the cd rom to the correct one.


And now it should be installed

Thursday 2 May 2013

SharePoint Anti-Virus Exclusions

Hi,

Here is a short list of SharePoint A/V recommended exclusions:



Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions
Drive:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files
Drive: \Users\service account\AppData\Local\Temp\WebTempDir
Drive\ProgramData\Microsoft\SharePoint\

Drive\Users\the account that the search service is running as\AppData\Local\Temp
Drive:\WINDOWS\system32\LogFiles


Drive:\Program Files\Microsoft Office Servers\14.0\Data. (This folder is used for the indexing process. If the Index files are configured to reside in a different folder, you also have to exclude that location.)

Drive:\Program Files\Microsoft Office Servers\14.0\Logs (If the location of log files have been changed, the new location will have to be excluded)

Drive:\Program Files\Microsoft Office Servers\14.0\Bin
Drive:\Program Files\Microsoft Office Servers\14.0\Synchronization Service
Any location you chose to store Disk-based BLOB cache.

This is based on SP2010 but should be similar in other versions as long as you update the "14" to what ever version you are running.