kwizcom banner advertisement

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

7:32 PM    , , , , ,
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!". Click "OK" to save your changes and the result in action:
Required Field Validation Based on Another Column's Value in SharePoint 2013 Required Field Validation Based on Another Column's Value in SharePoint 2013 Reviewed by Salaudeen Rajack on 7:32 PM Rating: 5

Export "User Information List" to Excel in SharePoint

4:12 PM    , , , ,
At one point of time, I needed to export all users of a site collection to Excel and my trick to export user information list to excel as follows: Export user information list to excel in SharePoint 2013: Follow these steps to export user information list. Navigate to Site Settings >> People and Groups. Now your browser URL should be something like: "http://SHAREPOINT-SITE.com/_layouts/15/start.aspx#/_layouts/15/people.aspx?MembershipGroupId=22". Just replace the value for "MembershipGroupId" to "0" to get "All People" view which lists all users of the site (which is nothing but "User Information List"). From here, Get the GUIDs of your User Information List and view. Here is How to Get the GUID of SharePoint list or View . Replace "List GUID" and "View GUID" of yours in this URL and copy-paste it in the browser: http:// SHAREPOINT-SITE-URL .com/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&
Export "User Information List" to Excel in SharePoint Export "User Information List" to Excel in SharePoint Reviewed by Salaudeen Rajack on 4:12 PM Rating: 5

Import Users from Excel (CSV) to SharePoint using PowerShell

1:33 PM    , , ,
Requirement: Got bunch of users and want to add them in to SharePoint? To bulk add users to SharePoint group programmatically using PowerShell, use the below script. This script Imports list of users from Excel .CSV file to SharePoint and adds them into appropriate groups. Solution: Lets import users from Excel to SharePoint using PowerShell. Here is my CSV file with list of users and their target groups in SharePoint: PowerShell script to Import users from CSV to SharePoint 2013: Add-PSSnapin Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue #Variables $UserListCSV = "C:\UsersToImport.csv" $SiteURL ="http://Sales.Crescent.com" # Import the CSV file $UserList = Import-CSV $UserListCSV #-header("GroupName","UserAccount") - If CSV doesn't has headers #Get the Web $Web = Get-SPWeb $SiteURL #Iterate through each user from CSV file foreach ($user in $UserList) { #Get the Group and User $Group = $web.SiteGroups[$U
Import Users from Excel (CSV) to SharePoint using PowerShell Import Users from Excel (CSV) to SharePoint using PowerShell Reviewed by Salaudeen Rajack on 1:33 PM Rating: 5

Create Managed Metadata Service Application (MMS) in SharePoint 2016 using PowerShell

6:23 PM    , , , , , ,
Managed Metadata Service allows us to Centrally manage enterprise level metadata & Content Types to use between Site Collections, Web Applications even across farms. Creation of Managed Metadata Service in SharePoint 2016 provides us "Term Store" which is a central repository to manage Terms. The Term Store allows administrators to add/update/delete Term Sets, Term Groups, and Terms. Use the below PowerShell script to add new managed metadata service application in SharePoint 2016. Change the configuration parameter values such as: Service Application name, application pool, database name, etc. accordingly. Prerequisites: Create the content type hub prior creating Managed Metadata service application. Refer: Create Content Type Hub in SharePoint 2013 PowerShell Script to Create Managed Metadata Service Application in SharePoint 2013: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Configuration Parameters $ServiceAppName = "Mana
Create Managed Metadata Service Application (MMS) in SharePoint 2016 using PowerShell Create Managed Metadata Service Application (MMS) in SharePoint 2016 using PowerShell Reviewed by Salaudeen Rajack on 6:23 PM Rating: 5

How to Update User Email Address in SharePoint using PowerShell?

