Tagged: Sharepoint Toggle Comment Threads | Keyboard Shortcuts

  • akhileshgandhi 6:52 pm on May 20, 2014 Permalink | Reply
    Tags: , full control, Sharepoint   

    Sharepoint user group with full controll getting access denied 

    Sharepoint user group with full controll getting access denied

     

    This would happen if you deleted default group and have recreated new groups again. When you did that new Owners group does not have permission to Access Request list and thus when you try to modify or go to user permissions you get access denied.

    Get Access request list GUID from powershell

     

    cls
    $myweb = Get-SPWeb -Identity  weburl
    $id = $myweb.Lists[“Access Requests”].Id
    $id

     

    Now EditList permissions by doing following

    weburl/_layouts/15/ListEdit.aspx?List=GUID of list

    grant newly created owners group full control on this list

    this should solve the problem

    Advertisements
     
  • akhileshgandhi 6:48 pm on May 20, 2014 Permalink | Reply
    Tags: 2013, , security group, Sharepoint   

    Sharepoint Security Groups not getting updated 

    When user add’s and removes members in security group it does not get updated in sharepoint.

     

    Core reason for this problem is security token service is caching your security token for 24 hours. You need to change default settings to update token expiration. It should not be to low value as it will affect performance thus I reasonable time is atleast 60 minutes

     

     

    cls
    $sptokensvc= Get-SPSecurityTokenServiceConfig
    $sptokensvc
    $sptokensvc.FormsTokenLifetime = (New-TimeSpan -minutes 60)
    $sptokensvc.WindowsTokenLifetime = (New-TimeSpan -minutes 60)
    $sptokensvc.LogonTokenCacheExpirationWindow = (New-TimeSpan -minutes 30)
    $sptokensvc.Update()
    iisreset

     
  • akhileshgandhi 12:26 am on July 9, 2013 Permalink | Reply
    Tags: large list, , Sharepoint   

    PowerShell script to delete sharepoint large list in batch job 

    write-host

    1. Enter your configuration here

    $siteUrl = “http://abc/SiteDirectory/test/”
    $listName = “ErrorWarning”
    $batchSize = 100

    write-host “Opening web at $siteUrl…”

    $site = new-object Microsoft.SharePoint.SPSite($siteUrl)
    $web = $site.OpenWeb()
    write-host “Web is: $($web.Title)”
    $q = New-Object Microsoft.SharePoint.SPQuery ;
    $q.RowLimit = 100;

    $list = $web.Lists[$listName];
    write-host “List is: $($list.Title)”
    $command = [string]::Format(“<Method><SetList Scope=`”Request`”>{0}</SetList><SetVar Name=`”ID`”>{{0}}</SetVar><SetVar Name=`”Cmd`”>Delete</SetVar><SetVar Name=`”owsfileref`”>{{1}}</SetVar></Method>”, $list.ID);

    while ($list.ItemCount -gt 0)
    {
    write-host “Item count: $($list.ItemCount)”
    $coll = $list.GetItems($q);

    $sbDelete = New-Object -TypeName “System.Text.StringBuilder”;
    [void]$sbDelete.Append(“<?xml version=`”1.0`” encoding=`”UTF-8`”?><Batch>”)

    $ids = @()
    for ($i=0;$i -le $coll.Count;$i++)
    {
    $item = $coll[$i];
    [void]$sbDelete.Append([string]::Format($command, $item.ID.ToString(), $item.File.ServerRelativeUrl));
    $ids = $ids + $item.UniqueId;
    }
    $sbDelete.Append(“</Batch>”);

    write-host

    write-host “Sending batch…”

    1. We execute it

    $result = $web.ProcessBatchData($sbDelete)

    write-host “Emptying Recycle Bin…”

    1. We remove items from recyclebin

    $web.RecycleBin.DeleteAll()

    write-host

    $list.Update()
    }

    write-host “Done.”

     
  • akhileshgandhi 6:52 pm on July 2, 2013 Permalink | Reply
    Tags: , lastmodified, , Sharepoint, , size   

    Get All SiteCollection Audit Info 

    cls
    #get-spsite -Limit All -ContentDatabase WSS_Content_ProjectServer | select url,@{label=”Size in GB”;Expression={$_.usage.storage/1024MB}} | Format-Table –AutoSize

    function ProcessSiteCollection($site)
    {

    $list = $site.url

    if ($site.Quota.Storagemaximumlevel -gt0)
    {
    [int]$MaxStorage = $site.Quota.StorageMaximumLevel /1MB
    }
    else
    { $MaxStorage = “0”
    };
    $contentDbName = get-spsite -Identity $list -Limit All | select contentdatabase
    if ($site.Usage.Storage -gt0) {[int]$StorageUsed = $site.Usage.Storage /1MB};
    if ($Storageused -gt0 -and $Maxstorage -gt0){[int]$SiteQuotaUsed = $Storageused / $Maxstorage * 100} else {$SiteQuotaUsed = “0”};
    $subsite = New-Object System.Object

    $subsite | Add-Member -MemberType NoteProperty -Name “Url” -Value $site.Url
    $subsite | Add-Member -MemberType NoteProperty -Name “Web Application” -Value $Webapp.DisplayName
    $subsite | Add-Member -MemberType NoteProperty -Name “Owner Name” -Value $site.Owner.Name
    $subsite | Add-Member -MemberType NoteProperty -Name “Owner Email” -Value $site.Owner.Email
    $subsite | Add-Member -MemberType NoteProperty -Name “Last Modified” -Value $site.LastContentModifiedDate.ToShortDateString()
    $subsite | Add-Member -MemberType NoteProperty -Name “Quota Limit (MB)” -Value $MaxStorage
    $subsite | Add-Member -MemberType NoteProperty -Name “Total Storage Used (MB)” -Value $StorageUsed
    $subsite | Add-Member -MemberType NoteProperty -Name “Site Quota Percentage Used” -Value $SiteQuotaUsed
    $subsite | Add-Member -MemberType NoteProperty -Name “Content DB” -Value $site.ContentDatabase.Name
    $global:SiteCollInfo += $subsite

    Write-Host “Title :” $site.HostName
    Write-Host “Url :” $site.Url
    Write-Host “Web Application” $Webapp.DisplayName
    Write-Host “Owner Name” $site.Owner.Name
    Write-Host “Owner Email” $site.Owner.Email
    Write-Host “Last Modified” $site.LastContentModifiedDate.ToShortDateString()
    Write-Host “Quota Limit (MB)” $MaxStorage
    Write-Host “Total Storage Used (MB)” $StorageUsed
    Write-Host “Site Quota Percentage Used” $SiteQuotaUsed
    Write-Host “Content DB” $site.ContentDatabase.Name
    Write-Host
    # $web = Get-SPWeb $site.Url
    # [long]$total = 0
    # # $total += GetWebSize -Web $web
    # $val = ProcessSubWebs -Site $web
    # $total += $total +$val ;
    # $totalInMb = ($total/1024)/1024
    # $totalInMb = “{0:N2}” -f $totalInMb
    # $totalInGb = (($total/1024)/1024)/1024
    # $totalInGb = “{0:N2}” -f $totalInGb
    # write-host “Total size of all sites below” $StartWeb “is” $total “Bytes,”
    # write-host “which is” $totalInMb “MB or” $totalInGb “GB” -foregroundcolor blue
    $web.Dispose()

    }

    function ProcesWebApplication($Webapp)
    {
    Write-Host “Web Application : ” $webApp.name
    Write-Host “Application Pool : ” $webApp.ApplicationPool.Name
    # #Get all Solution in Web Application
    # Get-SPSolution | ForEach-Object {
    # if ($_.LastOperationDetails.IndexOf($webApp.url) -gt 0)
    # {
    # Write-Host ” Solutions:”
    # Write-Host ” ” $_.DisplayName
    # }
    # }

    #Get All Site Collection in a Web Application
    foreach($site in $webApp.Sites)
    {
    ProcessSiteCollection $site ;
    $site.Dispose()
    }

    }

    $global:SiteCollInfo = @()
    #Get All Web Application
    $contentWebAppServices = (Get-SPFarm).services |? {$_.typename -eq “Microsoft SharePoint Foundation Web Application”}

     

    foreach($webApp in $contentWebAppServices.WebApplications)
    {

    ProcesWebApplication -Webapp $webApp;

    }

    $global:SiteCollInfo | Export-Csv -NoTypeInformation -Path “C:\AllSiteCollectionInfo.csv”

     
  • akhileshgandhi 9:25 pm on July 1, 2013 Permalink | Reply
    Tags: , pwoershell, Sharepoint   

    Sharepoint Audit Report 

     

    Get Items not modified for more then 3 years in entire Farm

     

    Get-SPSite -Limit All | Select -ExpandProperty AllWebs | Select -ExpandProperty Lists | Where { $_.GetType().Name -eq “SPDocumentLibrary” -and -not $_.Hidden } |
    Select -ExpandProperty Items |
    Where { $_[“Modified”] -lt (Get-Date).AddYears(-3) } |
    Select Name, {$_[“Modified”]},
    @{Name=”URL”;Expression={$_.ParentList.ParentWeb.Url + “/” + $_.Url}}

     

     

    Get Items where size is grreater then 5MB

    Get-SPSite -Limit All | Select -ExpandProperty AllWebs | Select -ExpandProperty Lists | Where { $_.GetType().Name -eq “SPDocumentLibrary” -and -not $_.Hidden } |
    Select -ExpandProperty Items | Where { $_.File.Length -gt 5MB } | Select Name, {$_.File.Length/1MB}, @{Name=”URL”;Expression={$_.ParentList.ParentWeb.Url + “/” + $_.Url}}

     
  • akhileshgandhi 8:46 am on August 22, 2012 Permalink | Reply
    Tags: micro blogging, Sharepoint   

    Micro blogging with personalization 

    Way to change Theme in Micro blogging site. I have added theme roller for users to select what color they like

    Image

    ImageImageImage

     
  • akhileshgandhi 5:12 am on June 29, 2012 Permalink | Reply
    Tags: fixed width, masterpage, Sharepoint   

    True fixed with master page with scrollbar just on page body 

    I saw multiple solutions on net with best guys in industry but none provided a true soltion for fixed with master page.

    after 3 sleepless night I got a hang how to create a fixed width master page

    step one as we need scroll bar only on body we will have to do is make overflow auto on both x and y on page this is kick in scrollbar on both side if size increase more then 980\700 in 1024\780 resolution and will not show scroll bar in higher resolution.

    I am 200% sure with below  css code you can achieve fixed width master page. shoot me a mail if you need any further assistance

    body
    {
    color: #dddee0;
    overflow-x:auto !important;
    overflow-y:auto !important;
    min-width:980px;
    min-height:700px;
    }
    body #s4-bodyContainer{
    min-width:980px !important;
    min-height:700px !important;
    overflow-y:visible !important;
    }

    body #s4-mainarea{
    overflow-y:visible !important;
    min-width:980px !important;
    min-height:700px !important;
    background-color:#dddee0 !important;

    }
    body #s4-workspace {

    overflow-x:visible !important;
    overflow-y:visible !important;
    min-height:750px !important;
    }
    .ms-bodyareacell{

    max-width:980px !important;
    overflow-y :visible;
    vertical-align:top;
    background-color: #FFF;

    /****overflow:hidden !important; **/
    }
    .s4-ba
    {
    max-width:980px !important;
    overflow-y:visible !important;
    }

     

     

     
  • akhileshgandhi 4:30 am on May 20, 2012 Permalink | Reply
    Tags: , jquery, microblogging, Sharepoint   

    asp.net based Micro-blogging +integration with sharepoint 

    I starting creating micro blogging tool a month ago. Initially I thought it would be waste of time as SharePoint 15 is going to have it, but then I thought why not try to make something which is going to be better then what sharepoint is going to create as I know what will be drawbacks with sharepoint microblogging

    all said lets get to work and describe what we did and how we did it.

    step 1. Created a initial database with following tables

    1. feed

    2. comment

    3. likes

    4. follow

    5. employee {users}

    2. Step two to create  Business layer and database layer to access this data. reason to do this we have a two set of logic one to insert retrieve data from database second to insert retrieve data in share-point

    3. step three is to create a jsonp webservice we serializes feed,comment,like,employee objects and can we accessed directly from javascript.

    4. Create a asp.net webapplication with FBWall.aspx and include following js files these are jquery plugins which helped in developing solution very fast

    attaching screenshot of solution and js files and css files included

    Image

    Image

    Image

    today I had included  timeago.js http://timeago.yarp.com/ . mesmerized by things which people have done and contributed.  timeago converts time into days or minutes ago

     
  • akhileshgandhi 11:48 pm on October 26, 2009 Permalink | Reply
    Tags: 2007, 2010, , Sharepoint, Upgrade   

    Sharepoint 2010 Installation & upgrade from 2007 

    In this article I will try to high light all the steps required for migrating from Sharepoint 2007 to 2010

    scenarios

    1. In Place Migration -(This is only possible if your Sharepoint installation is already on 64bit environment.

    2. Migrate Content DataBase

    In both the above scenario first step required will be to check if your Sharepoint installation in ready for Upgrade

    1. Run Pre-Updagrade Checker before migrating to 2010 to check for any potential issues 

    Command for pre upgrade checker 

    Stsadm –o preupgradecheckpreupgrade

    It will generate report

     preupgrade1

    Make Sure to fix all failed errors in the Report.

    2. For Content Database Migration.

    Write a batch file to back up all content databases in case you are moving Database Server from 32bit to 64bit environment   

    Command

     class=”hiddenSpellError” pre=””>osql -S ag-sql -E -Q ” BACKUP DATABASE ci_content_db1 TO DISK = ‘C:\C:\SharepointDB\ci_content_db1.bak’ ”

     backupcontentdatabase

    Attached is a sample batch file to take content database backup

    Command to Restore Database

     class=”hiddenSpellError” pre=””>osql -S ag-sql -E -Q ” Restore From DATABASE ci_content_db1 FROM DISK = ‘C:\C:\SharepointDB\ci_content_db1.bak’ ”

    attached is a sample batch file to restore content database.

    Once does with restore of content database .

    Lets install Sharepoint 2010 and then attach database with new feature to preview before update.


    • Windows Server 2008 Service Pack 2
    • Application Server Role, Web Server (IIS) Role
    • Microsoft SQL Server 2008 Native Client
    • Microsoft .NET Framework 3.5 SP1
    • Windows PowerShell(TM) V2 (CTP3)
    • Microsoft “Geneva” Framework Runtime
    • Microsoft Sync Framework Runtime v1.0 (x64)
    • Microsoft Chart Controls for Microsoft .NET Framework 3.5
    • Microsoft Filter Pack 2.0
    • Microsoft SQL Server 2008 Analysis Services ADOMD.NET
     

    For this issue fix is right version of Geneva runtime Framework

    http://download.microsoft.com/download/F/3/D/F3D66A7E-C974-4A60-B7A5-

     

    I will update soon on how to preview your old sites with new changes

     
  • akhileshgandhi 8:59 pm on May 14, 2009 Permalink | Reply
    Tags: file, free, , Sharepoint   

    Free File System to Sharepoint Migration Tool 

    I am working on Sharepoit from almost 4 years and thought it is time to contribute to community. I am writing a tool which will do end to end Sharepoint migration.

    1. File System to Sharepoint Migration

    2. Sharepoint to Sharepoint Migration

    3. Sharepoint to File System migration

    In that process first step I have taken is created this Sharepoint Migration Tool. though this is not a perfect tool as of yet but it does what it is suppose to.

    It allows to migrate content from File System to Sharepoint.

    Steps to Use this tool

    1. download SharepointManager.pdf attached with this post. and change extention from pdf to exe

    SharepointManager

    2 click on SharepointManager.exe

    31

     

    4.

    2

     

    5.

     

    3

    6

    4

     

    If you need more details about this.Contact me at akhilesh.gandhi@gmail.com

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel