Tuesday, November 25, 2014

Hide "Recent" from SharePoint 2013 Quick Launch Navigation

Recent section gets added automatically through a Web Control on SharePoint pages. 'Recent' menu is individual to each user! meaning everyone gets their own recent section with links to their recent activities! If you have a requirement to remove (or hide) the "Recent" menu header from the left navigation of SharePoint 2013, Here are some solutions:
sharepoint 2013 hide recent in quick launch
In Publishing sites, You can remove "Recent" section manually by going to : Site Settings >> Look and Feel >> Navigation (or Quick launch on Non-publishing sites!) .
hide recent in sharepoint 2013
How to hide recent in SharePoint 2013 using jQuery:
Edit the page, Add a script editor web part and place this code in it (or master page html)
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function() {
  jQuery(".ms-core-listMenu-item:contains('Recent')").parent().hide();
});
</script>

Hide recent heading in SharePoint 2013 Quick launch with PowerShell:
You can also remove "Recent" section using PowerShell by deleting recent header.

PowerShell script to delete recent group in SharePoint 2013 left navigation:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$web = Get-SPWeb "http://your-sharepoint-site-url"

#Process Quick launch
for ($i = $web.Navigation.QuickLaunch.Count-1; $i -ge 0; $i--)
{
    $node = $web.Navigation.QuickLaunch[$i];

    if($node.Title -eq "Recent")
        {
            $node.Delete();
            Write-host "Recent section removed from $($web.Title)"
        }
} 
You can restrict "Recent" menu by Creating a SharePoint group, Configure the audience targeting on the menu item only to the group!


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Cancel Workflows in SharePoint using PowerShell


Requirement: There was a large list with workflow attached to it. SharePoint Development team came with a requirement of cancelling multiple workflows running on these list items, nearly 2000!

While cancelling workflows on individual item is pretty straight forward, How about cancelling workflows on 1000's of items? Would be a daunting task, isn't it?

PowerShell Solution:
Well, PowerShell can help to cancel workflows in SharePoint. If you ever have to cancel multiple running workflows on all list items, use this PowerShell script:

Cancel all workflows on a list:
$web = Get-SPWeb "http://your-sharepoint-site-url"

#List Name
$list = $web.Lists["Your-List-Name"]

# Iterate through all Items and all Workflows on Items
foreach ($item in $list.Items) 
 {
   foreach ($wf in $item.Workflows) 
     {
 #Cancel Workflows        
 [Microsoft.SharePoint.Workflow.SPWorkflowManager]::CancelWorkflow($wf)      
     }
  }
To cancel all errored workflows use the condition as:
foreach ($item in $list.Items) 
 {
   foreach ($wf in $item.Workflows) 
     {
        if($wf.InternalState -match 'Error')
         {
     #Cancel Workflows        
            [Microsoft.SharePoint.Workflow.SPWorkflowManager]::CancelWorkflow($wf);      
         }
     }
 }
Lets target a particular workflow:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$web = Get-SPWeb "http://your-sharepoint-site-url"

#Get the List
$list = $web.Lists["Your-List-Name"]

#Get the specific workflow, Associated with the list
$WorkFlowToCancel = "Approval Workflow"

# Iterate through all Items and all Workflows on Items
foreach ($item in $list.Items) 
 {
   foreach ($wf in $item.Workflows) 
     {
     #Check for the particular workflow
        if( ($wf.ParentAssociation.Name -eq $WorkFlowToCancel) -and ($wf.IsCompleted -ne $true) -and($wf.StatusText -ne "Canceled"  )) 
        {
            write-host "Previous workflow status:"  $wf.InternalState
            #Cancel Workflow
            [Microsoft.SharePoint.Workflow.SPWorkflowManager]::CancelWorkflow($wf)      
            write-host "Workflow Cancelled at $($list.title)! "
        }
     }
  }

Related Post: How to Start a SharePoint Workflow using PowerShell

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Monday, November 24, 2014

Arrange Choice Field Radio Buttons Horizontally in SharePoint List Forms

Requirement is to arrange choice fields of Radio buttons to horizontally in a SharePoint 2013 custom list form:
How to arrange choice field options Horizontally?
Step 1: Create new Custom list form(Say: New.aspx) using SharePoint Designer, Edit the page in SharePoint designer, Find and wrap your choice field in <Span> tag to assign it a unique ID. E.g.optRegType.
<span id="optReqType">
 <SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="New" FieldName="Change_x0020_Request_x0020_Type" __designer:bind="{ddwrt:DataBind('i',concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Change_x0020_Request_x0020_Type')}"/>
       <SharePoint:FieldDescription runat="server" id="ff3description{$Pos}" FieldName="Change_x0020_Request_x0020_Type" ControlMode="New"/>