12:31 PM    , , , , ,
Problem: SharePoint workflows failed because, user has no email address! You can get the user's Email address with this PowerShell one-liner: (Get-SPUser -Identity "Crescent\bourgeois" -Web "http://portal.crescent.com/projectpipeline").email Solution is simple! SharePoint user has no email address, so add email address to users to resolve the issue! How to update SharePoint user email address? To update user email address, Use, Set-SPUser cmdlet. Here are some examples: Syntax: Set-SPUser -Identity "i:0#.w|Domain\username" -Email "email@domain.com" -Web http://sharepoint-site-url Example: Set-SPUser -Identity "i:0#.w|Crescent\Salaudeen" -Email "Salaudeen@crescent.com" -Web http://intranet.crescent.com/ This sets the Email ID of the user to given Email for entire site collection. Change user email address from Active Directory: You can Sync User's Email ID from Active Directory Set-SPUser -Identity &qu
How to Update User Email Address in SharePoint using PowerShell? How to Update User Email Address in SharePoint using PowerShell? Reviewed by Salaudeen Rajack on 12:31 PM Rating: 5

Increase SharePoint Search Index File Size Limit

8:06 PM    , , ,
Problem: There are many Design documents uploaded to a SharePoint 2010 document library in Microsoft Word format in a Team site. Users reported these documents aren't appearing in search result. Same time found in crawl logs: "This item was partially parsed. The item has been truncated in the index because it exceeds the maximum size." error. Root cause: This is because SharePoint search crawler doesn't index large files > 16 MB by default! (in SharePoint 2010. For SharePoint 2013 & 2016, its 64 MB) Confirmed that the documents uploaded are about 20MB each! So SharePoint crawls only the meta data associated with the document and skips the contents inside the file! Solution: Increase SharePoint search index file size limit Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue $SSA = Get-SPEnterpriseSearchServiceApplication #Get the current size $SSA.GetProperty("MaxDownloadSize") #Increase maximum file size in Crawl - in
Increase SharePoint Search Index File Size Limit Increase SharePoint Search Index File Size Limit Reviewed by Salaudeen Rajack on 8:06 PM Rating: 5

Set Default Home Page in SharePoint 2013

11:09 AM    ,
Its a common requirement in SharePoint 2013 to change its home page to some customized ones. In SharePoint 2013, to set homepage these options are available: Change default home page on SharePoint 2013 Team sites:   Navigate to your desired page Click on "Page" tab, Click on "Make Homepage" button from the ribbon. Confirm to the "If you make this page the home page for this site, users will no longer be able to see the old site home page. Do you want to set this page as this site's home page?" message box. Done! SharePoint 2013 set default home page on Publishing sites: The above method works for Publishing sites also. However, there is an another method too! Navigate to site settings >> Click on "Welcome Page" link under "Look and Feel" section Enter the home page URL either directly or by Clicking on "Browse" button and choosing the right page. Click on "Ok" to save your changes. Using
Set Default Home Page in SharePoint 2013 Set Default Home Page in SharePoint 2013 Reviewed by Salaudeen Rajack on 11:09 AM Rating: 5

Configure Resource Throttling in SharePoint 2013 using PowerShell

6:50 PM    , , , , ,
What is Resource throttling? Large lists are always performance killers in SharePoint. Luckily starting from SharePoint 2010, There is a feature called "Throttling" introduced to address this issue.  Any operation such as data retrieval, update, delete of more than 2000 rows results low performance in SharePoint 2007 days. Throttling defines the Maximum number of rows user can query at a time. Any operation beyond this count displays an error message. The default value for this setting in SharePoint 2010 is 5000. We manage resource throttling settings in SharePoint 2013 by navigating to: Central Administration >> Manage Web Applications >> select the target web application From the ribbon, Click on General settings >> Resource Throttling Configure List throttling settings with PowerShell: Use the below script to configure resource throttling settings for SharePoint 2013 using PowerShell Add-PSSnapin Microsoft.SharePoint.PowerShell -Error
Configure Resource Throttling in SharePoint 2013 using PowerShell Configure Resource Throttling in SharePoint 2013 using PowerShell Reviewed by Salaudeen Rajack on 6:50 PM Rating: 5

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

7:29 PM    
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. Disable "Client Integration" from Web Application's Authentication Providers. Remove permissions "Use Remote Interfaces" which also removes "Use Client Integration Features" from permission levels. 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" CSS/JavaScript-jQuery methods to Turn-Off explorer view. Create a custom action with EMPTY CommandUIDefinition, so that it overrides existing ribbon button. Lets stick with the last one! Add Custom Action
How to Disable "Open with Explorer" View in SharePoint 2013? How to Disable "Open with Explorer" View in SharePoint 2013? Reviewed by Salaudeen Rajack on 7:29 PM Rating: 5

