kwizcom banner advertisement

How to Activate Publishing Feature using PowerShell in SharePoint?

9:30 PM    , , , , ,
Requirement: SharePoint Publishing sites used to create Public web sites, intranet portals, etc. We had to activate Publishing feature in SharePoint using PowerShell in scenarios, such as: Activating Publishing feature through web user interface resulted in error! Bulk activating publishing feature for all site collections and sites in a web application. PowerShell to Activate Publishing Feature in SharePoint: Publishing sites rely on "SharePoint Server Publishing Infrastructure" feature, which needs to be activated both at site collection and site level. To activate publishing Navigate to Site Settings >> Click on "Site collection features" link under "Site collection administration Click on "Activate" button next to "SharePoint Server Publishing Infrastructure" SharePoint PowerShell to activate publishing feature at site collection: Here is the PowerShell to activate publishing feature at site collection. Enable-SPFe
How to Activate Publishing Feature using PowerShell in SharePoint? How to Activate Publishing Feature using PowerShell in SharePoint? Reviewed by Salaudeen Rajack on 9:30 PM Rating: 5

Create Task List in SharePoint using PowerShell

8:34 PM    , , , ,
Requirement:   In SharePoint, create task list using PowerShell! PowerShell to create task list in SharePoint: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Variables $WebURL="http://intranet.crescent.com" $ListName="Project Tasks" $ListDescription ="Task list to manage project tasks" #Task list template $ListTemplate = [Microsoft.SharePoint.SPListTemplateType]::Tasks #Get the Web $Web = Get-SPWeb $WebURL #Check if the task list exists already $TaskList = $Web.Lists.TryGetList($ListName) if($TaskList -ne $null) { Write-host "Task list '$($ListName)' exists already!" -ForegroundColor Red } else { #Create the task list $Web.Lists.Add($ListName,$ListDescription,$ListTemplate) | Out-Null #Set "Show in Quick Launch" property for the list $TaskList = $Web.Lists[$ListName] $TaskList.OnQuickLaunch = $True $TaskList.Update() Write-host "Task list '$($ListName
Create Task List in SharePoint using PowerShell Create Task List in SharePoint using PowerShell Reviewed by Salaudeen Rajack on 8:34 PM Rating: 5

Fix "Drives are running out of free space" Error in SharePoint Health Analyzer

7:43 PM    , , , , ,
Problem:  SharePoint Health Analyzer in Central Admin site gave the alert banner "The SharePoint Health Analyzer has detected some critical issues that require your attention. View these issues". On checking, found "Drives are running out of free space" and "Drivers are at risk of running out of disk space" errors logged! Also, this found an error message in Windows event log with an Event ID: 2138 The SharePoint Health Analyzer detected a condition requiring your attention.  Drives are at risk of running out of free space. Available drive space is less than five times the value of physical memory. This is dangerous because it does not provide enough room for a full memory dump with continued operation. It also could cause problems with the Virtual Memory swap file: New Volume (SharePoint-Server- C:\). Examine the failing servers and delete old logs or free space on the drives. For more information about this rule, see "http://go.microsoft.com/f
Fix "Drives are running out of free space" Error in SharePoint Health Analyzer Fix "Drives are running out of free space" Error in SharePoint Health Analyzer Reviewed by Salaudeen Rajack on 7:43 PM Rating: 5

Monitor SharePoint Web Sites Availability and Send Alert Email using PowerShell

7:06 PM    , , , , ,
Requirement: Script to monitor SharePoint web sites and Trigger an Alert Email when something goes wrong! PowerShell script to Monitor SharePoint Sites: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Configuration Parameters $EmailFrom = "SharePointMonitor@crescent.com" $EmailTo = @("salaudeen.rajack@crescent.com") $EmailSubject = "Alert: SharePoint site is Down!" #Get Outgoing Email Server of the SharePoint Farm $SMTPServer= (Get-SPWebApplication -IncludeCentralAdministration | Where { $_.IsAdministrationWebApplication } ) | % {$_.outboundmailserviceinstance.server.address} #Make a web request to check site status $WebClient = New-Object System.Net.WebClient $WebClient.UseDefaultCredentials = $true #Iterate through each web application Foreach($WebApp in (Get-SPWebApplication)) { $EmailBody="" #Get the timestamp $TimeStamp = Get-Date –f "yyyy-MM-dd HH:mm:ss" try { $Page
Monitor SharePoint Web Sites Availability and Send Alert Email using PowerShell Monitor SharePoint Web Sites Availability and Send Alert Email using PowerShell Reviewed by Salaudeen Rajack on 7:06 PM Rating: 5

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) on Get-SPWeb, New-SPUser, Get-SPUser, Set-SPUser, etc.

12:50 PM    , ,
Problem: Getting "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" on running PowerShell cmdlets, such as: Get-SPWeb, New-SPUser, Get-SPUser, Set-SPUser, etc. Solution:  Add a web application user policy with Full control for the Farm Administrator who runs the Script! Open SharePoint 2016/2013/2010 Central Administration site as a Farm Administrator Click Application Management >> Select Manage Web Applications. Select your target web application >> Click the User Policy button from the ribbon. From the Policy for Web Application dialog box, click on "Add Users" link. Select All Zones for the web application and click on Next Enter the user account and Select the permission policy level as "Full Control" Click Finish to save your changes. 
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) on Get-SPWeb, New-SPUser, Get-SPUser, Set-SPUser, etc. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) on Get-SPWeb, New-SPUser, Get-SPUser, Set-SPUser, etc. Reviewed by Salaudeen Rajack on 12:50 PM Rating: 5

Remove Checkbox from SharePoint Listview Web Part

6:47 PM    , , , , , ,
Requirement: Remove checkbox from SharePoint 2016 listview header! For a SharePoint links list, we had to remove checkbox from listview. Solution:  To remove checkbox in SharePoint list header, follow these steps: Click on "Modify View" button from the List Tab of the ribbon menu. Scroll down and uncheck "Allow individual item checkboxes" tick mark under Tabular View ! Click on "OK" button to save your changes. This removes the checkbox in list view. Remove checkbox in SharePoint xsltlistviewwebpart: For Dataview/XSLTListViewwebpart, Open the view page in SharePoint Designer, Edit the list view page, Set TabularView="False" under "View" tag to remove checkbox! Remove checkbox from SharePoint list using PowerShell: Use this PowerShell script to remove checkbox from listview web part. Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Configuration Parameters $WebURL="http://intranet.cre
Remove Checkbox from SharePoint Listview Web Part Remove Checkbox from SharePoint Listview Web Part Reviewed by Salaudeen Rajack on 6:47 PM Rating: 5

How to Enable Client Integration in SharePoint 2013?

1:51 PM    , , , ,
Client integration setting in SharePoint enables or disables SharePoint-Client applications integration, such as starting client application based on the document types. It also provides features such as Open in Explorer view, Upload multiple documents, Edit in datasheet, etc. Enable client integration in SharePoint 2013 central administration SharePoint client integration is not enabled in forms authentication, by default. To activate client integration in SharePoint, follow these steps: Go to SharePoint 2013 Central Administration >> Application Management >> Click on "Manage Web Applications" under Web Applications. Select your target web application for which you would like to enable or disable client integration. Click on "Authentication Providers" button from the ribbon. Click on the Zone name - Default in the "Authentication Providers" popup. In the edit authentication providers page, under "Client Integration" sec
How to Enable Client Integration in SharePoint 2013? How to Enable Client Integration in SharePoint 2013? Reviewed by Salaudeen Rajack on 1:51 PM Rating: 5

SharePoint 2016 RTM is Released!

12:59 AM    
So the waiting period is over! SharePoint 2016 is in its RTM now! Download SharePoint 2016 RTM Trial from here: https://www.microsoft.com/en-us/download/details.aspx?id=51493 180 day Trial key: NQGJR-63HC8-XCRQH-MYVCH-3J3QR What's New: Fast Site Collection Creation, Durable Links, Hybrid Features, MinRoles, Large File support, etc. What's Lost: No more SharePoint Foundation, No Stand-alone Install Mode (with SQL Express), No FIM, etc.
SharePoint 2016 RTM is Released! SharePoint 2016 RTM is Released! Reviewed by Salaudeen Rajack on 12:59 AM Rating: 5

Disable Continuous Crawl in SharePoint 2013 using PowerShell?

7:49 PM    , , , ,
Continuous Crawl in SharePoint 2013 helps to keep the search results up to date. Configuring continuous crawl is explained in my another article: Configure Continuous Crawl in SharePoint 2016 . In some situations like maintenance, Index reset, etc you may have to turn-off continuous crawl in SharePoint. How to Disable Continuous Crawl in SharePoint 2013 using PowerShell? To disable continuous crawl on a specific SharePoint content source, Follow these steps: Login to SharePoint 2013 Central Administration as a Farm administrator. In Central Administration, Under Application Management, click on Manage service applications, and Pick your Search service application In Search Service Administration page, click on Content Sources link under Crawling section of the left navigation menu. In the Manage Content Sources page, click on the drop down arrow from the SharePoint content source to which you want to disable continuous crawl. Select Disable Continuous crawl and Confirm that y
Disable Continuous Crawl in SharePoint 2013 using PowerShell? Disable Continuous Crawl in SharePoint 2013 using PowerShell? Reviewed by Salaudeen Rajack on 7:49 PM Rating: 5

Enable Continuous Crawl in SharePoint 2013 using PowerShell

7:41 PM    , , ,
Continuous Crawl was introduced in SharePoint 2013 to keep the search results as fresh as possible. To enable Continuous crawl in SharePoint 2013, follow these steps: Login to SharePoint 2013 Central Administration as a Farm Administrator. In Central Administration, Click on Manage service applications under the Application Management tab Click on your Search service application. In the Search Service Administration page, click on Content Sources link from the left navigation. On the Manage Content Sources page, click the SharePoint content source to which you want to enable continuous crawl. Scroll down and select "Enable Continuous Crawls" option under the Crawl Schedules section. Click OK to save your changes. SharePoint 2016: Enable continuous crawl with PowerShell Here is the PowerShell script to enable continuous crawl in SharePoint 2013 or SharePoint 2016. #Get Search service application $SSA = Get-SPEnterpriseSearchServiceApplication #Get the content
Enable Continuous Crawl in SharePoint 2013 using PowerShell Enable Continuous Crawl in SharePoint 2013 using PowerShell Reviewed by Salaudeen Rajack on 7:41 PM Rating: 5

Set SharePoint 2013 Continuous Crawl Interval using PowerShell

7:00 PM    , , ,
Continuous crawl helps to keep the search results as fresh as possible. By default, SharePoint 2013 continuous crawl frequency is set to 15 minutes. In some cases, you may have to adjust the schedule for continuous crawl frequency. This can be done only through PowerShell as there is no GUI to adjust continuous crawl schedule. SharePoint 2013 continuous crawl interval using PowerShell Use this PowerShell script to set continuous crawl frequency in SharePoint 2013 or SharePoint 2016. Get the current crawl schedule $SearchServiceApp = Get-SPEnterpriseSearchServiceApplication $SearchServiceApp.GetProperty("ContinuousCrawlInterval") SharePoint 2013 continuous crawl interval PowerShell: #Set sharepoint continuous crawl interval $SearchServiceApp = Get-SPEnterpriseSearchServiceApplication $SearchServiceApp.SetProperty("ContinuousCrawlInterval",5) This sets the continuous crawl frequency to 5 Minutes. Related Post: SharePoint 2013 continuous crawl explained
Set SharePoint 2013 Continuous Crawl Interval using PowerShell Set SharePoint 2013 Continuous Crawl Interval using PowerShell Reviewed by Salaudeen Rajack on 7:00 PM Rating: 5

The Database name located at the specified database server contains user-defined data.- Error in SharePoint Products Configuration Wizard

5:23 PM    , ,
Error: SharePoint Products Configuration Wizard:   The Database name located at the specified database server contains user-defined data. Databases must be empty before they can be used. Delete all of the tables, stored procedures, and other objects, or use a different database . Root cause: This is due to the fact, previous installation failed in between and left the SharePoint_Config database in SQL Server! Solution: Delete the SharePoint_Config database created by the previous installation!
The Database name located at the specified database server contains user-defined data.- Error in SharePoint Products Configuration Wizard The Database name located at the specified database server contains user-defined data.- Error in SharePoint Products Configuration Wizard Reviewed by Salaudeen Rajack on 5:23 PM Rating: 5

Change Timer Job Schedule in SharePoint using PowerShell

