SharePoint Site Features

Location of list of features (default location)
c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\TEMPLATE\FEATURES\

Check for Site collection level or subsite level!

To check Features enable or disable
Site Settings > Under Site Action \ Manage Site Feature  (/_layouts/15/ManageFeatures.aspx)

Also Cheeck Feature is enable or disable from Site Collection Level
Site Settings > Site Collection Administration \ Site Collection features
(_layouts/15/ManageFeatures.aspx?Scope=Site)

Get-SPFeature -Site http://sitename/sites/yoursite | out-gridview

Get the name of required feature – example below is SharePoint Server Enterprise Site Features

Set feature value to variable

$SharePointServerEnterpriseSitefeatures="0806d127-06e6-447a-980e-2e90b03101b8"

Search if available

Get-SPFeature -Site http://sitename/sites/yoursite | where {$_.Id -eq $SharePointServerEnterpriseSitefeatures}

Enable the feature

Enable-SPFeature -Url http://sitename/sites/yoursite -Identity $SharePointServerEnterpriseSitefeatures -Confirm:$false -Force

Disable feature

Disable-SPFeature -Url http://sitename/sites/yoursite -Identity $SharePointServerEnterpriseSitefeatures -Confirm:$false

IMPORTANT NOTE:  After making these changes it could take 24 hours for the changes to appear or depend upon the size of your farm.

List of all SP: https://blogs.msdn.microsoft.com/razi/2013/10/28/listing-all-sharepoint-server-2013-features-including-name-title-scope-id-and-description/

Troubleshooting SharePoint DB Connectivity

While troubleshooting SharePoint environment when it is down, one of the way out is to check the DB connection. So, there is easy way to make sure that SharePoint databases are up and running.

1. Log on the any SharePoint Front-end server

2. Create new file with UDL extension (TestConnection.udl).

3. Go to the properties of TestConnection.udl file and click on tab Connection.

4. Under the server name use the same instance that you use to connect with SharePoint Production database

5. Then choose the first option if you logged in with farm account or privileged account otherwise type username and password

6. Select SharePoint_Config (Or any database) database

7. Click the test connection.

This will indicate you that connection established between front-end and database is up and running.

How to check DBs Used space and row counts

SQL Report to check the DBs used space and row counts

For smooth migration it’s always recommended to go through the environment validation and part of prerequisite is to check the SharePoint Content DB size and row counts which may interrupt the migration also check out SharePoint boundaries and limits.

https://docs.microsoft.com/en-us/sharepoint/install/software-boundaries-and-limits-0

SQL Command:
(To avoid any support from MS, I strongly recommend you to run below command in the non-production environment)

DECLARE c CURSOR READ_ONLY FAST_FORWARD FOR
SELECT [TABLE_NAME]
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = ‘BASE TABLE’
DECLARE @tableName varchar(100)
OPEN c
FETCH NEXT FROM c INTO @tableName
WHILE (@@FETCH_STATUS = 0)
BEGIN
exec sp_spaceused @tableName
FETCH NEXT FROM c into @tableName
END
CLOSE c
DEALLOCATE c

Reference: http://blogs.msdn.com/b/sowmyancs/archive/2012/06/29/alldocversions-amp-alldocstreams-table-size-after-upgrading-to-sharepoint-2010.aspx

SharePoint Trouble Shooting

SharePoint Trouble Shooting for Administrator (On-Promises)

There are numerous way to trouble shoot when SharePoint Farm is down or any services are not running properly:

1. Check Servers are running by pinging from any machine. Example: ping

2. Check DB is up and running by creating udl file and passing the SharePoint DB instance and credential and test the connection.

3. Check your IIS, app pool

4. Manually check SharePoint services

5. Check is there any 3rd party tools or new updates applied on system level such as firewalls etc.

6. Check security policy or AD group policy applied?

7. Read the application ULS Logs using ULSViewer application

8. Read Windows application event logs filter with Error and Critical/High from front-end/application/DB servers

9. Check disk storage in all SharePoint servers

10. Note CPU and Memory utilization

11. Make sure farm account is active (not locked out, not disabled etc.)

12. Check other application running on your intranet? If No, meaning could be network issue or datacenter

13. If Portal application is running on https secure socket layer, double check the SSL certificate expiry date

14. Restart all Front-end servers’ IIS with no force option one by one

15. Read the browser HTTP/Request based error 404 or 401, 500, 503

16. Investigate is the issue related to one user/group of users/building Zone/Region?

17. Clear client browser cache or refresh browser using Ctrl+F5

18. Add URL/APP to trusted sites

19. In the last you need to open the support ticket with Microsoft.

20. Check BlobCache Size in the web.config file with storage drive

I decided the list down soem useful checklist which I experienced so far becasue when the evnironment is down sometime it is difficult to focus on key areas.

In the end it is always good to share your experience with others.

“Blob Cache” HTTP Error 503, The service is unavailable

HTTP 503 Error
I have experienced with HTTP 503 error which means there are some requests temporary overloaded and therefore temporary services are unavailable.
The main reason was identified that storage drive is full therefore the services got hanged but after looking at BlobCache settings I figure out the drive space is less than the BlobCache maximum size.