How to Add Calculated Column to SharePoint List using PowerShell?

6:58 PM    , ,
Requirement: Add new Calculated field to SharePoint list programmatically using PowerShell script. PowerShell to add calculated column in SharePoint list or library: Add-PSSnapin Microsoft.SharePoint.PowerShell –ErrorAction SilentlyContinue #Variables $WebURL="http://projects.crescent.com" $ListName="Proposal Documents" $CalculatedColumnName="Created Month-Year" #Get the Web $web = Get-SPWeb $WebURL #Get the List $list = $web.Lists.TryGetList($ListName) #Add new calculated column $list.Fields.Add($CalculatedColumnName, "Calculated", $false) #Get the column $CalculatedCol = $List.Fields.GetField($CalculatedColumnName) #Set Formula for calculated column $CalculatedCol.Formula='=TEXT(Created,"mmm-YYYY")' $CalculatedCol.OutputType="Text" $CalculatedCol.Update() $web.Dispose() Script in action: Create calculated column in SharePoint 2013 using PowerShell
How to Add Calculated Column to SharePoint List using PowerShell? How to Add Calculated Column to SharePoint List using PowerShell? Reviewed by Salaudeen Rajack on 6:58 PM Rating: 5

How to Recover Deleted Files (Documents / List Items) from Recycle Bin in SharePoint 2013?

1:31 PM    , , , ,
Ever wonder how to restore a deleted file in SharePoint? Like Windows, We've "Recycle Bin" feature in SharePoint. If you have Contributor permission or more, You can restore your deleted files. Usually, files in Recycle Bins gets deleted permanently after 30 days. SharePoint 2013 uses two-stages of recycle-bins: End-User Recycle Bin - Files deleted goes here first. If deleted from here, its moved to "Administrator Recycle bin". You'll see all files deleted by you here. Administrator Recycle Bin - Site-collection administrator have access to it. How to Restore Deleted Files in SharePoint 2013: Follow these steps to recover deleted documents in SharePoint 2013. Go to your SharePoint site Home page, Click on Settings icon at the top right corner of the SharePoint site and select Site Contents. In the "Site Contents" Page, Click on "Recycle Bin" link Select desired files to restore and click on "Restore Selection" link.
How to Recover Deleted Files (Documents / List Items) from Recycle Bin in SharePoint 2013? How to Recover Deleted Files (Documents / List Items) from Recycle Bin in SharePoint 2013? Reviewed by Salaudeen Rajack on 1:31 PM Rating: 5

Find All Large Lists Exceeding Threshold Limit in SharePoint using PowerShell

6:23 PM    , , , , , , ,
Requirement: Find all lists exceeding the list view threshold limit configured on Web Application's resource throttling settings. PowerShell Script to find all Large Lists which are exceeding the configured threshold limit: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Get All Web Applications $WebAppsCollection = Get-SPWebApplication #Array to Hold Result - PSObjects $LargeListsResult = @() foreach($WebApp in $WebAppsCollection) { #Get the Throttling Limit of the Web App $Threshold = $WebApp.MaxItemsPerThrottledOperation foreach($Site in $WebApp.Sites) { foreach($Web in $Site.AllWebs) { Write-host "Scanning site:"$Web.URL foreach($List in $Web.Lists) { if($list.ItemCount -gt $Threshold) { $Result = New-Object PSObject $Result | Add-Member NoteProperty Title($list.Title)
Find All Large Lists Exceeding Threshold Limit in SharePoint using PowerShell Find All Large Lists Exceeding Threshold Limit in SharePoint using PowerShell Reviewed by Salaudeen Rajack on 6:23 PM Rating: 5

Hide "Focus on Content" Full Screen Button in SharePoint 2013