</span>

Step 2: In the custom list form, find the tag <AdditionalPageHead> and add this code just below it.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">

  $(document).ready(function() {
 var firstRadio = $("#optReqType table tbody tr td .ms-RadioText:eq(0)");
 $("#optReqType table tbody tr td .ms-RadioText:gt(0)").appendTo($(firstRadio));

  });
</script>
 
What If you have Multiple Choice Fields?
When you have multiple choice fields in the form, its better to create a function to arrange them horizontally.
<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">

 function alignOptions(fieldName)
 {
 var firstRadio = $("#"+fieldName +" table tbody tr td .ms-RadioText:eq(0)");
 $("#"+fieldName +" table tbody tr td .ms-RadioText:gt(0)").appendTo($(firstRadio));
 }
 
  $(document).ready(function() {

   //Call function to arrange Radio buttons horizontally
 alignOptions("optChgImpact");
 alignOptions("optChgPriority");

  });
</script>
Here is my screen:
SPServices Framework also offers this functionality:
http://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices.SPArrangeChoices

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Friday, November 21, 2014

Branding SharePoint 2013 Top Navigation Menu bar with Custom CSS

Branding SharePoint top navigation is one of the frequent requirement in SharePoint implementations. Here is my quick way to apply branding to SharePoint 2013 top navigation menu. 

Step 1: Create a custom CSS file with custom styles for your navigation menu (Find my CSS below!). Upload it either to site assets library/Master pages folder or to file system (/_Layouts/Styles/).

Step 2: Edit the HTML master page and add reference to your custom CSS.
Open the HTML master page of your site in SharePoint designer (by default: Seattle.html), Locate this chunk:
 <!--SPM:<SharePoint:CssRegistration Name="Themable/corev15.css" runat="server"/>-->
Add this line just below it:
<!--SPM:<SharePoint:CssRegistration Name="http://YOUR-SITE-COLLECTION-URL/SiteAssets/YOUR-CSS-FILE.css" runat="server" After="corev15.css" />-->
Rather hard-coding the URL, upload/deploy custom CSS to Master Pages folder and set the path as:
<!--SPM:<SharePoint:CssRegistration name="&lt;% $SPUrl:~site/_catalogs/masterpage/YOURFOLDER/YOUR-style-Sheet.css %&gt;" runat="server" after="SharepointCssFile" />-->

Custom CSS to Branding SharePoint 2013 Top Navigation Menu:
and my Custom CSS goes here:
 /*** Top Navigaion Menu Items container DIV ***/
.ms-core-listMenu-horizontalBox {
    background-color: #47A4D3;
}  
 
 /*** Top Navigaion Static Menu Items ***/ 
.ms-core-listMenu-horizontalBox li.static {
    border: 1px solid transparent;
    background: url("/_layouts/Images/selbg.png") repeat-x left top;
}

 /*** Top Navigaion Static Menu Item Links  ***/ 
.ms-core-listMenu-horizontalBox li.static > .ms-core-listMenu-item {
    color: #21374C;
    white-space: nowrap;
    border: 1px solid transparent;
    padding: 10px;
    padding-left: 20px;
    margin-right: 1px;
}  
 
  /* Top Navigation static Menu Item Links Hover Style  */
.ms-core-listMenu-horizontalBox li.static > .ms-core-listMenu-item:hover {
    background: url("/_layouts/Images/selbg.png") repeat-x left top;
    background-color: #0A85C4;
    color: #fff;
    text-decoration: none;
}
 
 /*** Top Navigaion Static Menu Selected ***/
.ms-core-listMenu-horizontalBox li.selected a.selected {
     /* Glass Effect Shade Image */
    background: url("/_layouts/Images/selbg.png") repeat-x left top;
 /* Glass Effect Shade Image */
    background-color: #0A85C4;
    color: #fff;
    text-decoration: none;
    border: 1px #134072 solid;
    padding: 10px 10px;
    margin: 1px;
}  

 /*** Sub-Menu/Flyover/Dynamic Menu Container ***/
ul.dynamic {
    background-color: #D5E4F2;
    border: 1px solid #000;
    padding: 1px;
    margin-top: 5px;
}  

/***  Sub-Menu Items (HyperLinks) Style ***/
ul.dynamic .ms-core-listMenu-item {
    background-color: #f7f7f7;
    padding: 10px 20px 10px 20px;
    white-space: nowrap;
}  


/*** Sub-Menu Items (HyperLinks) Hover Style ***/
ul.dynamic .ms-core-listMenu-item:hover {
    background-color: #61CBFD;
    color: #FFF;
}  

 /** Hide "Edit Links" ***/
.ms-listMenu-editLink {
    display: none !important;
}  

