RSS

Category Archives: SharePoint 2010

Configure Outgoing E-Mail Settings for SharePoint 2010 / 2013 to using Office 365 or GMail Relay


Any SharePoint Client, User, or Developer need an SMTP server to send e-mails to Internal or External SharePoint site users from a Workflow, Alerts, Request Site Access, and/or Any custom Apps that use SharePoint Outgoing e-mail setting to send e-mails.

SharePoint cannot be configured to send e-mail over encrypted port to the e-mail service. And Office 365 and Gmail required an SMTP connection that supports TLS encryption Surprised smile.

Fortunately, Windows Server (2008-2012) supports an SMTP relay for Office 365 and Gmail by install a local SMTP Rely Server that supports an encrypted connection (over TCP Port 587) Disappointed smile.

The Steps are easy and forward:

  1. Install SMTP Role (Windows Server 2008 and 2012)
  2. Configuring SMTP Service to Relying to Office365/Gmail SMTP
  3. Testing the SMTP Service Connection
  4. Configuring Outgoing E-Mail settings in SharePoint Servers
  5. Test Sending an E-mail from SharePoint Site

The following is the detailed steps:

Read the rest of this entry »

 

Tags: , , , , , , , , , , , , , ,

Hiding a SharePoint 2010/2013 Disabled Ribbon Buttons By User Permissions Using CSS


Many SharePoint users asking “Can we hide Ribbon buttons for current login user (by his permissions) rather than show it as disabled button !?

The answer is YES. When user did not have contribute permissions (like Add Item, Edit Item …etc.), these buttons will be shown in the Ribbon, but not active (Disabled), so the Ribbon button will not be clickable as following:

In SharePoint 2010
image

In SharePoint 2013 / Online
image

So, to hide these buttons in easy and simple way, we will use an existing CSS class in SharePoint 2010, 2013, and Online version. The CSS class name is “.ms-cui-disabled”, and this CSS class is added to all disabled buttons in the Ribbon?!? So the idea is to override the behavior of this CSS class in Master Page and hide any button that use this CSS class.

Read the rest of this entry »

 

Tags: , , , ,

Step by Step: Install SQL server 2008 R2 for SharePoint 2010


This article contain detailed steps to install SQL server 2008 R2 with best practices and guidelines from Microsoft and other many blogs over the internet, and I try to put all these best practices and guidelines in one article with step by step installation guide.

Pre-Installation Steps

Before install SQL server 2008 R2, we need to check the pre-install requisites:

Operating Systems Requirements:

  • Plan to install SQL on a NTFS file system
  • Do no try to install SQL Server on a compressed, encrypted or read-only drive, because setup will block the installation
  • Do not install SQL Server on a Domain Controller.
  • Verify Windows Management Instrumentation service (Control Panel -> Administrative Tools -> Services) is running
  • Configure your firewall to allow SQL Server access. Click here for more information about protocols and port numbers
  • Create dedicated service account for each service to be installed. Ensure that these accounts are not member of Local Administrator because it will give unnecessary rights to these accounts, see SQL services accounts
  • The user account that is running SQL Server Setup must have administrative privileges on the computer, see SQL services accounts
  • Group all SQL services accounts in one AD Organization Unit for easy management and understandable hierarchy.
  • At least 6.0 GB of disk space are required by SQL Server setup

Additional software requirements and hardware requirements:

  • Enable .NET Framework 3.5.
  • PowerShell 2.0.

Note: run Windows Updates to get latest updates after install and check all previous requirements.

Read the rest of this entry »

 

Tags: , , , , , ,

Export and/or Import All Farm Solutions in SharePoint 2010/2013 Farm using PowerShell


Sometimes you may need to export all SharePoint 2010/2013 farm solutions as a backup process or to deploy them from staging environment to production environment.

Export Farm Solutions

  1. Create a backup folder on “C” and give it a meaningful name like “SP2010 Farm Solutions Backup”.image
  2. Open SharePoint 2010 Management Shell
     image
  3. Change directory or navigate to backup folder
     image
  4. Enter the following Script to extract all farm solution to current location directory

    (Get-SPFarm).Solutions | ForEach-Object{$var = (Get-Location).Path + “\” + $_.Name; $_.SolutionFile.SaveAs($var)}
     


    image

    image

  5. Go and open the target folder to see all exported solutions Smile

Import Farm Solutions

After copy the folder that contains exported solution on production or target farm server.

  1. Open SharePoint 2010 Management Shell
  2. Change directory or navigate to folder that contains all solutions to be deployed
  3. Enter the following Script to extract all farm solution to current location directoryGet-ChildItem | ForEach-Object{Add-SPSolution -LiteralPath $_.Fullname}

     image
  4. So all solutions are added to the target farm.

For more information about adding and deploying SP2010 Farm solution, please to open and read Adding and Deploying SharePoint 2010 .WSP Solutions

Same scripts can be used for SharePoint 2013 Farm Solution

I Hope this useful for you,

Thanks.

 

Tags: , , , , , , , , ,

OOB: How to Add YouTube or Embed Video to SharePoint 2010 Page Content


Many of SharePoint 2010 users like to add YouTube video or embedded videos to their content pages, and it is easy and fast to do that by using OOB Content Editor Web Part.