3:55 PM    , ,
Requirement: Hide Focus on Content button in SharePoint 2013! As the name suggests, Focus on content button in SharePoint 2013 removes left & top navigation and lets you to focus on the site content once you click on it. In case you want to remove that button, here is the trick: Solution to hide focus on content button in SharePoint 2013 Hiding focus on content in SharePoint 2013 can be done with CSS. Simply follow these steps to hide focus on content in SharePoint 2013: Go to your target page, Edit and Add a script editor web part, insert the below CSS in it. <style> Span#fullscreenmodebox { display:none; } </style> You can also place the above CSS code in your Master page to hide focus on content button in SharePoint 2013. This CSS works for SharePoint 2016 as well.
Hide "Focus on Content" Full Screen Button in SharePoint 2013 Hide "Focus on Content" Full Screen Button in SharePoint 2013 Reviewed by Salaudeen Rajack on 3:55 PM Rating: 5

Increase SharePoint 2013 Lookup Column Width

3:22 PM    , , , ,
Requirement: Increase SharePoint 2013 multi-lookup field width Solution: Use CSS styles to set lookup field width in SharePoint! Here is how: Navigate to: http://your-sharepoint-site.com/Lists/Your-List/editform.aspx Click on "Site Settings" gear >> Edit Page Click on "Add Web Part" link and then choose "Script Editor "from "Media and Content" group Click on "Edit Snippet" link script editor and Paste the below CSS in it. Save and close the page. <style> .ms-formtable table.ms-long { width:600px !important; } .ms-formtable table.ms-long .ms-input>select { width:300px !important; } </style> Before: After:
Increase SharePoint 2013 Lookup Column Width Increase SharePoint 2013 Lookup Column Width Reviewed by Salaudeen Rajack on 3:22 PM Rating: 5

How to Update List Items in SharePoint using PowerShell?

5:51 PM    , , , ,
Requirement: Update List Items in SharePoint using PowerShell How to Update List Items in SharePoint using PowerShell Script? Well, the basic syntax for updating a list item goes as: #Get Web and List $Web = Get-SPWeb "http://sharepointsite.com" $List = $Web.Lists["ListName"] #Get the List item to update $ListItem = $List.GetItembyID($ItemID) #Set Column values $ListItem["ColumnName"] = "New Value for the Field!" #Update the Item, so that it gets saved to the list $ListItem.Update() Update SharePoint list item using PowerShell script Lets take an another example: Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue $web = Get-SPWeb http://SharePointSite.com #Get the Contacts List $List = $web.Lists["Contacts"] #Get the List Item by its Title field value $ListItem = $List.Items | Where {$_["Title] -eq "Salaudeen Rajack"} #Set "Department" column value $ListItem["Department&
How to Update List Items in SharePoint using PowerShell? How to Update List Items in SharePoint using PowerShell? Reviewed by Salaudeen Rajack on 5:51 PM Rating: 5

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

11:38 AM    , , , , , ,
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 Patching is a two-step process: Install the patch binaries 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. 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 a
"Upgrade Required" Status in SharePoint 2013 Central Administration Servers in Farm "Upgrade Required" Status in SharePoint 2013 Central Administration Servers in Farm Reviewed by Salaudeen Rajack on 11:38 AM Rating: 5

Find Who has Created a Site Collection, List or Library in SharePoint using PowerShell

7:06 PM    
If you want to find out who has created a SharePoint site, list or library: Sorry! There is no way from SharePoint user Interface!! You can't get "Created By" or "Created On" values anywhere.  But PowerShell is our rescuer! Lets find who has created a SharePoint list using PowerShell: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Get the List and Web $web = Get-SPWeb "http://portal.crescent.com/sites/Sales" $list = $web.lists["Sales Docs"] #Get Creator and Created date of the given List Write-host "List Created by:"$List.Author Write-host "List Created on:"$List.Created #Get Site collection Creator and Created Date write-host "Site Created by:"$web.Author Write-host "Created on:" $web.Created Related post: Determine who created a list view in SharePoint
Find Who has Created a Site Collection, List or Library in SharePoint using PowerShell Find Who has Created a Site Collection, List or Library in SharePoint using PowerShell Reviewed by Salaudeen Rajack on 7:06 PM Rating: 5
Powered by Blogger.