Rackspace has good CSS reference: http://sharepoint.rackspace.com/branding-top-navigation-in-sharepoint-2013, 

Here is my branded SharePoint 2013 top navigation menu bar.
 Here is my another post on: Branding SharePoint 2010 Top Navigation

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Monday, November 17, 2014

Manage Access Request Settings in SharePoint 2013

Summary:
sharepoint 2013 allow access request, sharepoint 2013 access requests and invitations, sharepoint 2013 approve access request, sharepoint 2013 access request email address, sharepoint 2013 allow users to request access, change access request email sharepoint 2013, sharepoint 2013 disable access request, enable access request sharepoint 2013, sharepoint 2013 access request form, sharepoint 2013 access request feature, sharepoint 2013 request for access, access request in sharepoint 2013, sharepoint 2013 access request list, manage access request sharepoint 2013, sharepoint 2013 access request missing, sharepoint 2013 access request settings missing, sharepoint 2013 access request mail, sharepoint 2013 turn off access request, sharepoint 2013 request access page, sharepoint 2013 access request settings powershell, request access to sharepoint 2013 site, access request sharepoint 2013

Access request feature allows users to request access to sites and content. Access requests feature is improved in SharePoint 2013. Now, Administrators can keep a track of access requests.

Enable access request SharePoint 2013
Site owners can enable access requests in SharePoint. To configure access request settings in SharePoint 2013, navigate to: Go to
  • Settings >> Site Settings
  • Click the "Site permissions" link under "Users and permissions" section
  • Now, from the ribbon, Click on “Access Request Settings” button. You'll be prompted with the access request Settings popup window.
sharepoint 2013 allow access request
  • Click on "Allow access request" option to enable access request and enter the E-mail address of the user who will receive access requests from that site.
sharepoint 2013 access request email address
This allows access request in SharePoint 2013. You can change access request email or you may want to turn off access request at later point of time by visiting the same link.

Manage access request SharePoint 2013:
Here is how the process works:
When users who doesn't has access to this site will get "Let us know why you need access to this site" page where they can enter their request and submit.
Once request sent, site collection administrators can approve reject this request by opening “Access requests and invitations” link in site settings page. - This link is visible ONLY after someone sent access request!

This page lists down all SharePoint 2013 access requests and invitations.
 
To approve or decline any requests, Just open the access request item, set the permissions for the user, and click on "Approve" or "Decline" button.


Once its approved/rejects, that entry removed from access request queue and moved to access request history.  SharePoint keeps track of the access requests and replies as a conversation under access request history.
sharepoint 2013 approve access request
Enable access request in SharePoint 2013 using PowerShell:
To allow access request in SharePoint 2013, on entire site collection, here is the PowerShell script.
Add-PSSnapin Microsoft.SharePoint.Powershell

#Set the site URL variable accordingly!
$SiteURL = "https://intranet.crescent.com"

$site = Get-SPSite $SiteURL

    ForEach ($web in $site.AllWebs | where { $_.Permissions.Inherited -eq $false})
          {
                #sharepoint 2013 access request settings powershell
                $web.RequestAccessEmail="Support@Crescent.com"
                write-host Updated Access request settings for $web.Title, at: $web.URL 
         }
This script can be slightly changed and used for setting access request configuration for all sites in the entire web application.

Disable Access Requests for all sites in the web application:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$WebAppURL ="http://your-web-app-url.com/"

#Get all sites
$WebsColl = Get-SPWebApplication $WebAppURL | Get-SPSite -Limit All | Get-SPWeb -Limit All

ForEach ($web in $WebsColl)
    {
        if($web.RequestAccessEnabled -and $web.Permissions.Inherited -eq $false)
        {
            #Disable access request
            $web.RequestAccessEmail=""
            $web.Update()
            write-host "Access request disabled at site:"$web.URL
        }
    }                                                      

Related Posts:


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Change Regional Settings - Time Zone, Locale in SharePoint 2013 with PowerShell

Regional settings in SharePoint 2013 controls how locale-specific information, such as Date, Time, Numbers, calendar, etc. are displayed on the site. Internally, SharePoint keeps date time values in UTC format in database and presents to the end-user based on the configured regional settings.

SharePoint 2013 regional settings are configured in these levels:
  • Web Application Level
  • Site Collection Level
  • Site Level
  • User Level 
Web Application Level
Under web application general settings, we've "Default Time Zone" settings, which sets default regional settings for site collections at the time of its creation. 
  • Go to Central Administration Site
  • Manage Web Applications >> Select your web application
  • Click on "General Settings" ribbon button
Now, from the general settings page, you can set "Default Time Zone" for site collection.

