Monday, March 25, 2013

Use custom favicon in SharePoint 2010 Master Page


Follow the steps to use custom favicon in SharePoint 2010 Master Page
  1. Open SharePoint Designer 2010
  2. Locate master page file in SharePoint Designer 2010
    Note: Default location of master page files: All Filesà_catalogsàmasterpage
  3. Right click on the default master page file
    Note: By default v4.master is default master page file
  4. Check Out master page file and open in Advanced Mode by right clicking to the file
  5. Find “SharePoint:SPShortcutIcon” tag in HEAD section of the content
  6. Replace IconUrl value with custom icon file
    Example:
    <SharePoint:SPShortcutIcon runat="server" IconUrl="/images/custom_icon.ico" />
  7. Save file and check in all the changes
  8. Publish and Approve the changes
Contact Me for any technical help related with SharePoint 2010.

Wednesday, March 20, 2013

Empty Site Collection Recycle Bin using SharePoint 2010 Management Shell (PowerShell)

Follow the steps to Empty Site Collection Recycle Bin using SharePoint 2010 Management Shell (PowerShell):
1.   Open SharePoint 2010 Management Shell with Run as administrator

2.   Modify Site collection Url in following script and execute:

$sitecollectionUrl = "http://site:port/sitecollection"

$siteCollection = New-Object Microsoft.SharePoint.SPSite($sitecollectionUrl)
write-host("Items to be deleted : " +$siteCollection.RecycleBin.Count.toString())
$now = Get-Date
write-host("Deleting started at " +$now.toString())
$siteCollection.RecycleBin.DeleteAll();
$now = Get-Date
write-host("Deleting completed at " +$now.toString())
$siteCollection.Dispose(); 

Contact Me for any technical help related with SharePoint 2010.

Tuesday, March 19, 2013

Create new SharePoint List Item using SharePoint 2010 Management Shell (PowerShell)

Follow the steps to create new SharePoint List Item using SharePoint 2010 Management Shell (PowerShell):
1.       Open SharePoint 2010 Management Shell with Run as Administrator

2.       Modify and execute following script:

#Web absolute URL where list exists
$webURL = "<http://site:port/site/subsite>" 

#SPList Name where items to be added
$listName = "<List Name>" 

#Get the SPWeb object and save it to a variable
$web = Get-SPWeb $webURL 

#Get the SPList object to retrieve the List
$list = $web.Lists[$listName] 

#Create a new item
$newItem = $list.Items.Add() 

#Add properties to this list item
$newItem["Title"] = "Title Text"
$newItem["Description"] = "Description Text" 

#Update the object so it gets saved to the list
$newItem.Update()

$web.Dispose()

Contact Me for any technical help related with SharePoint 2010.

Monday, March 18, 2013

Determine Site / Site Collection Size (SharePoint 2007 & 2010)


1.   Open SharePoint 2010 Management Shell / Windows Command Prompt with Runas Administrator

2.   Enter below command to access "stsadm.exe" and press enter
cd "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN"
(Replace 14 by 12 for SharePoint 2007)

3.   Type below command and press enter
STSADM.exe -o enumsites -url "<Url of the web application>"
4.   Command will give text output where you can see site/site collection details like:
a.   Url
b.   Ower
c.   Content Database
d.   Storage Used MB
e.   Storage Warning MB
5.   Modify the command with text file path to get output in text file
Example:
STSADM.exe -o enumsites -url "<Url of the web application>" > c:\SiteDetails.txt

Contact Me for any technical help related with SharePoint 2010.

Wednesday, March 6, 2013

Open SharePoint Designer 2010 with Different User

Follow the steps to open SharePoint Designer 2010 with Different User
 

1.   Open windows command prompt by hitting "cmd" in Run 
2.   Enter the below command,
For 64bit, 
runas /profile /user:<domain\username> "c:\program files\microsoft office\office14\spdesign.exe" 
For 32 bit, 
runas /profile /user:<domain\username> "C:\Program Files (x86)\Microsoft Office\Office14\spdesign.exe"

3.   Enter the password of the user when prompted 
4.   SharePoint Designer will get opened with Different User


Contact Me for any technical help related with SharePoint 2010.