Wednesday, November 30, 2011

Timer Job with configuration settings

Hi
While searching for a better way to have dynamic settings when creating timer jobs ...
Timer job with configuration settings

This really helped me out ....

Regards
Bradley Chetty

Tuesday, November 29, 2011

Information Worker Event

Hi
I presented at IW CPT ...
it was great fun ...and hope to do it again soon....
for all that attended thanks for taking the time to attend .....  it is much appreciated...
here is my slide deck...
also here is the PowerShell script to move the users......

//**************************BEGIN CODE*************************************
param([string]$url = (Read-Host "Enter the Url of the Web Application: "), `

[string]$oldprovider = `(Read-Host "Enter the Old Provider Name (Example -> Domain\ or MembershipProvider:) "), `
[string]$newprovider = `(Read-Host "Enter the New Provider Name (Example -> Domain\ or i:0#.f
MembershipProvider
) "))
add-pssnapin microsoft.sharepoint.powershell -EA 0
# Get all of the users in a site
$users = get-spuser -web $url
# Set a conversion flag which will later be used to verify if you want to continue processing
$convert = $false
# Loop through each of the users in the site
foreach($user in $users)
{
# Create an array that will be used to split the user name from the domain/membership provider
$a=@()
$displayname = $user.DisplayName
$userlogin = $user.UserLogin
# Separate the user name from the domain/membership provider
if($userlogin.Contains(':'))
{
$a = $userlogin.split(":")
$username = $a[1]
}
elseif($userlogin.Contains('\'))
{
$a = $userlogin.split("\")
$username = $a[1]
}
# Create the new username based on the given input
$newalias = $newprovider + $username
if (-not $convert)
{
$answer = Read-Host "Your first user will be changed from $userlogin to $newalias. Would you like to continue processing all users? [Y]es, [N]o"
switch ($answer)
{
"Y" {$convert = $true}
"y" {$convert = $true}
default {exit}
}
}
if(($userlogin -like "$oldprovider*") -and $convert)
{
move-spuser -identity $user -newalias "$newalias" -ignoresid -Confirm:$false
}
}
//**************************END CODE*************************************

Sunday, November 13, 2011

SharePoint 2010 SP1 + Cumulative update

Hi.

On the 12-11-2011 I installed SharePoint 2010 SP1 ....
There were alot of lessons learnt and i will do a post-upgrade document which will document all the workarounds/fixes to get this update installed.
this will be done in a few days ...

Regards
Bradley Chetty

Thursday, September 15, 2011

User Profiles not Synching after an Upgrade to Sharepoint 2010

Hi .
an issue was brought to my attention from 1 of my clients ....
after an upgrade the users were not receiving any alerts or emails when tasks were being assigned.
ok ..so first port of call being to check and see exactly where things go pear shaped .....
I looked at he exchange event logs and found out  that the email message is coming through but with all the wrong email address .... weird  ...so a full AD Sync was done and still the issue persists ...
hmmm ..... *scratching my head ...*
then i started looking at the 2007 Plumbing which the upgrade was built on ....
i then found the user list  ......and PRESTO ......this is where it was getting all the OLD email values ...

SOLUTION:
Delete the entries in the user list and Re-Sync the AD ... this is what solved my problem .. :)

Regards
Bradley

Friday, September 9, 2011

Error MOSS MA not found whill creating a Synch Connection string

Hi.
While doing a rountine Health check on a Application sharepoint server ...i noticed that the synchronisation connection that i set up before just DISSAPEARED .... :(
so i tried to create  a new connection and got this error ....
so to fix this you RESTART the 2 Forefront Identity Services and then stop and restart the User profile Synchronization service ....
Then just go back to the Synchronization connection and you should see your old connection  .... just RUN the Synch Job and you are done ...

Regards
Bradley

Wednesday, September 7, 2011

Friday, August 26, 2011

Tuesday, August 23, 2011

TechEd 2011 in Durban ICC

Hi.
So who else will be attending this event ...
It will be taking place in Durban 17th till the 20th  of October 2011 ...
Here is a link if more information is required ... http://www.teched.co.za/.

Regards
Bradley

Thursday, August 18, 2011

Getting a "Created By" field and assigning its value to an SPUser object

Hi.
i always have to get the SPUser object and i always forget so i guess i will document it so i can refer back to it  .... here goes ..

SPUser spUser = null;

SPFieldUser field = itemEvent.Fields.GetFieldByInternalName("Author") as SPFieldUser;
if (field != null && itemEvent["Author"] != null)
{
SPFieldUserValue fieldValue = field.GetFieldValue(itemEvent["Author"].ToString()) as SPFieldUserValue;
if (fieldValue != null)
{
spUser = fieldValue.User;
}
}

Nice and simple  ...and works like a charm ... :)

Bradley

Tuesday, August 16, 2011

A Microsoft SharePoint Foundation compatible application could not be found

Hi.
this has been a nagging issue with a prestine 2010 Upgrade from 2007 ..
some users were getting the error "The Document could not be opened for editing.  A Microsoft Sharepoint Foundation compatible application could not be found to Edit the document."

So i searched through all the articles on Google but all of these were for Sharepoint 2007  with office 2007 or earlier, which did not solve my problem ....

So the solution that solved my problem was to enable SharePoint Support features and you do this by going to Control panel => Programs and features => go to the office installation and click "Change" => then change the following feature  SharePoint Support features to "Run from my computer".
once this has been done Restart the computer.....
then go to control panel again and run a REPAIR on the office installation......
restart the computer and you should be good to go ....

this is what worked for one of my clients ....

Sharepoint 2010 Orphaned Workflows

Hi.
Orphaned workflows are workflow tasks and those associated items which have been deleted but sharepoint still keeps a tally of the number of workflow instances running.
i remember in MOSS 2007 that we had to write a script in order to remove Orphaned workflows  ....
Not anymore and SharePoint 2010 has made it so much easier ....
In order for the orphaned workflows to be deleted all that is needed to be done is to EMPTY the Recycle bins at the SITE level and then at the SITE COLLECTION level.
and presto ... the orphaned workflows have been removed.

Regards
Bradley

Tuesday, June 14, 2011

SharePoint Term Store Link Hidden

Hi.

i just thought i would post this  ...
i created a site and used the BLANK Template and then i tried to create Taxonomy Structure ...
but the Terms Store link was nowhere to be found ..

Check the solution here

regards
Bradley Chetty

SharePoint 2010 Support Checklist

Hi.
There was a need for a SharePoint Support Checklist as support was becoming reactive rather than preventive.  So I have setup a weekly Support check where we log on to the SharePoint Environment and perform a few checks  for instance Crawls, backup ....Etc

Support Checklist SharePoint (Farm Environment)


1. Backup:
Verify that the previous backup operations completed.
STSADM Backup .
PowerShell Script Backup .
SQL Backup .
VM Backup .

2. Content Crawl:
Browse to the Search Administration Page and make sure the crawls are running. Check the full and incremental crawls.

Also check the crawl logs and pay particular attention to the errors.
Full Crawl.
Incremental.
Log Crawl Errors.
3. Check Event Log:
Please prioritize and rank the errors in the event log and then report it to the respective Support Teams.

4. Check Central Administration Issue List:
Please prioritize and rank the errors in the issue list and then report it to the respective support teams.

5. Check HDD Space:
Central Administration warnings will be issued if your C: partition doesn't have double your "physical" RAM free. Although this approach is recommended, our client’s environments are not ideal so make sure there is at least 20 Gigs free space on the c:\ on each server on the farm.

Server 1 >20 Gigs free

6. *Liaise with Users Directly:
This should be done on a monthly basis and it will strengthen relationships with clients.

7. Check CPU and Memory Performance:
Open up Task Manager and verify that the CPU usage is below an average threshold for 50 % for CPU and memory usage is below an average threshold of 70%. Make sure that a crawl isn’t currently in progress.

CPU <50%
Memory <70%

8. Check IIS and services:
Make sure all the application pools are started. Do not attempt to start any application pools rather log a call to the respective Support team.
Also check the various services are started on the server:
All Sharepoint service. e.g SharePoint timer
SMTP service if applicable

9. Check the size of the site collections:
Log on with farm credentials and check the size of the site collections.

10. Check SharePoint Server usage in Web Analytics reports:
Spot check on these reports to make sure that the predefined jobs are running and web analytics for the site is pulling data.

11. Hotfixes and service packs:
Make sure there are no service packs or updates waiting to be installed. Please let the respective Support Teams know of the updates / cumulative updates waiting to be installed. Company policy will have to be ahered too with regard to the updates/service packs.

Tuesday, June 7, 2011

SharePoint 2010 Upgrade

Hi.
While doing a Upgrade from SharePoint 2007 to SharePoint 2010 a few issues i came across.

Issue1:
When i did the backup of the 2007 environment it was in a read-only state ... i then proceeded to restore this DB to the new server and then upgrade the DB.  all went along fine until i wanted to do the Visual Upgrade and the options were grayed out?
Solution: i went back to the 2007 environment and switched it off read-only mode did the backup and restored that backup ..and PRESTO ..the options were there ....

Issue2:
I had a lot of health issues with regard to the clean install.  you can either go and disable the rules like this  or you can work thru each one.  most of then had a "Fix Automatically" which you should do and SharePoint tries to resolve it.

Issue3: the farm account needed "Replicated Directory Changes Permissions" in AD.  Solution: just give it permissions by following the article.

Issue 4: when a people search was done the url that it linked too ould not resolve ...
when i had setup mySite i provided it with a path that it should use but ALAS!!! ...it doesnt do this. Solution: you would need to run crawl on the content sources and make sure the crawl account used has access to the Service "User Profile Service Application".

Issue 5: when completing the final step and moving users into the SharePoint ... please make sure that the users exist in the new Domain .....
so now i have a sucessful Upgrade from SharePoint 2007 to SharePoint 2010  complete with MySites and public profiles .......DONE!!!!!!!!!1

Just a side note ...the hardest part was getting the User Profile Synchronization job to work.
a very exciting project which i really enjoyed ...

Till the next issue/problem
Bradley

Thursday, May 19, 2011

Remove the !NEW icon to newly added List Items - SharePoint 2010

I have a client that wants the New! icon to not be shown for newly created list items ....
i tried to look for a powershell script but ALAS .... back to old faithful  :)
So it was simple
just open a powershell window and type this
stsadm -o setproperty -pn days-to-show-new-icon -pv "VALUE" -url http://sitecollection/
where the  "VALUE" is the number to either extend as in 1 ...2 .. days or 0 to not show it at all.

here is the MSDN link
http://support.microsoft.com/default.aspx?scid=kb;en-us;825510&Product=spts

Regards
Bradley Chetty

Thursday, March 3, 2011

Sharepoint 2010 Expanded views just shows "Loading" ....

Just came accross this issue on a SharePoint 2010 implementation.
Set the scenario: basic team site with view of document libraries which are categorised by fields....

Problem Statement:

If a few views are expanded on the homepage and you click on a link to be directed to a different page. Then the “back” browser button is pressed.
The page then tries to recreate the view that were loaded previously and fails.

Solution(Short Term):
Close all open views on the page and refresh (Ctrl + F5). This should reload the page and all data will be visible.

Just a little fix for this issue until i can find a long term solution ...