Thursday, August 3, 2017

Tuesday, June 13, 2017

Using PowerShell to Get SharePoint Content database size

To get the all CONTENT_DB  size in SHAREPOINT server(MB), Using below commands power shell commands.

Get-SPDatabase | Sort-Object disksizerequired -desc | Format-Table Name, @{Label ="Size in MB"; Expression = {$_.disksizerequired/1024/1024}} >c:\Content_DBsize.txt

The above code will export to C drive and you can change drive for your requirement.

Monday, May 8, 2017

Inherit Subsite Master Page from Parent Master Page in Sharepoint Foundation 2013

Do you want to change the master page setting for just one site, then use the script below:

$web = Get-SPWeb siteurl
$web.MasterUrl = "masterpagerelativeurl"

The script would be as follows:

$web = Get-SPWeb http://portal/sites/collaboration
$web.MasterUrl = "/sites/collaboration/_catalogs/masterpage/customSeatle.master"

Refreshing the root site in the browser will show the new master page design, but all sub-sites will still show the old master page design – this is because they are each using a master page stored on their respective site. To change the master page setting for all sites in a site collection, use the following script:

$site = Get-SPSite http://portal/sites/collaboration
$site | Get-SPWeb -limit all | ForEach-Object { $_.MasterUrl = "/sites/collaboration/_catalogs/masterpage/customSeatle.master";$_.Update() }

Note that this will only change existing sites and will not set a custom master page for any new sites created. To update new sites, you will need to either run the script every time a new site is created, or use an alternative approach such as a feature receiver/stapler or Web provisioning event receiver to automatically set the new master page on site creation.

Do you want to revert all team sites in the site collection back to using their own default master page again, then use the following script:

$site = Get-SPSite http://portal/sites/collaboration
$site | Get-SPWeb -limit all | ForEach-Object { $_.MasterUrl = $_.ServerRelativeUrl + "/_catalogs/masterpage/v4.master";$_.Update() }

Friday, April 21, 2017

SharePoint 2013 Foundation – Hide Recent from Left Navigation

The "Recent" section in the left navigation of SharePoint 2013 Foundation is incredibly annoying.  In my opinion, it’s something that should be off by default, but we should have a way to enable it as desired through the user interface.  Unfortunately, it’s on by default and if we want to turn it off, we can’t.  It’s not possible.

Hide “Recent” section on one page

1.       Edit the page
2.       Add a Content Editor Web Part to the page
3.       Paste this code into the Content Editor Web Part, making any changes you need to.
script type="text/javascript">
 $(document).ready(function() {
  $("#sideNavBox .ms-core-listMenu-item:contains(‘Recent’)").parent().hide();
4.       Save/Check In/Publish the page and you’re done.

Hide “Recent” section on all pages

This assumes that all pages in your site collection are referencing the same master page.  Of course if you have multiple master pages and site collections, you’ll need to do this for each master page being used within each site collection.
1.       Edit the master page of your site in SharePoint Designer 2013 (other methods work fine as well).
2.       Add a reference to jQuery in the HTML section of your master page.
3.       Add the jQuery script to hide the “Recent” section within the “PlaceHolderAdditionalPageHead” content placeholder.
      script type="text/javascript">
 $(document).ready(function() {
  $("#sideNavBox .ms-core-listMenu-item:contains(‘Recent’)").parent().hide();
4.       Save/Check In/Publish the master pages and you’re done.

Friday, March 10, 2017

Nintex - the-form-has-controls-that-have-incomplete-property-settings

Delete all existing layout in that task form and publish and export and import workflow to other sites

Wednesday, February 15, 2017

The worklfow name is used elsewhere on this site. Please choose another name in Nintex Workflow

Scenario 1:
I have created a workflow with name “Copy Workflow”.Even after deleted the workflow and started creating new workflow with same name “Copy Workflow” below error is displaying.
Scenario 2:
I have list with workflow name is "test1" then i deleted list and recreated list then trying to import nintex workflow with same name "test1" then the below error is displaying

The worklfow name is used elsewhere on this site. Please choose another name in Nintex Workflow
There is a hidden list that contains the workflow definition files. You may need to remove the specificfolder (with the workflow name) to remove the workflow completely. If your site ishttp://test01/sites/test/ the url would be http://test01/sites/test/NintexWorkflows/.