Sunday, May 24, 2015

How to Uninstall SharePoint 2013 - Complete Steps

Its a pretty common question and we stuck here often: How to Uninstall SharePoint 2013 completely from the server? Remove Server option From Central Administration >> Servers in Farm page? NO!! You can't uninstall SharePoint 2013 with this option. Remove server option must be used only when a particular server is no longer available and you want to remove it from your SharePoint farm.

Follow these steps to uninstall SharePoint 2013.
  • Go to Control Panel (Shortcut: Appwiz.cpl ), Pick Microsoft SharePoint Foundation 2013 (or Server!) and click on "Change" button.uninstall sharepoint server 2013
  •  In the Change your installation of Microsoft SharePoint Server 2013 page, Choose Remove, and then click Continue.how to uninstall sharepoint 2013
  • A confirmation message appears. Click Yes to remove SharePoint 2013.
     uninstall sharepoint 2013 server
  • A warning message appears. Click OK to continue.
     uninstall sharepoint 2013 manually
  • Watch the uninstall progress..
    how uninstall sharepoint 2013
  • Wait for the "Successfully uninstalled" message.
But wait! When you uninstall SharePoint 2013 with above steps, most of the files and folders are deleted. However, There are objects that needs our manual intervention.

Clear IIS Sites and Virtual Folders. Remove physical files 
We got to manually delete web applications created in IIS and their virtual folders from the file system.

Delete Search Index Files:
In search index servers, remove the search index manually. To get search index files location, Run these PowerShell cmdlets:
$SearchInstance = Get-SPEnterpriseSearchServiceInstance
$SearchInstance.Components

Delete IIS Log Files:

Delete 14/15 Hive customizations:
 
Delete the SharePoint Databases from Database Server:
Uninstalling SharePoint 2013 dismounts SharePoint databases from its web applications. But it doesn't remove any physical file stored in the database server. So, remove them all!

Technet reference on Uninstall SharePoint 2013: https://technet.microsoft.com/en-us/library/cc262874.aspx

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Five Challenges in SharePoint Security
...And How to Solve Them. Free White Paper
*Sponsored


Monday, March 30, 2015

Required Field Validation Based on Another Column's Value in SharePoint 2013

Requirement: In a custom SharePoint 2013 list, User's requirement is to validate a required field based on another field's value.

E.g. In a "Project Cost" list, user must fill "Budget Amount" field value if "Budget Approved" field's value is set to "True".

Solution: Here is how to implement a required field validation based on other column's value in SharePoint 2013.
  • Head on to List Settings
  • Click on "Validation settings" under "General Settings"
  • Enter the validation formula as: =IF([Budget Approved?]=TRUE,IF([Budget Amount]="",FALSE,TRUE),TRUE)
  • Enter the user (error) message accordingly. I've entered "If Budget is approved, you must specify the value of Budget Amount!".sharepoint 2013 required field validation
  • Click "OK" to save your changes
and the result in action:
Required Field Validation Based on Another Column's Value in SharePoint 2013

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Five Challenges in SharePoint Security
...And How to Solve Them. Free White Paper
*Sponsored


Saturday, March 14, 2015

How to Disable "Open with Explorer" View in SharePoint 2013

Requirement: Got a requirement to Hide "Open with Explorer" button from a particular library's ribbon menu due to some security reasons.

Solution: Open with Explorer button can be disabled in multiple approaches.
  1. Disable "Client Integration" from Web Application's Authentication Providers.
  2. Remove permissions "Use Remote Interfaces" which also removes "Use Client Integration Features" from permission levels.
  3. Edit the "CustomDefalutTemplates.ascx" file located at: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES. Find and Replace PermissionString from "UseClientIntegration" to PermissionString="MangeWeb" of nodes with ID "OpenInExplorer"
  4. CSS/JavaScript-jQuery methods to Turn-Off explorer view.
  5. Create a custom action with EMPTY CommandUIDefinition, so that it overrides existing ribbon button.
Lets stick with the last one!

Add Custom Action to Hide Open with Explorer:
While any ribbon button, group, tab can be hidden by overriding the specific custom action using Visual Studio based solution as in How to Hide SharePoint 2010 Ribbon Button, Group, Menu, Tab, Here I'm using PowerShell to add/remove custom action to hide Open with Explorer view in SharePoint 2013.
disable open with explorer in sharepoint 2013
Add custom action to disable Open with Explorer button in SharePoint 2013:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Variables
$SiteUrl="http://operations.crescent.com/Monitoring" 
$ListName = "2015 Documents"

#Get Web and List objects
$web = Get-SPWeb $SiteURL
$list = $web.Lists[$ListName]

#Add an empty Custom Action to Override default custom action
$CustomAction = $list.UserCustomActions.Add()

$CustomAction.Title = "Hide Explorer View"
$CustomAction.Location = "CommandUI.Ribbon"
$CustomAction.commandUIExtension = "
            <CommandUIExtension> 
               <CommandUIDefinitions> 
                     <CommandUIDefinition 
                             Location='Ribbon.Library.Actions.OpenWithExplorer' /> 
                     </CommandUIDefinitions>
              </CommandUIExtension>" 

$CustomAction.Update();

write-host "Custom Action has been Added successfully!" 
and our Output! hide open with explorer button in SharePoint 2013
Delete the custom action from list:
Lets remove the custom action we've created to hide Open with Explorer button.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Variables
$SiteUrl="http://operations.crescent.com/Monitoring" 
$ListName = "2015 Documents"
$CustomActionTitle = "Hide Explorer View"