SharePoint 2013 default regional settings
However, This setting has only "Time zone" configuration and sets the default Time zone for any new SharePoint site collections. (No effect on existing site collections under the specific web application). Of course, there are other regional settings like, "locale". I don't see any other ways to set default regional settings like "Locale" on new sites other than Feature stapling/custom site definitions.
sharepoint 2013 default regional settings
If nothing is specified in Web application's timezone settings, then your SharePoint Server's timezone will be used as regional settings for your site collections!

Reset web application's default time zone, use this script (Not possible through UI)
#Get Web Application
$webApp = Get-SPWebApplication " http://sharepoint.crescent.com" 
#$Reset Web Application's default timezone
$webApp.DefaultTimeZone=-1
$webApp.Update()

Site Collection Level and Site Level Regional Settings
Each site can have its own regional settings. When you create new sub-site, it inherits its parent sites's (not site collection!) regional settings by default. To change timezone in SharePoint 2013 sites,
  • Go to Site Actions Gear >> Site Settings 
  • Click on "Regional Settings" link under Site Administration
  • Now, you can set SharePoint 2013 site collection time zone
sharepoint 2013 set regional settings
 Of course, you can set other regional settings for SharePoint site, such as Locale, Sort order, Time format, etc. from regional settings page.

sharepoint 2013 timezone settings

User Level Regional Settings in SharePoint 2013:
Users can have their own regional settings rather than the one specified at site level. This is extremely helpful when users work between multiple timezones. To configure your personal regional settings,
  • Click on Welcome menu (Personal menu) >> My Settings
  • Click on "My Language And Region" link. 
  • Uncheck "Always follow web settings" and then specify your custom time zone and other regional settings.
sharepoint 2013 regional settings for user
Regional settings for user takes precedence on any other regional settings in SharePoint 2013.


PowerShell script to change site regional settings in SharePoint 2013
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Site URL variable
$SiteUrl ="http://intranet.crescent.com"

#Get site object
$web = Get-SPWeb $siteUrl

#Set Locale setting
$culture=[System.Globalization.CultureInfo]::CreateSpecificCulture("en-US")
$web.Locale=$culture

#Set Timezone
$TimezoneID = 23 #(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi
$web.RegionalSettings.TimeZone.ID = $TimezoneID

#$web.RegionalSettings.Time24=$True
#$web.RegionalSettings.FirstDayOfWeek=1 #Sunday

#Update settings
$web.Update()

Change User's Regional Settings using PowerShell:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$WebURL="http://intranet.crescent.com" 
#Get the Web
$Web = Get-SPWeb $WebURL
#Get the User
$User = Get-SPUser "i:0#.w|Crescent\salaudeen" -web $WebURL

#Configure User's Timezone settings
$UserTimeZoneId = 23 
$RegionalSettings = new-object Microsoft.SharePoint.SPRegionalSettings($web, $true)
$RegionalSettings.TimeZone.Id = $UserTimeZoneId

$User.RegionalSettings = $RegionalSettings
$User.Update()
Refer this MDSN link to get IDs for timezone: https://msdn.microsoft.com/en-us/library/office/jj247008.aspx?f=255&MSPPError=-2147217396

SharePoint 2013 central admin regional settings
SharePoint 2013 central administration regional settings are hidden. Just append: /_layouts/15/regionalsetng.aspx to the central admin URL to get regional settings of central admin. E.g. http://sharepointserver:2013/_layouts/regionalsetng.aspx

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Saturday, November 15, 2014

How to Delete Subsite In SharePoint 2013 using PowerShell

How to delete a subsite in SharePoint 2013?
To delete a subsite in SharePoint 2013, Navigate to Site Settings >> Click on "Delete this Site" link under "Site Actions" group. sharepoint 2013 powershell remove subsite
That takes you to the "Delete this site" page. Click on "Delete" button and confirm site deletion. 
delete subsite sharepoint 2013 powershell
So simple, huh?
To restore deleted subsite in SharePoint 2010(sp1) or in SharePoint 2013, Just go to your Site collection recycle bin!

Delete all subsites in SharePoint using PowerShell
Why we need to use PowerShell, while deleting subsites from SharePoint 2013 web UI is relatively simpler? Well, If you try to delete a sub-site which has its own subsites, You'll end up in Error!

SharePoint doesn't allow you to delete a site with its sub-sites (But You can delete a site collection and all its subsites in a single click from web UI by following above instructions!). In other words You cannot delete SharePoint Subsite with one or more child subsites. You'll have to individually remove each and every child subsite prior removing parent subsite.

Sorry, something went wrong

There was a problem deleting Web site "/Subsite". Sites that have subsites or certain apps can't be deleted. Please try again after deleting all subsites and removing the apps.