1:33 PM    , , , ,
Requirement:   Change timer job schedule in SharePoint for "User Profile Service Application - Activity Feed Job". Solution: To Set SharePoint timer job schedule, follow these steps: Go to the Central Administration >> Monitoring >> Timer Job >> Review job definitions Find "User Profile Service Application - Activity Feed Job",  In Edit Timer job page, set up the activity feed sync time according to your needs. By default, its set to run for every 10 Minutes. SharePoint PowerShell to change timer job schedule SharePoint 2013 timer job Schedules can be set through the Set-SPTimerJob cmdlet. Here is the PowerShell script to change timer job schedule. #Timer job Display name $TimerJobName="User Profile Service Application - Activity Feed Job" #Get the Timer job $TimerJob = Get-SPTimerJob | Where-Object { $_.displayname -like $TimerJobName } #Set sharepoint timer job schedule powershell Get-SPTimerJob $TimerJob | Set-SPTimer
Change Timer Job Schedule in SharePoint using PowerShell Change Timer Job Schedule in SharePoint using PowerShell Reviewed by Salaudeen Rajack on 1:33 PM Rating: 5

Enable-Disable Timer Jobs using PowerShell in SharePoint

1:10 PM    , , , , , ,
Timer jobs perform specific tasks in SharePoint through Windows Timer service, such as sending email alerts at a scheduled time. In SharePoint Central Administration site you can check the timer jobs, disable or enable specific timer jobs. PowerShell Script to Check Timer Job Status: #Function to Check Timer job status Function Get-TimerJobStatus($TimerJobName) { $TimerJob = Get-SPTimerJob | Where-Object { $_.displayname -like $TimerJobName } if($TimerJob -eq $null) { Write-host "Timer job not found!" -ForegroundColor Red return } $TimerJobDisabled = $TimerJob | Select -ExpandProperty IsDisabled if($TimerJobDisabled) { Write-host "Timer Job is Disabled!" -ForegroundColor Yellow } else { Write-host "Timer Job is Enabled!" -ForegroundColor Green } } $TimerJobName="My Site Cleanup Job" Get-TimerJobStatus $TimerJobName How to Disable a Timer job in SharePoint?
Enable-Disable Timer Jobs using PowerShell in SharePoint Enable-Disable Timer Jobs using PowerShell in SharePoint Reviewed by Salaudeen Rajack on 1:10 PM Rating: 5

SharePoint Online: Export List Items to CSV using PowerShell

4:35 PM    , , ,
Requirement:  Export SharePoint online list items to CSV file from client side. PowerShell script to Export SharePoint List Items to CSV from Client Side (CSOM): #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" ##Variables for Processing $SiteUrl = "https://crescent.sharepoint.com/sites/poc/" $ListName="Employee" $ExportFile ="c:\Scripts\ListRpt.csv" $UserName="Salaudeen@crescent.com" $Password ="Password goes here" #Setup Credentials to connect $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName,(ConvertTo-SecureString $Password -AsPlainText -Force)) #Set up the context $Context = New-Object Microsoft.SharePoint.Client.ClientC
SharePoint Online: Export List Items to CSV using PowerShell SharePoint Online: Export List Items to CSV using PowerShell Reviewed by Salaudeen Rajack on 4:35 PM Rating: 5

Copy Files Between Document Libraries in SharePoint using PowerShell

6:38 PM    , , , , ,
Requirement: Copy Files between SharePoint Document Libraries using PowerShell   PowerShell Script to Copy a File from One Library to Another: Here is my PowerShell script to copy files between SharePoint document libraries: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Variables for Processing $WebURL="https://portal.crescent.com/sites/Sales/" $SourceFile="https://portal.crescent.com/sites/Sales/TeamDocs/InvoiceTemp.xlsx" $TargetLibrary="Invoice Documents" #Get Objects $Web = Get-SPWeb $WebURL $SourceFile = $Web.GetFile($SourceFile) $TargetLibrary = $Web.GetFolder($TargetLibrary) #Copy the file into the Target library $File = $TargetLibrary.Files.Add($SourceFile.Name, $SourceFile.OpenBinary(), $true) #Copy Meta-Data $Item = $File.Item $item["Created"] = $SourceFile.TimeCreated.ToLocalTime() $item["Modified"] = $SourceFile.TimeLastModified.ToLocalTime() $item["Author"] = $SourceFile.Aut
Copy Files Between Document Libraries in SharePoint using PowerShell Copy Files Between Document Libraries in SharePoint using PowerShell Reviewed by Salaudeen Rajack on 6:38 PM Rating: 5
Powered by Blogger.