Friday, March 2, 2012

Not to allow Contributor users to access webpart menu of the webparts

Put this JavaScript just before “</BODY>”  on Master Page .
<script language="JavaScript">
    var doc = document.getElementsByTagName('ie:menuitem');
    for (var i = 0; i < doc.length; i++) 
    {
        itm = doc[i];
        if (itm.id.match('MSOMenu') != null) 
        {
            itm.hidden = true; 
        }
    } 
</script>

For More Option:
http://blogs.msdn.com/b/tejasr/archive/2010/03/26/not-to-allow-contributor-users-to-access-webpart-menu-of-the-webparts.aspx

Thursday, March 1, 2012

Change Service Account for Web Application in Central Admin Using PowerShell


$WebApplication = Get-SPWebApplication <ApplicationURL>;

$ManagedAccount = Get-SPManagedAccount -Identity "<Domain Name>\<UserName>";

$WebApplication.ApplicationPool.ManagedAccount = $ManagedAccount;

$WebApplication.ApplicationPool.Update();

$WebApplication.update();


How to launch a document by clicking a link to the file?

Word: <a href='ms-word:ofe|u|path/to/web/word/document.docx'>Link to document</a> Excel: <a href='ms-excel:o...