The following is the fast steps to do that:

  1. Go to YouTube video page and click on SHARE button, then click on Embed button. Click on “Use old embed code” checkbox and select the preferred width and height for your video.

    youtubeEmbed

  2. Copy the code in the text area and go to your SharePoint page, and click on Edit Page button.

    image

  3. From the Ribbon, Insert a Content Editor Web Part

    image

  4. Click on Edit Web Part to add the content
    image
  5. From the Format Text Tab in Ribbon, Select and Click on Edit HTML Source,  and Paste the Embedded Code on Text Dialog
    image

    image

  6.  Click on OK button and Save and Publish the page to see you’re YouTube Video Smile

    image

 

I Hope this useful for you,

Thanks.

 
Leave a comment

Posted by on August 10, 2012 in General, SharePoint 2010

 

Tags: , , , , ,

From The Field: Move a Site Collection to New Content DB with New Managed Path


Many of clients have multiple site collection stored in the same content DB of the web application. And in some day, they will discover that one of site collection contents is growing so fast, and they decide to have a dedicated Content DB for this Site Sollection. Also they may want to change the Managed Path (url) of site, i.e.: from “http://hostheader/sites/sitename” to “http://hostheader/sitename”.

In this article, I will explain how I did these requirements in the following scenario:

1. I have a web application with url (http://sps:1), and all site collection under this web application shared the same Content DB (Name: WSS_SP01_Content_01)

2. I have 2 Site Collection (Host Header Root Site and HR Site):

  • Main portal Site Collection under Host Header Root Managed Path (/)


  • HR portal site collection under the managed path (/sites/hr/)


  • I want to move the “HR” site to a new Content DB called(WSS_SP01_HR_Content_01)
  • I want to change the url from (/sites/hr/) to (/hr/).

The Steps are (using PowerShell):

1. Open PowerShell – SharePoint 2010 Management Shell

2. Create Explicit Managed Path for target Web Application, and call it “hr

  • Enter the following line in PowerShell:
    New-SPManagedPath -RelativeURL “hr” -WebApplicationhttp://sps:1” –Explicit
  • The PowerShell Results are:

  • Check it from Central Administration > Manage Web Applications > Managed Path:

3. Create a new Content DB called “WSS_SP01_HR_Content_01”

  • Enter the following line in PowerShell
    New-SPContentDatabase -name “WSS_SP01_HR_Content_01” -WebApplicationhttp://sps:1” -MaxSiteCount 1 -WarningSiteCount 0
  • Max Site Count = 1, to make sure No farther Site Collection can be added to this Content DB
  • The PowerShell Results are:

  • Check it from Central Administration > Manage Web Applications > Managed Content Databases:

4. Back up Site Collection “/sites/hr” to prepare moving it

  • Enter the following line in PowerShell::
    Backup-SPSitehttp://sps:1/sites/hr” -Path “C:\HR_TempSC.bak” –force
  • Check the file on “C” Drive

5. Removing the Site Collection from old managed path

  • Enter the following line in PowerShell::
    Remove-SPSite -Identityhttp://sps:1/sites/hr” -GradualDelete -Confirm:$false
  • Check the current number of Site Collection of Main Content DB (WSS_SP01_Content_01) , It should be 2 ( minus the HR Site Collection)

6. Restoring Site Collection to new Managed Path “/hr

  • Enter the following line in PowerShell::
    Restore-SPSitehttp://sps:1/hr” -Path “C:\HR_TempSC.bak” -DatabaseServer “SPS” -DatabaseName “WSS_SP01_HR_Content_01” -GradualDelete -Force -Confirm:$false
  • Check the current number of Site Collection of Main Content DB (WSS_SP01_HR_Content_01), It should be “1”

7. Remove the backup files from the backup directory

  • Enter the following line in PowerShell:
    Remove-Item “C:\HR_TempSC.bak”

8. Check the old url of HR, It should be not exists


9. Check the new HR Site Collection url “http://sps:1/hr” :

10. Check the Site Collection Properties, Central Admin > Application Management > View all site collections

Conclusion

I move and change the managed path of the site collection as simple as described before using PowerShell script. It is easy, clear, and save my time. and the following is the list of scripts i used in article:

  1. New-SPManagedPath -RelativeURL “hr” -WebApplicationhttp://sps:1” -Explicit
  2. New-SPContentDatabase -name “WSS_SP01_HR_Content_01” -WebApplicationhttp://sps:1” –MaxSiteCount 1 -WarningSiteCount 0
  3. Backup-SPSitehttp://sps:1/sites/hr” -Path “c:\HR_TempSC.bak” -force
  4. Remove-SPSite -Identityhttp://sps:1/sites/hr” -GradualDelete -Confirm:$false
  5. Restore-SPSitehttp://sps:1/hr” -Path “C:\HR_TempSC.bak” -DatabaseServer “SPS” -DatabaseName “WSS_SP01_HR_Content_01” -GradualDelete -Force -Confirm:$false
  6. Remove-Item “c:\HR_TempSC.bak”

For farther information about Windows PowerShell for SharePoint 2010, you can visit: Windows PowerShell for SharePoint Foundation 2010 reference

I Hope this useful for you,

Thanks.

 

Tags: , , ,

Speaking at SharePoint Saturday Jordan 2011 – Students Edition



As a part of SharePoint Saturday Jordan events, 1-October-2011. I present a session about “SharePoint 2010 Sites” and the topics include:

  • What is A “Site” ?
  • SharePoint 2010 Sites
  • SharePoint 2010 Cool Features
  • SharePoint 2010 OOB Web Parts

Click on the following link to download my presentation : Ali Nimer Mustafa – SharePoint 2010 Sites

 
1 Comment

Posted by on October 1, 2011 in Presentations, SharePoint 2010

 

Tags: ,