The services are back after fixing the BlobCache size issue:

Web.config

Note: You need to pass number in GBs for maxSize.

<BlobCache location=”E:\BlobCache” path=”\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$” maxSize=”10″ enabled=”true” />

How to track permission changed in SharePoint

Here are some tips to identify or track the permission changed in SharePoint.

Prerequisites:

1. Reporting feature should be activated at site collection level. (From CA, option is available under Site Collection Administrator section)

2. Make sure audit logs not purged. (Usually there is duration specified to trim the audit logs)

How to:

1. Click Audit log reports. (From CA, option is available under Site Collection Administrator section)

2. Under Security And Site Settings Reports click the security settings option.

3. Confirm the location of log file.

4. Once process completed, open log file in excel and filter out event column with “Security Group Member Delete”

5. Under Event Data column, check the tag ID Number it will display with numeric value. (For instance 1234 is the ID Number displaying under user)

6. Navigate to this URL http://yoursite/_layouts/userdisp.aspx?ID=1234&force=1 (Pass the same user id,)

7. Finally you will find which user was deleted and if you want to know who deleted then check the column “User ID”

SharePoint Inventory

In this post I’ve sum up some power shell scripts for SharePoint Inventory, I will keep update this post with new PS scripts so that other admins benefits from this post.

Add-PSSnapin Microsoft.SharePoint.PowerShell
[System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$web = Get-SPWeb "http://yourportaladdress"
$list = $web.Lists["NameOfList"]
$DeleteBeforeDate = [Microsoft.SharePoint.Utilities.SPUtility]::CreateISO8601DateTimeFromSystemDateTime([DateTime]::Now.AddDays(-10))
$caml='<Where> <Lt> <FieldRef Name="Created" /><Value Type="DateTime">{0}</Value> </Lt> </Where> ' -f $DeleteBeforeDate
$query=new-object Microsoft.SharePoint.SPQuery
$query.Query=$caml
$col=$list.GetItems($query)
Write-Host ("Total Item's created before 10 days is : {0}" -f  $col.Count)
$confirmation = Read-Host "Are you Sure You Want To Proceed (y/n):"
if ($confirmation -match "[yY]") {
  $col | % {$list.GetItemById($_.Id).Delete()}
}
$web.Dispose()

AppFabric 1.1 for SharePoint 2016 uninstall and Re-Install

By testing some components I have uninstall the AppFabric 1.1 from SharePoint 2016 afterward I tried many ways to re-install it but end with no luck.

Command to install AppFabric:
 Start-Process ":\PrerequisiteInstaller.exe" –ArgumentList "/AppFabric:\WindowsServerAppFabricSetup_x64.exe"

There wasn’t any log representing what was the issue other than showing warning “AppFabric caching service is not installed.” And prerequisite end with failed to install AppFabric.

Solution:
By removing the PSModulePath from Windows Environment Variables you can able to re-install the AppFabric. How?:
Type sysdm.cpl in search window –> go to Advanced tab –> Click on Environment Variables –> Now delete the PSModulePath

Reference: https://social.msdn.microsoft.com/Forums/sharepoint/en-US/cad3404d-1eef-4378-a208-b643c1716998/appfabric-11-for-sharepoint-2013-uninstall-and-reinstall?forum=sharepointdevelopment

 

SharePoint 2016 prerequisite pending restart message

While installing the SharePoint 2016 prerequisites, I stuck with message: “A System Restart from a previous installation or update is pending…” even though I have installed all the prerequisites well after rebooting server many times I am unable to complete the prerequisites.

So I google many sites I found very simple and easy step to by pass the restart message.

Here it is:

1. Go to registry Editor (type in command prompt RegEdit)

2. Locate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager

3. Rename the value PendingFileRenameOperations to BypassPendingFileRenameOperations

4. Close the Resigtry Editor window

5. Rerun the SharePoint Setup file, you will notice it will by pass the restart message.

Note: Do not reboot the server after changing the registry otherwise it will again make variable with the name “PendingFileRenameOperations”, in case you did then remove the additional file.

Enjoy…

Reference: https://social.technet.microsoft.com/Forums/office/en-US/f29b066e-9cd5-4a71-9db1-77ba01e40173/a-system-restart-from-a-previous-installation-or-update-is-pending?forum=sharepointadmin

 

Setup is unable to proceed, A system restart from a previous installation or update is pending

Issue:

You might face error “Setup is unable to proceed due to..” once you start installing the SharePoint Server 2016.

1

Reason:

During the prerequisites setup required many times reboot but in case you missed and proceed with other installation, you may end up with “Restart your computer and run setup to continue.” Error, even you restart several times but doesn’t work.

 

Solution:

  1. Open Regedit console from command prompt (run as administrator)
  2. Navigate to “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager” location.
  3. On the right pane, select PendingFileRenameOperations right click and select Delete.

Note: There is no need to reboot the system.

  1. Now try to rerun the setup file, setup will prompt to enter SharePoint Server Key.

 

Reference:

https://technet.microsoft.com/en-us/library/cc164360(v=exchg.80).aspx