#Get Web and List objects
$web = Get-SPWeb $SiteURL
$list = $web.Lists[$ListName]

#Get the custom action
$CustomAction = $list.UserCustomActions | where {$_.title -eq $CustomActionTitle} 

#Delete the custom action from list
if ($CustomAction)
{
    $CustomAction.Delete()
}

You can also remove a custom action from SharePoint list via SharePoint designer, as in below screen:
remove custom action from sharepoint designer 2013

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Five Challenges in SharePoint Security
...And How to Solve Them. Free White Paper
*Sponsored


Saturday, March 7, 2015

"Upgrade Required" Status in SharePoint 2013 Central Administration Servers in Farm

Getting "Upgrade Required" error message in SharePoint 2013? Well, Ideally, We have to run the SharePoint Products Configuration Wizard on the server(s) right after installing the service pack/patches.

In Windows Server 2012, SharePoint updates are part of Windows Server Update. It installs patches but never runs Products configuration wizard automatically! You still have to run psconfig wizard to complete patching!
sharepoint 2013 upgrade required error
SharePoint Patching is a two-step process:
  1. Install the patch binaries
  2. Run psconfig wizard manually.
Launch and run SharePoint configuration wizard to perform the configuration tasks. Once its finished, You should see  "No action Required" message in farm information status instead of upgrade required.
sharepoint 2010 central administration upgrade required
If you get any errors while running psconfig, the next step is to force SharePoint upgrade with this command line:
psconfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

If you are using SQL aliases, make sure its configured in Every SharePoint server!

To apply patches on SharePoint 2013, Follow my step by step guide at: SharePoint 2013 Patching Guide - Step by Step

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Five Challenges in SharePoint Security
...And How to Solve Them. Free White Paper
*Sponsored


Wednesday, February 18, 2015

How to Hide Share, Follow and Sync Buttons in Sharepoint 2013

We got a requirement to remove Share, Follow and Sync buttons in SharePoint 2013. Let me summarize various ways to disable these buttons.
sharepoint 2013 disable share, follow, sync buttons
How to disable "Share" button in SharePoint 2013?
Share button is relying on "Access requests" configuration of the site. To disable "Share button" in SharePoint 2013, simply disable access requests.
  • Go to Site settings page of your SharePoint site.
  • Click on "Site Permissions" link under "Users and Permissions" group
  • Click on "Access Request Settings" in the ribbon.
  • Uncheck "Allow access request" and click on "Ok" to save your changes. This should hide Share button in SharePoint 2013.sharepoint 2013 disable share button
Remember, You will have to do this change for each site! However, Share button will still be visible for Site owners and administrators!

How to Disable Sync buttons in SharePoint 2013
To disable sync, Navigate to  Site settings >> Click on "Search and offline availability" >> set offline client availability to "No". There are few more ways discussed in my another article: Hide Sync Button in SharePoint 2013

How to disable "Follow" button in SharePoint 2013?
To disable "Follow" button in SharePoint 2013, You'll have to disable a feature called "Following Content". Navigate to:
  • Site Settings >> Click on "Manage Site Features"
  • Click on "Deactivate" on " Following Content" feature
This removes following button in SharePoint 2013. If you want to disable "Following" feature at Farm level, disable "ContentFollowingStapling" feature at Farm features page in SharePoint 2013 Central Administration.

Disable Access Request, Deactivate Features using PowerShell:

  • Share: To disable access requests on all sites using PowerShell, refer: Disable access request in SharePoint 2013
  • Following: To deactivate "Following content" feature using PowerShell as:
    Disable-SPFeature -identity "FollowingContent" -URL "http://your-sp-site.com/" 
  • Sync: To exclude from offline client, run:
    Get-SPSite -limit all | get-SPWeb -limit all | Foreach { $_.ExcludeFromOfflineClient=1; $_.Update()} 

Remove Share, Follow, Sync buttons at Master page level:

These promoted action buttons are in master page as follows:
Share Button:
Follow Button:
<SharePoint:DelegateControl ID="DelegateControl2" runat="server" ControlId="PromotedActions" AllowMultipleControls="true" />
Sync Button:
<SharePoint:SPSyncPromotedActionButton ID="SPSyncPromotedActionButton1" runat="server" />
To hide these controls, simply move them inside Comment block. <!--  -->. Do not delete this controls from the Master page! You'll end-up in crash!!

CSS to hide Share, Follow and Sync Buttons:

Lets hide them based on their IDs. You can place this CSS code with "Script Editor" web part or you can place it in Master page.
  • Sync button's id: ctl00_SyncPromotedAction
  • Follow button id: site_follow_button
  • Share button's id:  ctl00_site_share_button
<style type="text/css">

a[id$=site_share_button], a[id$=SyncPromotedAction], a#site_follow_button
{
    display: none !important;
} 

</style>
Tips: This hides Share button from promoted actions section. But share button is present in ECB/Callout menu and in list view quick control also. To hide them all as well, use selectors:  a[id$="site_share_button"], a.ms-calloutLink[title="Share"], button.js-listview-qcbShareButton.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Five Challenges in SharePoint Security
...And How to Solve Them. Free White Paper
*Sponsored


You might also like:

Related Posts Plugin for WordPress, Blogger...