cannot delete sharepoint subsite
So, to delete a site with subsites in SharePoint, first we have to delete all child subsites and then delete the parent site. What if you have large number of subsites? Well, here is where PowerShell comes to rescue.

Using content and structure is one way as in Delete Site with Subsites in SharePoint - Quick Way, It needs Publishing feature to be turned-on. So, lets utilize PowerShell to delete subsite in SharePoint 2013.

Delete a Subsite using PowerShell:
$SiteURL = "http://intranet.crescent.com/sites/operations/us"
#Get the site
$web = Get-SPWeb $SiteURL
#Delete the subsite
$web.Delete()

Delete all subsites in SharePoint 2013 using PowerShell (Delete All Child Webs)
To Remove subsite in sharepoint 2013, use this PowerShell script. It basically scans and removes all subsites recursively.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

Function Remove-ChildSites([Microsoft.SharePoint.SPWeb]$Web)
{
 Foreach($ChildWeb in $Web.Webs)
  {
  #Call the function recursively TO DELETE all sub-childs
  Remove-ChildSites($ChildWeb)
 }
    Write-host Removing web $Web.Url
 
    #Remove the web
 Remove-SPWeb $Web -Confirm:$false 
}

$ParentWebURL="http://intranet.crescent.com/sites/operations/us"

#Get the Parent Web
$ParentWeb= Get-SPWeb $ParentWebURL

#Call the function to remove all child webs
Remove-ChildSites $ParentWeb


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Wednesday, November 12, 2014

SharePoint Knowledge Transfer Checklist

In a SharePoint architect/administrator's life, Its quite a common task to takeover existing SharePoint environments at the time of Job/Role switch. From my experience, Here is the check list to help easing up documentation for SharePoint:

