Archive

Posts Tagged ‘SharePoint’

Steps to Remove orphan sites from SharePoint

April 28, 2015 Leave a comment

Remove Orphan sites from SharePoint Health Analyzer

1) Open Powershell and Run Test-SPContentDatabase command

Test-SPContentDatabase -Name <Database_Name> -WebApplication <URL>

This will show the IDs of the Orphan sites.

2) Run stsadm command to delete the site from the database

stsadm -o deletesite -siteId <ID> -databasename <database_name> -databaseserver <server_name> -force

Copy value from column to another using JQuery

August 19, 2011 1 comment

Copy the value from one column to another column on a New List Item Form.

In this example, I am populating the End Date Field with the Start Date Field value when user is filling out a meeting request form in SharePoint.

Add the following code on the page under “PlaceHolderMain” tag.

<script type="text/javascript" src="../../Shared Documents/Javascript/jquery/jquery.js">

$(document).ready(function(){
var strStartDate = $("input[title='Start Date']");
strStartDate.focusout(function()
 {
$("input[title='End Date']").val(strStartDate.val());
});
});
</script>

Alerts setup using the Intranet URL will not work for Internet URL in SharePoint

September 29, 2010 Leave a comment

Create the alerts while logged in the application using the Internet URL. Most likely you created the alerts using the internal URL and that’s why the email are showing the internal URL.If you have already created your alerts you can updated them using the PowerShell command:

Invoke-AlertFixup -site <NewURL> -oldurl <OldURL>

Thanks

Smartrider

Categories: PowerShell, SharePoint Tags: