Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts
Monday, December 21, 2015
Tuesday, January 14, 2014
Backup / Restore SharePoint site collection using PowerShell or STSADM commands
- Backup Using PowerShell
Backup-SPSite <URL of the site collection (Ex, http://server_name/sites/site_name)> -Path <full path to the backup file (Ex, C:\Backup\site_name.bak)>
- Backup Using STSADM
stsadm -o backup -url <URL of the site collection (Ex, http://server_name/sites/site_name)> -filename <full path to the backup file (Ex, C:\Backup\site_name.bak)> -overwrite
- Restore Using PowerShell
Restore-SPSite <URL of the site collection (Ex, http://server_name/sites/site_name)> -Path <full path to the backup file (Ex, C:\Backup\site_name.bak)> -Force
- Restore Using STSADM
stsadm -o restore -url <URL of the site collection (Ex, http://server_name/sites/site_name)> -filename <full path to the backup file (Ex, C:\Backup\site_name.bak)> -overwrite
Note: Using of -overwrite or -Force to overwrite an existing backup file or site collection if it already exists.
Monday, January 13, 2014
SharePoint configration database connection string
- SharePoint 2007
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDB
- SharePoint 2010
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Secure\ConfigDB
- SharePoint 2013
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\Secure\ConfigDB
Sunday, January 12, 2014
Install SharePoint solution using PowerShell or STSADM commands
First make sure to log in to SharePoint server (Application server is preferred) with Farm admin account and run PowerShell or command line as administrator
- Install Solution Using PowerShell
> Add-SPSolution <solution file name>
> Install-SPSolution -Identity <solution name> -WebApplication <virtual server url> -GACDeployment
- Install Solution Using STSADM
> stsadm -o addsolution -filename <solution file name>
> stsadm -o deploysolution -name <solution name> -url <virtual server url>
- Uninstall Solution Using PowerShell
> Uninstall-SPSolution -Identity <solution name> -AllWebApplications
> Remove-SPSolution -Identity <solution name>
Saturday, January 04, 2014
Tuesday, December 31, 2013
Thursday, December 26, 2013
Sign in as different user on SharePoint 2013
"Sign in as Different User" menu option is missing in SharePoint Server 2013
To work around this issue you can access your SharePoint site using below link
http://{SiteURL}/_layouts/closeConnection.aspx?loginasanotheruser=true
Note: Currently this option does not work in IE 10 and Safari.
Saturday, March 21, 2009
VSeWSS 1.3 (Mar 2009 CTP)
Visual Studio 2008 extensions for Windows SharePoint Services 3.0, v1.3 - Mar 2009 CTP
The tools provide item templates for List Definition, List Definition from Content Type, Content Type, Field Control, Web Part, Module, Root File, Template, Event Receiver, and List Instance. It provides project templates for Team Site Definition, Blank Site Definition, List Definition, Web Part and Empty. It works with Visual Basic .NET and C# languages and a comprehensive user guide is included. It does not include the SharePoint Workflow templates as they are built in with Visual Studio 2008.
The tools provide item templates for List Definition, List Definition from Content Type, Content Type, Field Control, Web Part, Module, Root File, Template, Event Receiver, and List Instance. It provides project templates for Team Site Definition, Blank Site Definition, List Definition, Web Part and Empty. It works with Visual Basic .NET and C# languages and a comprehensive user guide is included. It does not include the SharePoint Workflow templates as they are built in with Visual Studio 2008.
Sunday, March 08, 2009
Cross SharePoint Permission When Anonymouse Allowed
When Working With Anonymouse You Some Proplems in Permission The RunWithElevatedPrivileges Method Allow You to Executes a specified Code or method with Full Control rights even if the user does not otherwise have Full Control
SPSecurity.RunWithElevatedPrivileges(delegate()
{
//You Must Create SPSite Object and SPWeb Object Here
// Add Your Code Here Like Add Item to SharePoint List
});
SPSecurity.RunWithElevatedPrivileges(delegate()
{
//You Must Create SPSite Object and SPWeb Object Here
// Add Your Code Here Like Add Item to SharePoint List
});
Tuesday, February 24, 2009
SharePoint PreSaveAction
You can use below JavaScript function to execute any JavaScript Code in New or Edit Forms for SharePoint List before saving (When Pressing OK button this function will be fired first)
You can use this function for validation before PostBack
PreSaveAction()
{
//Add Your JavaScript Code Here Then Return True Or False
return false; // Cancel the item save process
return true; // OK to proceed with the save item
}
Get Value of any SharePoint Control Using JavaScript
You can Get any Form Field Value By Using This JS Function
function getTagFromIdentifierAndTitle(TagName, Identifier, Title)
{
var len = Identifier.length;
var tags = document.getElementsByTagName(TagName);
for (var i=0; i < tags.length; i++)
{
var tempString = tags[i].id;
if (tags[i].title == Title && (Identifier == "" tempString.indexOf(Identifier) == tempString.length - len))
{ return tags[i]; }
}
return null;
}
Ex:
getTagFromIdentifierAndTitle('input','TextField', 'Title').value
function getTagFromIdentifierAndTitle(TagName, Identifier, Title)
{
var len = Identifier.length;
var tags = document.getElementsByTagName(TagName);
for (var i=0; i < tags.length; i++)
{
var tempString = tags[i].id;
if (tags[i].title == Title && (Identifier == "" tempString.indexOf(Identifier) == tempString.length - len))
{ return tags[i]; }
}
return null;
}
Ex:
getTagFromIdentifierAndTitle('input','TextField', 'Title').value
Monday, February 23, 2009
SharePoint Site Backup and Restore Batch
Just copy backup part or restore part and past it in a new file then save it as *.bat
Backup Batch
Echo Site BackUp
@SET STSADM="%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
pause
%STSADM% -o backup -url http://localhost:2009/ -filename "FileName.bak" -overwrite
%STSADM% -o execadmsvcjobs
Restore Batch
Echo Restore Site
@SET STSADM="%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
pause
%STSADM% -o restore -url http://localhost:5000/ -filename "FileName.bak" -overwrite
%STSADM% -o execadmsvcjobs
Backup Batch
Echo Site BackUp
@SET STSADM="%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
pause
%STSADM% -o backup -url http://localhost:2009/ -filename "FileName.bak" -overwrite
%STSADM% -o execadmsvcjobs
Restore Batch
Echo Restore Site
@SET STSADM="%CommonProgramFiles%\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
pause
%STSADM% -o restore -url http://localhost:5000/ -filename "FileName.bak" -overwrite
%STSADM% -o execadmsvcjobs
Saturday, February 07, 2009
SharePoint 2007 Built-in JS Functions
//Get Current User
ID i.e - alert(_spUserId);
_spUserId
//Run JS Function on
Page Load
_spBodyOnLoadFunctionNames.push('FunctionName');
//First we must call
the EnsureSetup method
JSRequest.EnsureSetup();
//Get a query string
parameter called ItemId. i.e - "page.aspx?ItemId=11" will return 11
itemId =
JSRequest.QueryString["ItemId"];
//Get the current
page name. i.e - "default.aspx"
pageName =
JSRequest.FileName;
//Get the current
path name. i.e - "/doclib/default.aspx"
path = JSRequest.PathName;SharePoint RPC Protocol (URL Protocol)
//Get List items in XML format
http://localhost/_vti_bin/owssvr.dll?XMLDATA=1&List={ ListDUID }
//Get List items where FieldName = Value in XML format
http://localhost/_vti_bin/owssvr.dll?XMLDATA=1&List={ ListGUID }&View={ ViewGUID }&FilterField1= FieldName &FilterValue1= Value
you can try it in your browser and see the result
For More >>
http://localhost/_vti_bin/owssvr.dll?XMLDATA=1&List={ ListDUID }
//Get List items where FieldName = Value in XML format
http://localhost/_vti_bin/owssvr.dll?XMLDATA=1&List={ ListGUID }&View={ ViewGUID }&FilterField1= FieldName &FilterValue1= Value
you can try it in your browser and see the result
For More >>
Monday, December 29, 2008
Displaying List Attachments in Custom List Forms
Add this tage into your Custom List Forms
<SharePoint:AttachmentsField ControlMode="Display" FieldName="Attachments"
runat="server" Visible="true"/>
runat="server" Visible="true"/>
Sunday, December 28, 2008
Change SharePoint Page Title
Add the follwing content place holder in the top of your code if not exist
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
Add Title here
</asp:Content>
You can get title dynamic by add any of this tags into "PlaceHolderPageTitle"
<SharePoint:ListProperty Property="Title" runat="server"/>
<SharePoint:ListItemProperty Property="Title" runat="server"/>
<SharePoint:ProjectProperty Property="Title" runat="server"/>
<SharePoint:ListFormPageTitle runat="server"/>
Friday, November 21, 2008
SharePoint Development in Visual Studio 2010
The Visual Studio 2010 tools for SharePoint. Here's a quick summary of what he showed:
- Server Explorer for SharePoint viewing Lists and other artifacts in SharePoint directly inside of Visual Studio.
- Windows SharePoint Services Project (WSP file) Import to create a new solution.
- Added a new web part project item and showed the Visual web part designer which loads a user control as a web part for SharePoint.
- Showed adding an event receiver for SharePoint and using the wizard to choose the event receiver and to just create a source file with that event receiver.
- Added an ASPX workflow initiation form to a workflow project and showed how this workflow initiation form has designer capability.
- Showed the packaging explorer and the packaging editor which lets you structure the SharePoint features and WSP file that is created.
>> See This Video
- Server Explorer for SharePoint viewing Lists and other artifacts in SharePoint directly inside of Visual Studio.
- Windows SharePoint Services Project (WSP file) Import to create a new solution.
- Added a new web part project item and showed the Visual web part designer which loads a user control as a web part for SharePoint.
- Showed adding an event receiver for SharePoint and using the wizard to choose the event receiver and to just create a source file with that event receiver.
- Added an ASPX workflow initiation form to a workflow project and showed how this workflow initiation form has designer capability.
- Showed the packaging explorer and the packaging editor which lets you structure the SharePoint features and WSP file that is created.
>> See This Video
Do Less Get More Develop on SharePoint
Very Good Recourse to start developing in WSS
PPTs and Demos for Introductory SharePoint Developer Modules
Hands on Labs for Developing Applications on Windows SharePoint Services 3.0
Creating a Basic ASP.NET AJAX-enabled Web Part
Windows SharePoint Services 3.0 SP1 Developer Evaluation VPC Image
containing Windows SharePoint Services 3.0 SP1, Visual Studio 2008 and the Visual Studio 2008 extensions for Windows SharePoint Services 3.0, v1.1 for use with Virtual PC or Virtual Server (very good VM have all what you want to develop in WSS 3.0)
Reference Site:
SharePoint Developer Site
PPTs and Demos for Introductory SharePoint Developer Modules
Hands on Labs for Developing Applications on Windows SharePoint Services 3.0
Creating a Basic ASP.NET AJAX-enabled Web Part
Windows SharePoint Services 3.0 SP1 Developer Evaluation VPC Image
containing Windows SharePoint Services 3.0 SP1, Visual Studio 2008 and the Visual Studio 2008 extensions for Windows SharePoint Services 3.0, v1.1 for use with Virtual PC or Virtual Server (very good VM have all what you want to develop in WSS 3.0)
Reference Site:
SharePoint Developer Site
Subscribe to:
Posts (Atom)