SharePoint  Infrastructure
  • Farm(s) Topology - List of servers and roles, physical and logical architecture diagrams for production, Staging and Development Environment (if applicable)
  • Server Infrastructure (Physical/Virtual), Storage, CPU-RAM-Network configurations
  • List of Service Accounts (Setup account, Farm account, search crawler account, etc) and passwords. Active directory setup, DNS entries for SharePoint
  • Maintenance windows schedule - Patching, patch Level? OS versions?
  • Incoming/Outgoing E-mail configurations. SMTP configuration details
  • IIS Level customizations (compression, URL rewrite, redirects, etc.)
  • Backup, Disaster recovery in place. Tools used (SCDPM, Comvault, etc). Backup frequency.
  • Database server details. SQL Alias? Redundancy - Clustering in place? Mirroring? Always ON?
  • Monitoring setup for server/application Health, SCOM, etc
  • Load Balancing/Publishing details (ISA? TMG? CISCO Ace? or any other Hardware load balancer, F5 Big IP?)
  • Third party software (Nintex, Layer2, Control Point, etc installed in the environment
  • Licensing details for SharePoint and any 3rd party software. Volume/MSDN Licenses for DEV/TEST? Premier support with vendors such as Microsoft?
  • Profile Import/My site setup - Schedules, directory services/sources List
  • Last but not least - Contact person/teams for all dependent teams such as Network, DBA teams, System Admins, Backup, AD, Server Hardware, Security, Exchange server, etc.
Users & Security:
  • User Base - Total No. of users, region, locations, internal vs. external, site usage in last one Month?
  • How external users access SharePoint? Published Intranet? users member of AD? VPN connections?
  • Custom authentication provider in use (E.g. FBA, AD LDS, ADFS, Live)? Kerberos ?
  • Web applications/CA is SSL enabled? certificate details, providers.
  • Any SharePoint specific Antivirus on SP Servers? E.g. Forefront antivirus for SharePoint? Third party anti-virus solutions such as McAFee?
  • Are there any exclusive site for end-user training materials, FAQs, KB, etc?Any self service sites?
  • Access Rights Policies? - Any custom permission levels created (E.g. contributor without delete)
SharePoint Inventory:
  • List of web Applications, site collections with owner contacts
  • List of customizations/custom solutions and its documentation
  • Additional Language Packs installed.
  • CA Specific custom settings - Recycle bin, Max File Upload size, Storage quotas, etc
  • Integration points (Interfaces) with LOB and other applications/ Software (SQL server reporting services?)
  • List of SharePoint and other related application databases
  • How Branding is applied, Whats being done? (feature staplers/custom site definitions/Themes/Custom CSS, Master pages, etc)
  • List of SharePoint Sites that are most critical to business?
  • Typical SharePoint Usages in the Org. (Collaboration, Knowledge Management, Enterprise content Management, Document management, Dashboards, etc. )
  • Repository for configuration files, Implementation/Build guides, Known error database (KEDB) , Incident Logs, RCA (root cause analysis), (CSV, SVN, TFS, etc.)
Process and Metrics:
  • Team Structure - Team Members, Roles supporting existing SharePoint environment.
  • System in place for Incident/Request/Change management? 
  • How end user requests are routed to the team? Provide the complete request life cycle.
  • Existing SLA and priorities for incident management. 
  • Governance Policies in place. E.g. site creations, content responsibility, support limits, etc 
  • Support statistics (Tickets received last month, open/close, etc)
  • Scheduled Reports to the business owners? E.g. Monthly reports for usage.
  • Remote Sharing/ User Interaction methods (Web ex, etc).
  • Communication plan for any planned/unplanned outages - Key stakeholder list
This checklist can be used also during SharePoint migrations, rebuilds. Please comment to add/remove your own items to this list.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Tuesday, November 11, 2014

Office Web Apps Previews Not Working in SharePoint 2013?

During a SharePoint 2013 deployment, integrated Office Web Apps 2013 with SharePoint 2013 with my implementation guide How to Install and Configure Office Web Apps 2013 for SharePoint 2013. Everything went well until we received all of the Office Web Apps services failing errors in SharePoint 2013.

Word Web Apps gave an error: 
Sorry, there was a problem and we can’t open this document.  If this happens again, try opening the document in Microsoft Word.”
Sorry, there was a problem and we can’t open this document.  If this happens again, try opening the document in Microsoft Word.

Excel and PowerPoint Web Apps also failed. "Excel Web App - Sorry, we're having a problem showing this workbook"
Excel Web App - Sorry, we're having a problem showing this workbook"

On PowerPoint web application: "Microsoft PowerPoint Web App - Sorry, we couldn't open this presentation because we ran into a problem. please try again"
Microsoft PowerPoint Web App - Sorry, we couldn't open this presentation because we ran into a problem. please try again

Troubleshooting:
Analyzed event logs of SharePoint and OWA servers and found nothing useful. Logged in to the Office Web Apps server and Analysed the latest log file from "C:\ProgramData\Microsoft\OfficeWebApps\Data\Logs\ULS" location.

While scanning LOG files, found these lines:  "WOPICheckFile,WACSERVER FileNotFound [url:http://sharepoint.crescent.com/_vti_bin/wopi.ashx/files/7529f29d45234898b81a46a14a74203b?access_token=REDACTED_1072&access_token_ttl=1418077932722"
Office Web Apps Issue with SharePoint 2013 - WOPICheckFile,WACSERVER FileNotFound
Root Cause and Solution:
Well, Office web apps server must be able to resolve and communicate with SharePoint 2013 sites to render office documents in SharePoint sites. In my case, It couldn't do that because of a WRONG IP placed in the HOST file of Office Web Apps server! I just fixed it by clearing HOST file entries and creating global DNS record for SharePoint sites! You can also try placing a HOST file entry in Office web Apps server, pointing to SharePoint sites, if DNS change isn't possible.

So, Make sure Office Web Apps server is able to contact SharePoint sites to get rid of these issues.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Restore-SPSite Error: 0x80070003 on Backup-Restore SharePoint Site Collection Between Different Farms

When I was trying to backup restore between SharePoint DEV and QA Farms got this error message:
Restore-SPSite : <nativehr>0x80070003</nativehr><nativestack></nativestack>
Restore-SPSite : <nativehr>0x80070003</nativehr><nativestack></nativestack>

Root Cause:
The source and target SharePoint Farm's build version mismatch!

Solution: Upgrade either the source or destination SharePoint farm and then backup-restore.

Backdoor way:
What if you don't have the option of immediate upgrade and complete this backup restore operation? Here is the backdoor way to skip upgrades and backup-restore SharePoint sites or lists between farms with different versions/build numbers.

One way is: Backup-restore the content database of your old SharePoint site collection to the target farm. Mount and Upgrade the content database (Mount-SPContentDatabase followed by Upgrade-SPContentDatabase) in the target farm.

There is an another way: Binary Edit! Just open the backup file in any HEX editor tool, I've used HxD from: http://mh-nexus.de/en/hxd/ , and change the version build number to your target SharePoint farm version.
SharePoint Restore-SPSite Error:0x80070003
Try restoring the site collection again, It should work now.

Another Cases
1: Restore Operation interrupted and site corrupted: 
Experienced the same issue when the restore operation got interrupted in an another case. Since the restore is stopped in middle, that left the site in unsupported state. So the solution is: Delete the partially restored site and run restore again. Here is how: How to Delete Corrupted Site Collections in SharePoint using PowerShell

2. Database is not upgraded:
If the content database in which site collection exists - is not already upgraded to the current SharePoint build version, You'll receive this error. Solution? Do: Upgrade-SPContentDatabase "DatabaseName" before taking backup (or make sure the target database is upgraded!)

3. Last but not least: User who runs the backup-restore doesn't has enough permission on SQL Server!

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Sunday, November 9, 2014

PowerShell Script to Find All Active Directory Groups in SharePoint

Requirement: Get the list of All AD Security groups used in SharePoint sites. We need to generate a report on AD groups that are being used in a SharePoint web application.

PowerShell script to find AD Groups in SharePoint:
Here is my PowerShell script to find and export Active Directory groups on all SharePoint sites with in the given web application.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Change to your web application
$WebAppURL = "http://intranet.crescent.com" 

#Get Web Application
$WebApp = Get-SPWebApplication $WebAppURL

#variable for data collection
$ADGroupCollection= @()
$ReportPath ="C:\ADGroups.csv" 

foreach ($Site in $WebApp.Sites)
{
    Write-host -foregroundcolor green "Processing Site Collection: "$site.RootWeb.URL
    
    #Get all AD Security Groups from the site collection
    $ADGroups = Get-SPUser -Web $Site.Url | Where { $_.IsDomainGroup -and $_.displayName -ne "Everyone" }

    #Iterate through each AD Group
    foreach($Group in $ADGroups)
    {
            Write-host "Found AD Group:" $Group.DisplayName

            #Get Direct Permissions
            $Permissions = $Group.Roles | Where { $_.Name -ne "Limited Access" } | Select -ExpandProperty Name

            #Get SharePoint User Groups where the AD group is member of.
            $SiteGroups = $Group.Groups | Select -ExpandProperty Name

            #Send Data to an object array
            $ADGroup = new-object psobject
            $ADGroup | add-member noteproperty -name "Site Collection" -value $Site.RootWeb.Title
            $ADGroup | add-member noteproperty -name "URL" -value $Site.Url
            $ADGroup | add-member noteproperty -name "Group Name" -value $Group.DisplayName
            $ADGroup | add-member noteproperty -name "Direct Permissions" -value ($Permissions -join ",")
            $ADGroup | add-member noteproperty -name "SharePoint Groups" -value ($SiteGroups -join ",")
            #Add to Array
            $ADGroupCollection+=$ADGroup           
    } 
}
    #Export Data to CSV
    $ADGroupCollection | export-csv $ReportPath -notypeinformation
    Write-host "SharePoint Security Groups data exported to a CSV file at:"$ReportPath -ForegroundColor Cyan
  
This script generates a CSV file report with output:
  • Site collection Name and URL
  • Active Directory group name
  • Permissions applied to the AD group either by direct permission level or via SharePoint groups.


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Wednesday, November 5, 2014

SharePoint 2013 People Picker Browse Button Missing?

With massive changes from SharePoint 2010 to SharePoint 2013, People picker also has changed! In its previous versions, SharePoint 2010 and SharePoint 2007, people picker is associated with an address book and check name icons, which are missing in SharePoint 2013!

While its still identical in some places of SharePoint 2013 (E.g. Setting up groups for the site: /_layouts/15/permsetup.aspx), These icons are missing in all other places. E.g In SharePoint list forms, Grant Permission pages, etc. But in SharePoint 2013 these places provides "Auto complete" feature in people picker to help us picking users.
How can I show browse buttons in SharePoint 2013 People Picker?
Not very sure why Microsoft removed these nifty icons. Anyway, If you need the "Browse Icon" back in SharePoint list form people picker fields, simply create new custom list form using SharePoint designer, which brings browse button in people picker by default!
SharePoint 2013 People Picker Browse Button Missing

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Create Autonumber Unique Column in SharePoint List

Auto-numbering is quite a common requirement when working with SharePoint lists. Say, You may want to autonumber list items in SharePoint 2010 issue tracking list!

Here are some methods to achieve SharePoint list auto increment number:

Add Autonumber column to list with ID field:
SharePoint Lists have an built-in "ID" column which auto increments. You can simply Add this column to your views!
You can rename ID column if required: How to rename ID field in SharePoint list

Using calculated field for Autonumber?
Tried using calculated column with ID field, Entered formula such as = CONCATENATE("CR-" [ID]), But no luck - Doesn't work for new items! Because ID field is filled ONLY after the item is created!

SharePoint Autonumber with Workflows:
Here is my solution to set auto increment number with SharePoint designer workflow! Just follow these steps:
  • Create a column, say: Request Number of appropriate type. Make this column hidden: How to make a SharePoint list column hidden?
  • Open SharePoint designer, Create new list workflow.
  • Add a workflow action: "Update list Item" >> Current Item >> Add >> Set this field to your Target field (Change Request No.), Set value from Current Item:ID field. sharepoint add autonumber to list
  • Set the workflow start option to "Start Workflow automatically when an item is created"
  • Save and Publish the workflow.
You can also have an Event receiver to set Autonumber field value programmatically!

Create autonumber in SharePoint 2013 with "Counter" list approach:
Idea is, create an another list, say "Counter" with a field to hold your initial counter value. Create a workflow to fetch the counter value and update your bases list's "Auto-number" field. Let the same workflow increment the counter list's counter field value!

Tags: sharepoint unique autonumber, sharepoint 2010 add autonumber column, sharepoint calculated value autonumber, sharepoint autonumber column, sharepoint create autonumber, sharepoint 2010 autonumber column, sharepoint 2013 autonumber column, sharepoint autonumber workflow, sharepoint autonumber column in list, sharepoint autonumber field, sharepoint designer autonumber, sharepoint list autonumber formula, sharepoint calculated field autonumber, sharepoint autonumber generation, sharepoint autonumber list items, autonumber on sharepoint list, sharepoint designer 2013 autonumber workflow


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


How to Rename ID Column in SharePoint

Requirement: Rename ID field in a SharePoint list! We had a list with ID column added to the view to provide unique auto number feature. User wants to rename ID field to "Change Request Number" as it sounds more appropriate.
sharepoint rename id column
Solution: Hidden columns such as "ID", "Workflow Status" are not providing Edit features directly from SharePoint web UI and they don't even appear on SharePoint list settings page.

So, use this simple trick to rename any hidden column such as ID:
  • Go to List settings page 
  • Pick any column such as "Title". You'll get Edit Column page. 
  • In the URL, Change the Field parameter from "Title" to "ID" and Hit Enter. E.g.
    http://demo.crescent.com/_layouts/15/FldEdit.aspx?List=%7BB9BED485%2D889D%2D49D9%2DBDC1%2DD78EB4E06EB9%7D&Field=Title
    To
    http://demo.crescent.com/_layouts/15/FldEdit.aspx?List=%7BB9BED485%2D889D%2D49D9%2DBDC1%2DD78EB4E06EB9%7D&Field=IDsharepoint rename id field
  • Now you can rename the field as you wish!
Here is my renamed ID column:

You can also rename a field programmatically with PowerShell or C# Object model code. Here is my another article: How to Rename SharePoint Column Programmatically


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Saturday, November 1, 2014

Design Manager Missing in SharePoint 2013?

Problem:
Design Manager is a new feature introduced in SharePoint Server 2013 publishing sites to manage branding. But you are not seeing "Design Manager" in SharePoint 2013? design manager link missing?
sharepoint design manager missing
Solution:
Well, to enable design manager in SharePoint 2013, You got to activate "Publishing" Feature!
  • Go to "Site Settings" of your root site collection >> Click on "Site collection features" under site collection administration
  • Click on "Activate" button next to "SharePoint Server Publishing Infrastructure".
    sharepoint 2013 design manager not visible
  • Activate "SharePoint Server Publishing Infrastructure" from site features via "Site Setting" >> Click on "Manage site features" and activate SharePoint Server Publishing Infrastructure.
How to access design manager in SharePoint 2013
Above steps activates design manager. Now, You'll get design manager link in Site actions menu and in site settings page!
design manager sharepoint 2013 missing
Design Manager is not available in SharePoint Foundation, as the publishing feature is available only on SharePoint server!


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Configuration Failed - Failed to connect to the configuration database: Error during decryption. Ensure the passphrase is correct.

Problem: Trying a add a server to SharePoint 2013 farm, after a passphrase reset. Got this error message.
Configuration Failed
Failed to connect to the configuration database: 
An exception of type System.ArgumentException was thrown. Additional exception information: Error during decryption. Ensure the passphrase is correct.
Error during decryption. Ensure the passphrase is correct.

Troubleshooting:
  • Double-checked my pass phrase is correct. If my pass phrase is wrong, I should get this error message: "The passphrase you entered is incorrect. Please try again" - But I didn't receive any such!The passphrase you entered is incorrect. Please try again
  • Verified the pass-phrase change timer job's last run time:
    Get-SPTimerJob -Identity job-admin-passphrase-change | Format-Table -Property DisplayName,Id,LastRunTime,Status
  • Tried restarting SharePoint Timer job and SharePoint Administration services in CA server
  • Made sure the account I logged in is a Farm Admin account with Security Admin, DB Creator roles in SQL Server and Local administrator in the server I'm trying to add.
Solution Worked for me:
Clear SharePoint Configuration Cache on ALL SharePoint servers! and rerun the configuration wizard in the new server!!

How to Clear SharePoint Configuration Cache using PowerShell

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


You might also like:

Related Posts Plugin for WordPress, Blogger...