Tag Archives: affordable sharepoint hosting

SharePoint 2013 Hosting – ASPHostPortal.com :: How to Add or Remove A New User to SharePoint Group Using Powershell Script

How to Add or Remove A New User to SharePoint Group Using Powershell Script

In SharePoint site you can see usually a lot of groups. Sometimes administrator gets a task to add user to several groups. If it’s 3-5 groups you can do it manually, but if you need to add user to 30 groups? I’m too lazy to do it manually and too smart not do it at all.

SharePoint 2013 Hosting

  1. Start your windows PowerShell on your computer.
  2. Right click and select Run as administrator option.
  3. Paste the below script on the PowerShell window and click the enter button.
  4. Check your SharePoint site Feature will activated successfully.

So let’s start out PowerShell ISE and connect SharePoint CMD-let:

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
{ 
 Write-Host "Connect Sharepoint cmd-Let" 
 Add-PSSnapin Microsoft.SharePoint.PowerShell 
}

Let’s enter site collection url, username for inserting to groups and get array of destination SharePoint groups. For example, let this groups contain a string “admin”

$url = "http://user"
$userName = "user\testuser1"
$site = new-object Microsoft.SharePoint.SPSite($url) 
$web = $site.OpenWeb() 
$groups = $web.sitegroups
write-host "------get array of groups which contain a string "admin"-----" 
$myGroups = @(); 
foreach($group in $groups) { 
if($group -match "admin") { 
$myGroups += $group 
}

Go through each element of array and add user to SharePoint group

foreach ($gr in $myGroups) { 
#add user to SP Group
 Set-SPUser -Identity $userName -web $url -Group $gr 
 write-host "User " $userName "added to " $gr 
}

And if you made a false and, for example, entered wrong username, you can easily remove user from SharePoint groups with this PS-code:

foreach ($gr in $myGroups) { 
 $theGroup = $web.SiteGroups[$gr] 
 $theUser = $web.AllUsers.Item($userName) 
#Remove user from SP Group
 $theGroup.RemoveUser($theUser); 
 write-host "User " $userName " removed from " $gr
}

If you don’t want to collect these pieces here’s a full version:

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) 
{ 
 Write-Host "Connect Sharepoint cmd-Let" 
 Add-PSSnapin Microsoft.SharePoint.PowerShell 
}
$url = "http://user"
$site = new-object Microsoft.SharePoint.SPSite($url) 
$web = $site.OpenWeb() 
$groups = $web.sitegroups 
$userName = "user\testuser1" 
write-host "--------------" 
$i = 0; 
$myGroups = @(); 
foreach($group in $groups) { 
 if($group -match "admin") { 
 $myGroups += $group 
 } 
} 
foreach ($gr in $myGroups) { 
 write-host $gr 
#add user to SP Group
 Set-SPUser -Identity $userName -web $url -Group $gr 
 $theGroup = $web.SiteGroups[$gr] 
 $theUser = $web.AllUsers.Item($userName) 
#Remove user from SP Group
# $theGroup.RemoveUser($theUser); 
 write-host "User " $userName "added to " $gr 
}

If there are non-english letters in a group name or if the group you need is on another site (but in this site collection), then you can have error on Set-SPUser command. In this case I can advice you to use another command $web.SiteGroups[group name].AddUser(user)

foreach ($gr in $myGroups) { 
 Write-Output "Группа: $gr " 
#alternative way to add user to SP Group 
 $theUser = $web.AllUsers.Item($userName)
 $web.SiteGroups[$gr].AddUser($theUser) 
 Write-Output "User $userName added to $gr" 
}

Cheap and Recommended SharePoint 2013 Hosting

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability.

SharePoint 2013 Hosting – ASPHostPortal.com :: How to Configures Refining SharePoint Search and Searchable Columns

Adding search refiners and creating searchable columns with SharePoint On the web can be a small bit diverse then with SharePoint 2013 on premise. In this blog post I’ll clarify how to add search refiners and the best way to make custom columns searchable. You will find 5 significant components we ought to implement

ahp banner sharepoint-01

  • Create a custom column
  • Add some content
  • Map a crawled property to a refinable managed property
  • Created the alias
  • Configure the refiners

Solution

  1. Create your custom column, for example Product.
  2. Create some content with the custom column.
  3. Wait for the column to be added as a crawled property, this might take up to 24 hours.
  4. Open the SharePoint admin center and click on Search.
    1hdvl
  5. Click on Manage Search Schema.
  6. Depending on the type of column you will need to use different type of preset Managed Properties.
    Managed property name Data type for mapping
    RefinableDate00 – RefinableDate19 Dates.
    RefinableDecimal00 – RefinableDecimal09 Numbers with max three decimals.
    RefinableDouble00 – RefinableDouble09 Numbers with more than three decimals.
    RefinableInt00 – RefinableInt49 Whole numbers.
    RefinableString00 – RefinableString99 Strings, Person or Group, Managed Metadata, Choice and Yes/No
  7. Search the related type on Managed Property.
    2ksdhvp
  8. Click on Edit Map Property in het drop-down menu.
  9. Add the Crawled property of the custom column, in our example it will be ows_Product.
    3jkbnl;fc
  10. Fill in the alias, this will make the column searchable.
  11. Save the changes.
  12. Close the SharePoint admin center and open the search center result page.
  13. Set the page in edit modus and edit the Refinement web part.
    4dkjvb
  14. Click on Choose refiners, and add the managed property, in this example RefinableString01
  15. Change the display name to the custom columns name, otherwise the refiner will be shown as RefinableString01
  16. Search for some content and enjoy the result!

Result

5jkbsdvloBest Recommended SharePoint 2013 Hosting

ASPHostPortal.com
ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability

SharePoint 2013 Hosting – ASPHostPortal.com :: Deploying Managed Metadata Fields Declaratively

In this article, we will see how we are able to deploy Managed metadata fields in a declarative way in SharePoint

A managed metadata column lets you handle the data that people can enter into a column. Users select the terms or phrases that they enter within the column from a pre-defined set of managed terms.

ahp banner sharepoint-01The challenge comes if you desire to provision your custom managed metadata navigation field inside a declarative way, and adding this column to a content variety or a list instance without having losing all the strong functions that comes along making use of this field sort.

Out on the Box, if you added a managed column for your list SharePoint performs some actions behind the scene:

Creates a hidden note field attached to your column
Attached your list to two event receivers to update the taxonomy hidden list .
Fills in some properties related to the current web and taxonomy list id
Creates a taxonomy search managed  property after a full crawl that could be used as a refiner or even as a category column if you are planning to use the Product Catalog model.

So you’ll find a lot of articles explaining how you can deploy Managed Metadata Fields declarative in SharePoint, but they are scattered, so I decided to aggregate all of the suggestions and tricks to cover this activity.

  • Taxonomy Field  declarative XML, no tricks here

    <Field ID=”{20A3C69E-FFFB-43F4-BBDF-2D22BAF0EB84}”
    Type=”TaxonomyFieldType”
    DisplayName=”$Resources:myResourceFile,EventType”
    ShowField=”Term1033″
    Required=”TRUE”
    EnforceUniqueValues=”FALSE”
    Group=”Custom”
    StaticName=”CustomEventType”
    Name=”CustomEventType”
    Filterable=”TRUE”
    Sortable=”TRUE” />

  • SharePoint creates a hidden note field to be field with chosen values even though filling the taxonomy field, right here comes the tricky element, although adding your custom field towards the list you must add this hidden field in addition to it, The Display name need to comply with the following convention ‘TaxonomyField_0′ and the static name should adhere to the following convention ‘TaxononmyFieldTaxHTField0′, without having following this conventions SharePoint search will not create the crawled property for your custom column ‘ows_taxId_CustomEventType’, and for certain will not generate the managed house

    ‘owstaxidKataraEventType’<Field ID=”{09F37A61-50FE-413E-941F-3BEE2A1B5BF8}”
    Name=”CustomEventTypeTaxHTField0″
    StaticName=”KataraEventTypeTaxHTField0″
    SourceID=”http://schemas.microsoft.com/sharepoint/v3/fields”
    Type=”Note”
    DisplayName=”CustomEventType_0″
    Group=”Katara”
    Hidden=”TRUE” />

  • Soon after declaring the schema of each field you must get them connected together, and ought to attach the developed column to a specific Term Set and distinct Term to choose from as a source, this could possibly be achived by adding a function event receiver making use of the following code snippet.SPSite site = properties.Feature.Parent as SPSite;

    Guid eventFieldId = new Guid(“{20A3C69E-FFFB-43F4-BBDF-2D22BAF0EB84}”);if (site.RootWeb.Fields.Contains(eventFieldId))
    {
    TaxonomySession session = new TaxonomySession(site);
    if (session.TermStores.Count != 0)
    {
    var termStore = session.TermStores["Managed Metadata Serivce"];
    var group = termStore.Groups["YOUR GROUP NAME"];
    var termSet = group.TermSets["YOUR TERM SET NAME"];var eventTypeTerm = termSet.Terms["THE TERM NAME CONTAINING YOUR VALUE"];

    TaxonomyField eventField = site.RootWeb.Fields[eventFieldId] as TaxonomyField;

    //Attach the note field to the taxonomy field
    eventField.TextField = new Guid(“{09F37A61-50FE-413E-941F-3BEE2A1B5BF8}”);

    // Connect to MMS
    eventField.SspId = termSet.TermStore.Id;
    eventField.TermSetId = termSet.Id;
    eventField.TargetTemplate = string.Empty;
    eventField.AnchorId = eventTypeTerm.Id;
    eventField.LookupWebId = site.RootWeb.ID;

    if (eventField.TypeAsString == “TaxonomyFieldTypeMulti”)
    ageGroupField.AllowMultipleValues = true;

    eventField.Update();
    }
    }

  • Within this stage we’ve got our field provisioned and added to our site as a web site column, the next step is usually to add it to a content sort, the trick here is we should add two hidden fields ‘TaxCatchAll’ & ‘TaxCatchAllLabel’ fields,If it doesn’t, then you won’t get facets showing up correctly in faceted search. Note that not having the TaxCatchAll and TaxCatchAllLabel pair of columns in your list or library or content variety can cause that.
  • so our field references will probably be like the following

    <FieldRef ID=”{20A3C69E-FFFB-43F4-BBDF-2D22BAF0EB84}” DisplayName=”$Resources:FILENAME_Columns,EventType;” Required=”TRUE” Name=”CustomEventType” Filterable=”TRUE” Sortable=”TRUE” />
    <FieldRef ID=”{09F37A61-50FE-413E-941F-3BEE2A1B5BF8}” DisplayName=”CustomEventType_0″ Hidden=”TRUE” Name=”CustomEventTypeTaxHTField0″ />
    <FieldRef ID=”{f3b0adf9-c1a2-4b02-920d-943fba4b3611}” DisplayName=”Taxonomy Catch All Column” Required=”FALSE” Hidden=”TRUE” Name=”TaxCatchAll” Sealed=”TRUE” Sortable=”FALSE” />
    <FieldRef ID=”{8f6b6dd8-9357-4019-8172-966fcd502ed2}” DisplayName=”Taxonomy Catch All Column1″ Required=”FALSE” Hidden=”TRUE” Name=”TaxCatchAllLabel” ReadOnly=”TRUE” Sealed=”TRUE” Sortable=”FALSE” />

  • Now we come to the next trick, referencing these columns to a list template within the schema.xml file , the trick right here would be to declare the TaxHiddenList ‘TaxCatchAll’ & ‘TaxCatchAllLabel’ correctly to the the list schema, these fields are a lookup columns so they need the information list (source), following is the definetion, NOTE the List attribute.

    <Field Type=”LookupMulti” DisplayName=”Taxonomy Catch All Column” StaticName=”TaxCatchAll” Name=”TaxCatchAll” ID=”{f3b0adf9-c1a2-4b02-920d-943fba4b3611}” ShowInViewForms=”FALSE” List=”Lists/TaxonomyHiddenList” Required=”FALSE” Hidden=”TRUE” CanToggleHidden=”TRUE” ShowField=”CatchAllData” SourceID=”{1e46f7fe-3764-40b5-abd1-1746c716214b}” Mult=”TRUE” Sortable=”FALSE” AllowDeletion=”TRUE” Sealed=”TRUE” Version=”2″ />
    <Field Type=”LookupMulti” DisplayName=”Taxonomy Catch All Column1″ StaticName=”TaxCatchAllLabel” Name=”TaxCatchAllLabel” ID=”{8f6b6dd8-9357-4019-8172-966fcd502ed2}” ShowInViewForms=”FALSE” List=”Lists/TaxonomyHiddenList” Required=”FALSE” Hidden=”TRUE” CanToggleHidden=”TRUE” ShowField=”CatchAllDataLabel” FieldRef=”{F3B0ADF9-C1A2-4b02-920D-943FBA4B3611}” SourceID=”{1e46f7fe-3764-40b5-abd1-1746c716214b}” ReadOnly=”TRUE” Mult=”TRUE” Sortable=”FALSE” AllowDeletion=”TRUE” Sealed=”TRUE” Version=”2″ />

  • Finally, we require to attache the “TaxonomyItemSynchronousAddedEventReceiver” & “TaxonomyItemUpdatingEventReceiver” to update all the hidden fields.

    <Receiver>
    <Name>TaxonomyItemSynchronousAddedEventReceiver</Name>
    <Type>ItemAdding</Type>
    <Assembly>Microsoft.SharePoint.Taxonomy, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
    <Class>Microsoft.SharePoint.Taxonomy.TaxonomyItemEventReceiver</Class>
    <SequenceNumber>10000</SequenceNumber>
    </Receiver>
    <Receiver>
    <Name>TaxonomyItemUpdatingEventReceiver</Name>
    <Type>ItemUpdating</Type>
    <Assembly>Microsoft.SharePoint.Taxonomy, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
    <Class>Microsoft.SharePoint.Taxonomy.TaxonomyItemEventReceiver</Class>
    <SequenceNumber>10000</SequenceNumber>
    </Receiver>

Best Recommended SharePoint 2013 Hosting

ASPHostPortal.com
ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability

SharePoint 2013 Hosting :: How To Update Conflict Error in SharePoint Using PowerShell Script

Hi guys this article explains you about How To Update Conflict Error in SharePoint Using PowerShell Script. Many of you must have come across the issue “An update conflict has occurred and you must re-try this action” and it is suggested to remove the file system cache on the front-end servers. There are many articles to show how to do this manually. But here I will show you how to resolve it using a PowerShell script.

Cause for this issue

This issue occurs if the contents of the file system cache on the front-end servers are newer than the contents of the configuration database.

Resolution

To resolve this issue, clear the file system cache on all servers in the server Farm on which the Windows SharePoint Services Timer service is running. This can be done manually, but consider a large Farm where the administrator needs to login to each of the servers to perform the activity manually. It is time-consuming and people can make mistakes. PowerShell becomes handy here.

The following procedure can resolve the issue:

  1. Stop the SharePoint timer service
  2. Take a backup of the system cache files before deleting it
  3. Delete the XML files from the cache folder
  4. Reset the cache.ini file to the value 1
  5. Start the SharePoint timer service

Now I will explain how to perform the preceding tasks using a PowerShell script.

  • Stop SharePoint timer service

The following piece of code stops the SharePoint timer service:

    Function StopSPTimerServicesInFarm([Microsoft.SharePoint.Administration.SPFarm]$farm)  
    {  
        Write-Host ""  
        foreach($server in $farm.Servers)  
            {  
            foreach($instance in $server.ServiceInstances)  
                    {  
                            # If the server has the timer service then stop the service  
                           if($instance.TypeName -eq $timerServiceInstanceName)  
                           {  
                                [string]$serverName = $server.Name  
       
                                Write-Host "Stop " $timerServiceName " service on server: " $serverName -fore yellow  
                                   
                                $service = Get-WmiObject -ComputerName $serverName Win32_Service -Filter "DisplayName='$timerServiceName'"  
                                $serviceInternalName = $service.Name  
                                sc.exe \\$serverName stop $serviceInternalName > $null  
      
                                  # Wait until this service has actually stopped  
                      write-host "Waiting for '$timerServiceName' service on server: " $serverName " to be stopped" -fore yellow  
                                  do  
                          {  
                                  Start-Sleep 1  
                                  Write-Host -foregroundcolor DarkGray -NoNewLine "."  
                                  $service = Get-WmiObject -ComputerName $serverName Win32_Service -Filter "DisplayName='$timerServiceName'"  
                          }  
                         while ($service.State -ne "Stopped")  
                     write-host " '$timerServiceName' service on server: " $serverName " stopped successfully" -fore green              
                                 break;  
                           }  
                    }  
            }  
       
            Write-Host ""  
    }
  • Backup config cache files

The following piece of code backs up the config cache files before deleting it:

Function BackupSPConfigFiles([Microsoft.SharePoint.Administration.SPFarm]$farm)  
{  
    write-host ""  
    write-host "Backup SP config cache files" -fore yellow  
      
    foreach($server in $farm.servers)  
    {  
        foreach($instance in $server.ServiceInstances)  
        {  
            if($instance.TypeName -eq $timerServiceInstanceName)  
            {  
                $ServerName = $server.name  
                $FolderName  = $servername + "SPConfigCacheBackup"  
                write-host "Creating a folder to hold the backup files" -fore magenta  
                write-host "Checking whether the folder aleady exist"  
                if(Test-path $scriptbase\$FolderName)  
                {  
                    write-host "Folder already exists and the script is deleting it......"  
                    remove-item $scriptbase\$FolderName -recurse -confirm:$false   
                    write-host "Existing folder deleted" -fore green  
                }  
                else  
                {  
                    write-host "Folder does not exist"  
                }  
                New-Item $scriptbase\$FolderName -type directory  
                write-host "New folder created to hold the backup files" -fore magenta  
                write-host "Backup of SP config files for the server " $serverName " started ...... " -fore yellow  
                $path = "\\" + $serverName + "\c$\ProgramData\Microsoft\SharePoint\Config"  
                Copy-Item $path -Destination $scriptbase\$FolderName -recurse  
                write-host "SP config cache files backed up for the server " $serverName " Sucessfully..." -fore green  
            }  
        }  
    }  
    write-host "SP config caches files are backed up" -fore green  
    write-host ""  
}
  • Deleting XML files

The following piece of code deletes the XML files:

    Function DeletingXMLFiles([Microsoft.SharePoint.Administration.SPFarm]$farm)  
    {  
        Write-host ""  
        write-host "Deleting SP config cache XML files from each server in the farm" -fore yellow  
        $path = ""  
        foreach($server in $farm.servers)  
        {  
            foreach($instance in $server.ServiceInstances)  
            {  
                if($instance.TypeName -eq $timerServiceInstanceName)  
                {  
                    $serverName = $server.Name  
                    write-host "Deleting SP config cache files from the server " $servername -fore magenta  
                    $path = "\\" + $serverName + "\c$\ProgramData\Microsoft\SharePoint\Config\*-*\*.xml"  
                    remove-item -path $path -force  
                    write-host "SP config cache files deleted on the server " $servername -fore magenta  
                    break  
                }  
            }  
        }  
        write-host "SP config cache XML files from each server in the farm is deleted successfully......" -fore green  
        write-host ""  
    }
  • Reset timer cache

The following piece of code resets the timer cache:

Function ResetTimerCache([Microsoft.SharePoint.Administration.SPFarm]$farm)  
{  
    write-host ""  
    write-host "Reseting the value of timer cache to 1" -fore yellow  
    $path = ""  
    foreach($server in $farm.servers)  
    {  
        foreach($instance in $server.ServiceInstances)  
        {  
            if($instance.TypeName -eq $timerServiceInstanceName)  
            {  
                $serverName = $server.Name  
                write-host "Reseting the value of timer cache file in server " $serverName -fore magenta  
                $path = "\\" + $serverName + "\c$\ProgramData\Microsoft\SharePoint\Config\*-*\cache.ini"  
                Set-Content -path $path -Value "1"  
                write-host "Value of timer cache file in server " $serverName " is resetted to 1" -fore magenta  
                break  
            }  
        }  
    }  
    write-host "The value of timer cache is resetted to 1 in all the SP servers in the farm" -fore green  
    write-host ""  
}
  • Start SharePoint timer service
    Function StartSPTimerServicesInFarm([Microsoft.SharePoint.Administration.SPFarm]$farm)  
    {  
        Write-Host ""  
        foreach($server in $farm.Servers)  
            {  
            foreach($instance in $server.ServiceInstances)  
                    {  
                            # If the server has the timer service then stop the service  
                           if($instance.TypeName -eq $timerServiceInstanceName)  
                           {  
                                [string]$serverName = $server.Name  
       
                                Write-Host "Start " $timerServiceName " service on server: " $serverName -fore yellow  
                                   
                                $service = Get-WmiObject -ComputerName $serverName Win32_Service -Filter "DisplayName='$timerServiceName'"  
                                $serviceInternalName = $service.Name  
                                sc.exe \\$serverName start $serviceInternalName > $null  
      
                                  # Wait until this service starts running  
                      write-host "Waiting for " $timerServiceName " service on server: " $serverName " to be started" -fore yellow  
                                  do  
                          {  
                                  Start-Sleep 1  
                                  Write-Host -foregroundcolor DarkGray -NoNewLine "."  
                                  $service = Get-WmiObject -ComputerName $serverName Win32_Service -Filter "DisplayName='$timerServiceName'"  
                          }  
                         while ($service.State -ne "Running")  
                     write-host $timerServiceName " service on server: " $serverName " started successfully" -fore green              
                                 break;  
                           }  
                    }  
            }  
       
            Write-Host ""  
    }
  • Complete Code
    $LogTime = Get-Date -Format yyyy-MM-dd_hh-mm  
    $LogFile = ".\ClearSPConfigCachePatch-$LogTime.rtf"  
    # Add SharePoint PowerShell Snapin  
    if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) {  
        Add-PSSnapin Microsoft.SharePoint.Powershell  
    }  
    $scriptBase = split-path $SCRIPT:MyInvocation.MyCommand.Path -parent  
    Set-Location $scriptBase  
    #Deleting any .rtf files in the scriptbase location  
    $FindRTFFile = Get-ChildItem $scriptBase\*.* -include *.rtf  
    if($FindRTFFile)  
    {  
        foreach($file in $FindRTFFile)  
            {  
                remove-item $file  
            }  
    }      
    start-transcript $logfile  
    Write-host "##############Following steps will be involved################" -fore green  
    write-host "Step 1 - Stop the timerservice" -fore cyan  
    write-host "Step 2 - Take the backup of config cache file" -fore cyan  
    write-host "Step 3 - Delete the XML files" -fore cyan  
    write-host "Step 4 - Reset the cache.ini file" -fore cyan  
    write-host "Step 5 - Start the SP timerservice" -fore cyan  
    Write-host "##############Above steps will be involved##################" -fore green  
      
    $global:timerServiceName = "SharePoint 2010 Timer"  
    $global:timerServiceInstanceName = "Microsoft SharePoint Foundation Timer"  
   
    # Get the local farm instance  
    [Microsoft.SharePoint.Administration.SPFarm]$farm = [Microsoft.SharePoint.Administration.SPFarm]::get_Local()  
    Function StopSPTimerServicesInFarm([Microsoft.SharePoint.Administration.SPFarm]$farm)  
    {  
        Write-Host ""  
        foreach($server in $farm.Servers)  
            {  
            foreach($instance in $server.ServiceInstances)  
                    {  
                            # If the server has the timer service then stop the service  
                           if($instance.TypeName -eq $timerServiceInstanceName)  
                           {  
                                [string]$serverName = $server.Name  
       
                                Write-Host "Stop " $timerServiceName " service on server: " $serverName -fore yellow  
                                   
                                $service = Get-WmiObject -ComputerName $serverName Win32_Service -Filter "DisplayName='$timerServiceName'"  
                                $serviceInternalName = $service.Name  
                                sc.exe \\$serverName stop $serviceInternalName > $null  
      
                                  # Wait until this service has actually stopped  
                      write-host "Waiting for '$timerServiceName' service on server: " $serverName " to be stopped" -fore yellow  
                                  do  
                          {  
                                  Start-Sleep 1  
                                  Write-Host -foregroundcolor DarkGray -NoNewLine "."  
                                  $service = Get-WmiObject -ComputerName $serverName Win32_Service -Filter "DisplayName='$timerServiceName'"  
                          }  
                         while ($service.State -ne "Stopped")  
                     write-host " '$timerServiceName' service on server: " $serverName " stopped successfully" -fore green              
                                 break;  
                           }  
                    }  
            }  
       
            Write-Host ""  
    }  
    Function BackupSPConfigFiles([Microsoft.SharePoint.Administration.SPFarm]$farm)  
    {  
        write-host ""  
        write-host "Backup SP config cache files" -fore yellow  
          
        foreach($server in $farm.servers)  
        {  
            foreach($instance in $server.ServiceInstances)  
            {  
                if($instance.TypeName -eq $timerServiceInstanceName)  
                {  
                    $ServerName = $server.name  
                    $FolderName  = $servername + "SPConfigCacheBackup"  
                    write-host "Creating a folder to hold the backup files" -fore magenta  
                    write-host "Checking whether the folder aleady exist"  
                    if(Test-path $scriptbase\$FolderName)  
                    {  
                        write-host "Folder already exists and the script is deleting it......"  
                        remove-item $scriptbase\$FolderName -recurse -confirm:$false   
                        write-host "Existing folder deleted" -fore green  
                    }  
                    else  
                    {  
                        write-host "Folder does not exist"  
                    }  
                    New-Item $scriptbase\$FolderName -type directory  
                    write-host "New folder created to hold the backup files" -fore magenta  
                    write-host "Backup of SP config files for the server " $serverName " started ...... " -fore yellow  
                    $path = "\\" + $serverName + "\c$\ProgramData\Microsoft\SharePoint\Config"  
                    Copy-Item $path -Destination $scriptbase\$FolderName -recurse  
                    write-host "SP config cache files backed up for the server " $serverName " Sucessfully..." -fore green  
                }  
            }  
        }  
        write-host "SP config caches files are backed up" -fore green  
        write-host ""  
    }  
    Function DeletingXMLFiles([Microsoft.SharePoint.Administration.SPFarm]$farm)  
    {  
        Write-host ""  
        write-host "Deleting SP config cache XML files from each server in the farm" -fore yellow  
        $path = ""  
        foreach($server in $farm.servers)  
        {  
            foreach($instance in $server.ServiceInstances)  
            {  
                if($instance.TypeName -eq $timerServiceInstanceName)  
                {  
                    $serverName = $server.Name  
                    write-host "Deleting SP config cache files from the server " $servername -fore magenta  
                    $path = "\\" + $serverName + "\c$\ProgramData\Microsoft\SharePoint\Config\*-*\*.xml"  
                    remove-item -path $path -force  
                    write-host "SP config cache files deleted on the server " $servername -fore magenta  
                    break  
                }  
            }  
        }  
        write-host "SP config cache XML files from each server in the farm is deleted successfully......" -fore green  
        write-host ""  
    }  
    Function ResetTimerCache([Microsoft.SharePoint.Administration.SPFarm]$farm)  
    {  
        write-host ""  
        write-host "Reseting the value of timer cache to 1" -fore yellow  
        $path = ""  
        foreach($server in $farm.servers)  
        {  
            foreach($instance in $server.ServiceInstances)  
            {  
                if($instance.TypeName -eq $timerServiceInstanceName)  
                {  
                    $serverName = $server.Name  
                    write-host "Reseting the value of timer cache file in server " $serverName -fore magenta  
                    $path = "\\" + $serverName + "\c$\ProgramData\Microsoft\SharePoint\Config\*-*\cache.ini"  
                    Set-Content -path $path -Value "1"  
                    write-host "Value of timer cache file in server " $serverName " is resetted to 1" -fore magenta  
                    break  
                }  
            }  
        }  
        write-host "The value of timer cache is resetted to 1 in all the SP servers in the farm" -fore green  
        write-host ""  
    }  
    Function StartSPTimerServicesInFarm([Microsoft.SharePoint.Administration.SPFarm]$farm)  
    {  
        Write-Host ""  
        foreach($server in $farm.Servers)  
            {  
            foreach($instance in $server.ServiceInstances)  
                    {  
                            # If the server has the timer service then stop the service  
                           if($instance.TypeName -eq $timerServiceInstanceName)  
                           {  
                                [string]$serverName = $server.Name  
       
                                Write-Host "Start " $timerServiceName " service on server: " $serverName -fore yellow  
                                   
                                $service = Get-WmiObject -ComputerName $serverName Win32_Service -Filter "DisplayName='$timerServiceName'"  
                                $serviceInternalName = $service.Name  
                                sc.exe \\$serverName start $serviceInternalName > $null  
      
                                  # Wait until this service starts running  
                      write-host "Waiting for " $timerServiceName " service on server: " $serverName " to be started" -fore yellow  
                                  do  
                          {  
                                  Start-Sleep 1  
                                  Write-Host -foregroundcolor DarkGray -NoNewLine "."  
                                  $service = Get-WmiObject -ComputerName $serverName Win32_Service -Filter "DisplayName='$timerServiceName'"  
                          }  
                         while ($service.State -ne "Running")  
                     write-host $timerServiceName " service on server: " $serverName " started successfully" -fore green              
                                 break;  
                           }  
                    }  
            }  
       
            Write-Host ""  
    }         
    #############Calling functions################  
    StopSPTimerServicesInFarm $farm  
    BackupSPConfigFiles $farm  
    DeletingXMLFiles $farm  
    ResetTimerCache $farm  
    StartSPTimerServicesInFarm $farm  
    ##########################################    
    write-host "SCRIPT COMPLETED" -fore cyan  
    stop-transcript

Execution Procedure

  1. Step 1: Download the script and copy it to the SharePoint server.
  2. Step 2: Navigate to the script path.
  3. Step 3: Execute the script.

Best Recommended SharePoint 2013 Hosting

ASPHostPortal.com

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability

 

 

 

SharePoint 2013 Hosting :: Duplicate Web Part Issue in SharePoint 2013

Today for something regarding one of the new features of SharePoint 13. There is the new attribute “ReplaceContent=TRUE” for the <File> element in <Module>.

Until SharePoint 2010, whenever we reactivate the PageLayout feature (the feature that provisions the page layouts in a master page gallery), web parts that have been added to the page layout are duplicated on the new page and we do not have a very standard solution to resolve this problem except for writing a feature receiver and removing the duplicated web parts.

ahp banner sharepoint-01
In SharePoint 2013 is the new attribute “ReplaceContent=TRUE” of the <File> element and if we use this when provisioning the page layout it overrides the existing web parts on the page layouts. So whenever we create a new page from the given page layouts, web parts are not duplicated.

    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">  
      <Module Name="MyPageLayouts" Url="_catalogs/masterpage" RootWebOnly="TRUE">  
        <File Path="MyPageLayouts\MyPageLayout.aspx" Url="MyPageLayouts.Intranet/MyPageLayout.aspx" Type="GhostableInLibrary" ReplaceContent="TRUE">       
    <!—- All our web parts goes here -->  
        </File>  
      </Module>

Have a look at the preceding example, I have set the ReplaceContent=”TRUE”. Because of this whenever I change, add or delete a web part in this elements.xml file and I need to reactivate the feature, the web parts on the page layouts are not duplicated but they do get overridden.

Other Usage example

I’ll like to share one more scenario related to this, I have a sandbox solution that I am deploying on Office 365. I was uploading my package file (.wsp) to the Solution Gallery and activating it. In my package I have one feature that is deploying my CSS file in the master page gallery since I do not have file system access. I had a change in CSS file, I did the change, packaged the solution, deactivated the solution first, uploaded it to the solution gallery and activated it. But my CSS changes are not reflected. Then I remembered the “ReplaceContent” attribute and I used it in the module element while provisioning the CSS file and wonder happened? It worked like a charm.

Feel free if you have some thoughts on this or please share your experience. Thanks :)

Best Recommended SharePoint 2013 Hosting

ASPHostPortal.com

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability

 

 

SharePoint 2013 Hosting :: How To Retrieve Followed Sites in SharePoint 2013 Using REST API

This article explains how to retrieve the site name and URL followed by the current user in SharePoint 2013 using a client object model (REST API and JavaScript)

We can use the SharePoint 2013 Representational State Transfer (REST) service to do the same tasks you can do when you use the .NetCSOM, JSOM.
Here I explain how to retrieve the site name and URL followed by the current user in SharePoint 2013 using a client object model (REST API and JavaScript) and displaying it in the SharePoint page.

  • Create a new page and a Content Editor Webpart (CEWP)

Create a New page

  • Edit the web part that was added to the page.
  • Upload your text file script into the site assests and copy the path of the text file and paste it into the Content link in CEWP.

Code

The following example shows how to retrieve all of the following sites:

<html>    
    <head>    
       <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>    
          <script type="text/javascript">  
             var followingManagerEndpoint;  
             var followedCount; 
             var followingEndpoint;    
             var URL;    
             var website;    
             var clientContext;  
             SP.SOD.executeFunc('sp.js', 'SP.ClientContext', loadWebsite);    
             function loadWebsite() {    
                clientContext = SP.ClientContext.get_current();    
                website = clientContext.get_web();    
                clientContext.load(website);    
                clientContext.executeQueryAsync(onRequestSucceeded, onRequestFailed);    
             }    
             function onRequestSucceeded() {   
               URL = website.get_url();    
               followingManagerEndpoint = decodeURIComponent(URL) + "/_api/social.following";   
               getMyFollowedContent();  
            }    
            function onRequestFailed(sender, args) {    
              alert('Error: ' + args.get_message());    
            }   
            // Get the content that the current user is following.  
            // The "types=14" parameter specifies all content types  
            // (documents = 2 + sites = 4 + tags = 8).  
           function getMyFollowedContent() {  
             $.ajax( {  
                  url: followingManagerEndpoint + "/my/followed(types=14)",  
                  headers: {   
                      "accept": "application/json;odata=verbose"  
                  },  
                  success: followedContentRetrieved,  
                  error: requestFailed  
            });  
         }  
         // Parse the JSON data and iterate through the collection.  
         function followedContentRetrieved(data) {  
             var stringData = JSON.stringify(data);  
             var jsonObject = JSON.parse(stringData);   
             var types = {  
               1: "document",  
               2: "site",  
               3: "tag"   
            };  
            var followedActors = jsonObject.d.Followed.results;   
            var followedList = "You're following items:";  
            for (var i = 0; i < followedActors.length; i++) {  
               var actor = followedActors[i];  
               followedList += "<p>The " + types[actor.ActorType] + ": \"" +actor.Name + "\"</p>"+"<p>Site URL " + ": \"" +  
               actor.Uri+ "\"</p>";;  
            }   
            $("#Follow").html(followedList);   
         }  
         function requestFailed(xhr, ajaxOptions, thrownError) {  
           alert('Error:\n' + xhr.status + '\n' + thrownError + '\n' + xhr.responseText);  
         }  
       </script>    
    </head>    
 <body>    
 <div id="Follow"></div>    
 </body>    
 </html>

Happy Coding :)

Best Recommended SharePoint 2013 Hosting

ASPHostPortal.com

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability

SharePoint 2013 Hosting – ASPHostPortal.com :: SharePoint Workflow Options to Drive Workforce Productivity

These days several organizations still rely on obsolete practices to handle their day to day operations. These approaches have an adverse influence on the workforce productivity in terms of wasted man-hours required to carry out a simple activity. Using the rise in competitors and service industrialization, leading enterprises are looking for techniques to grow to be much more effective in optimizing time for production of goods or solutions that conform to quality norms. These enterprises strive to create automated workflows with state of the art automation technologies to achieve better output.

ahp banner sharepoint-01Even though process automation has been around for some time now, there are not many takers for it as organizations still favor to carry on using the legacy approaches for managing day to day operational activities to save a number of dollars.

How workflow automation assists?

Managing workflows call for effective collaboration amongst workflow participants. Take into account a easy example of an approval approach for updating a set of content material on a internet site, exactly where an employee’s content suggestions are reviewed 1st by his manager after which by the group head followed by the technical head. The employee, the manager, the head, the technical team are participants inside the content material approval workflow. They communicate by means of emails, telephone calls or by manually following up with each other. Besides, you can find a great deal of reminder events that consume plenty of time. This is a simple approach which demands effective coordination among departments and internal teams. To expedite the process one particular requirements to scale up the process and automate it to ensure that when every single workflow participant performs its job, the subsequent participant gets an automatic update quickly. A unified communication platform can go a lengthy way in easing the method. In this example, after the content material has been authorized by the manager, an alert will likely be sent for the head for the next round of review followed by the technical head’s overview. Similarly, there are a large number of processes that run across organizations and communicating by means of emails and phone calls become tedious and time consuming.

SharePoint workflows to help your company operations

SharePoint workflow solutions assist organizations by automating manual processes and aid workflow participants grow to be a lot more efficient and productive when functioning with documents, types and libraries in SharePoint. Making use of SharePoint, an employee can start a workflow on a document and simply achieve his task. SharePoint facilitates automated workflows across various operational scenarios. A few of these scenarios are collecting feedback, collecting digital signatures, document translations and group approval processes. These workflow solutions can assist organisations save man-hours and effectively utilize their resources.

Best Recommended SharePoint 2013 Hosting

ASPHostPortal.com
ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability

SharePoint 2013 Hosting – ASPHostPortal.com :: Example for Simple CRM and SharePoint Integration

Throughout the Swedish SharePoint and Exchange Forum 2006 held just outdoors Stockholm on Rosenön this spring, I showed how to make a basic integration of MS CRM and MS SharePoint 2003.

Both technologies are very versatile and are easily integrated with other software, mainly on account of the helpful webservices which can be obtainable.

ahp banner sharepoint-01
The integration I created was to automatically produce a workspace when a new account was developed. The following measures describe how this was produced attainable:

  1. Create a site in SharePoint that will contain all subsites.
  2. Create a new attribute in CRM, nvarchar 255 that will contain the SharePoint site URL.
  3. Create an IFrame in CRM. Modify the onload JavaScript in CRM to set the src of the IFrame to the SharePoint site URL (if it is not null).
  4. Create a dll that creates the SharePoint site and return the new sites URL and can be called on by a CRM workflow.
  5. Modify the workflow.config to add the functionality to the workflow manager.
  6. Create the workflow triggered by Create on account that creates the site and return the URL. Set the new SharePoint-site-url attribute to the return value of the function.

This integration is great, and it is also achievable to create a far more enhanced handling by using the PreCreate Callout instead of utilizing the workflow. However, the workflow-addon designed may be constructed to become quite generic and may hence be utilized for other purposes at the same time, (as an illustration making a SharePoint website for every Opportunity).

I’ll base the SharePoint-site-name around the accountname attribute that is not guaranteed to be special. Within this example I will not go through how to make a duplet checking plan, which need to also be produced, in the event the websites should be depending on accountname. The sitename could also be depending on the account GUID which is assured to be unique.

I will now go through each from the six points in much more detail:

  1. Produce a SharePoint web site that may include all subsites
    Just make use of the regular SharePoint interface, choose generate from the prime menu and then pick site, nearly at the bottom on the list, no distinct template is needed. Note the url to the newly developed website.
  2. Generate a new attribute for the SharePoint web site url
    In CRM, select settings, customizations, customize entitys, account, attributes, create. Create a new attribute called as an illustration “new_spsiteurl” as nvarchar and length 255 (255 must be sufficient for anyone :).
  3. Generate an IFrame in CRM
    Now pick types and views in CRM. Select type. You must now see the editable version on the account form. Click “New Tab” within the appropriate hand menu. Name the new tab “SP Site” or something acceptable. The tab must now be visible.

Choose the “SP Site” tab then pick “Create section” from the right hand menu. Get in touch with it anything good. Also choose to not show the name in the section.

In the new section, select “Add field”. Choose the newly created attribute, “new_spsiteurl”. Verify the checkbox for read-only. Click OK.

Now choose “Create IFrame” from the proper hand menu. Produce an IFrame within the section designed above. Check the checkbox in formatting that makes it fill the form. Get in touch with the IFrame one thing like “IFRAME_spframe”. Click ok to make.

Click the “Form Properties” inside the right hand menu in the bottom. Edit the onLoad script. Place within the following script:

If (crmForm.all.new_spsiteurl.DataValue != null)
{
crmForm.all.IFRAME_spframe.src = crmForm.all.new_spsiteurl.DataValue;
}

Close the dialogs. Click save and close on all forms. When you are back to the main CRM-window, select account in the entities list and click “publish”.

Produce the workflow addon dll

Open Visual Studio 2003 (it will operate with VS 2005 also, however, if you’d like to do this with callouts, you may have to comply with the instruction concerning callout improvement in VS 2005 that I have blogged about earlier, with reference to Arash weblog).

Develop a brand new standard C# project having a straightforward class-file. Name the project some thing like “WFAddons”. Rename the cs-file something like “WFAddons”, be sure that the code is coherent with the naming of the file to avoid any confusions.

Make sure you might have a reference to the SharePoint-dll.

With each of the code to create the SharePointsite, the file ought to appear some thing like this:

using System;
using Microsoft.SharePoint;

namespace WFAddons
{
public class WFAddons
{

public string CreateWorkSpace(string accountname)
{
SPSite siteCollection = new SPSite("http://localhost/sites/konton");
SPWebCollection subSites = siteCollection.AllWebs;

SPWeb mySite = subSites.Add(accountname);
mySite.Title = accountname;
mySite.Name = accountname;
mySite.Update();
return mySite.Url;
}
}
}

Inside the row: SPSite siteCollection = new SPSite(“http://localhost/websites/Micah”);
Modify the url to match the web site created in step 1.

Now set the output directory for the CRM-assembly folder. This is usually located right here:
c:\Program Files\Microsoft CRM\Server\bin\assembly\ but is dependant around the CRM-installation.

Compile the project.

Modify workflow.config

Within the folder: c:\Program Files\Microsoft CRM\Server\bin\assembly\, open the file workflow.config and before the finish tags

(
</methods>
</workflow.config>
)

add the following:

<method name="Create workspace"
assembly="WFAddons.dll"
typename="WFAddons.WFAddons"
methodname="CreateWorkSpace"
group="SharePoint functions">
<parameter name="accountname" datatype="string"/>
<result datatype="string"/>
</method>

Generate the workflow

Now, all you might have to do is generate the workflow that can run all this and tie every little thing with each other. Open the workflow manager, select account, and generate a brand new workflow that will be triggered on create. Within the editor, pick “Insert Action” and choose “Call assembly” choose the group name (exactly the same set in workflow.config above), and also the pick the strategy name. Inside the new dialog window, double-click the parameter (the name set in workflow.config) and pick dynamic worth and select the entity Account and decide on the attribute accountname. Inside the primary action dialog, a youcan now see this mapping. Enter an action name, like “create workspace”. Click “Save”.

Best Recommended SharePoint 2013 Hosting

ASPHostPortal.com
ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability

SharePoint 2013 Hosting :: How to Prepare for a SharePoint 2013 upgrade.

SharePoint 2013 now does not support in place-upgrade as it was in MOSS 2007. The database attach method is the most preferred one to upgrade to SharePoint 2013. You cannot directly upgrade from MOSS 2007 to SP 2013. You first need to upgrade to SP 2010 and then to SP 2013. But there are many third-party tools available to directly upgrade from MOSS 2007 to SP 2013. In this article we will not discuss any of those tools.

ahp banner sharepoint-01

The following procedure will help you in preparing to upgrade to SharePoint 2013 from SharePoint 2010.

SharePoint 2013 has a service architecture similar to SharePoint 2010 that makes it easy to attach and upgrade the databases of some of the service applications. The list of service applications that can be upgraded using the database attach method is as follows:

Service Application Comments
Business Data Connectivity SharePoint 2013 Server and SharePoint 2013 Foundation support this service application.
Managed Metadata SharePoint 2013 Server only supports this service application.
PerformancePoint SharePoint 2013 Server only supports this service application.
Secure Store SharePoint 2013 Server only supports this service application.
User Profile (Profile, Social and Sync) SharePoint 2013 Server only supports this service application.
Search Administration SharePoint 2013 Server only supports this service application. SharePoint 2013 only supports upgrade of the Search Administration site. You must reconfigure your search topology anew in SharePoint 2013.

SharePoint 2013 provides “deferred site collection upgrade” via site collection settings. This allows administrators of site collections to choose when they wish to upgrade from a SharePoint 2010 user interface to the new SharePoint 2013 user interface. The site administrators or the owners can request an evaluation copy, where they can evaluate their contents in SP 2013 the look and feel before they actually migrate.

Database attach method includes the following procedure at a very high level:

  1. It requires a working SharePoint 2013 Farm to attach the databases from a SharePoint 2010 Farm.
  2. Copy the databases from a SP 2010 to a SP 2013 database server and attach it.
  3. Create and upgrade service applications in SP 2013.
  4. Upgrade the content databases.
  5. Site collection administrators or site owners upgrade their site in a new look and feel.

The two key things for making a successful upgrade are maintaining data integrity and less down time. You can put the SP 2010 sites into read-only mode during an upgrade. But you cannot keep the sites in read-only mode for a long time since the users will not be able to write anything to their site. So to make the sites read-only, upgrade the SP 2010 databases. The users may access the sites in SP 2013 with the same look and feel until they wish to upgrade to the new interface.

For a painless and successful upgrade, consider the following activities before you upgrade to SP 2013:

  1. Check whether you have patched your SP 2010 Farm to the latest major service pack.
  2. Check whether you have patched your SQL Server to the latest major service pack.
  3. Check all the servers in the Farm to ensure the same level of patching.
  4. Resolve all the critical errors reported in the health checker.
  5. Don’t upgrade larger content databases in parallel.
  6. Remove any PowerPoint broadcast sites because SharePoint 2013 does not support these site templates. The new Office Web Apps server provides PowerPoint broadcast support.
  7. Remove any FAST Search Center sites because these sites do not upgrade in SharePoint 2013.
    SharePoint 2013 supports standard Enterprise Search Administration upgrade. If you use FAST in SharePoint 2010 you must provision a new SharePoint 2013 Enterprise Search Application.
  8. Ensure that all site collections and sites use the SharePoint 2010 experience that you can check using the PowerShell Cmdlet:
    Get-SPSite | ForEach-Object{$_.GetVisualReport()}
  9. Repair issues in content databases.

The next major thing that may cause the upgrade to fail is the customization. You must make sure all the customizations are in place before upgrading (any third-party, solution packages, manual changes to the hive files and so on)

Note: Editions of SharePoint 2010 must match editions of SharePoint 2013 for a successful upgrade. Downgrading from server to foundation upgrade is not supported. You cannot downgrade the license version of SharePoint as part of the upgrade to SharePoint 2013 process. If you plan to upgrade to SharePoint Server 2013 Enterprise, install the Enterprise License after the product upgrade.

Best Recommended SharePoint 2013 Hosting

ASPHostPortal.com

ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability

SharePoint 2013 Hosting – ASPHostPortal.com :: Establishing Reporting Services 2012 With SharePoint 2013

This post will stroll by means of the steps required to setup SQL Server Reporting Solutions in Integrated mode with SharePoint 2013. As was the case with all the new Excel data model, you will need at least SQL Server 2012 SP1 to get this to work as I describe

ahp banner sharepoint-01Fundamentally, you will find no true differences with how this installs when in comparison with installing SSRS 2012 on a SharePoint 2010 farm in SharePoint mode, so if you have landed right here seeking 2010 information, it need to be valid, but the screens will appear somewhat different.

To begin with, it’s critical to know that SSRS will install as a SharePoint service application. This certainly signifies that it has to be installed on a machine that is certainly part of the the SharePoint farm. What this doesn’t mean is that you ought to install SharePoint in your SQL server and join it for the farm (please Don’t do that!). In a single SharePoint front end atmosphere it is a lot much better to add SSRS for your SharePoint server than it is to add SharePoint to your SQL server. Naturally, when you have a separate SharePoint application server, that is the most effective location for it.

To set up, receive the SQL Server 2012 SP1 (or higher) media and mount it on tyour SharePoint server. Run the installer, pick new install and adhere to the prompts. Sooner or later you may get to the feature section screen, and assuming that machine has no prior SQL on it’s going to appear one thing like the following when completed.

1jkblkrbveYou will notice that everything chosen is below the Shared Functions section, which signifies that it’s not installed as component of a SQL instance. In reality, you’ll notice that we do not possess the data engine installed at all. The two Reporting Services possibilities shown would be the only items which can be truly needed for SSRS Integrated mode to work. As you’ll be able to see, I’ve also chosen SQL Server Information Tools (formerly BIDS) and Management Tools at the same time. I prefer to install these tools as a matter naturally on SharePoint servers, as they can come in handy for connectivity testing or rapid BI project creating.

Follow the remaining prompts till the installation is total.

Another point that you should note is that the order of operations is important here. In the event you install Reporting Solutions – SharePoint before installing SharePoint around the farm, the option to create a Reporting Services application is not going to seem. That’s since it won’t be registered with the farm as a service application. If this happens, you can run the following PowerShell to register the Service Application

Install-SPRSService
Install-SPRSServiceProxy

Once registered, the service application could be developed as beneath. In the event you set up Reporting Service – SharePoint after the server has been joined to the farm, then the above methods are taken care of for you automatically.

The next factor that you just have to do would be to provision the service application. From Central Administration, navigate to Handle Service applications. Then, in the new menu, Select SQL Server Reporting Services Service Application.

2hveorehbFill out the resulting form as appropriate, and select OK. Make sure that you navigate to the bottom of the form and select the applications to activate SSRS on.

3uiehvorOnce the service application and proxy have been created, click on it to access the management screen.

4hnwleknYou will want to access every single of the sections and fill out the proper alternatives for your installation. The directions are pretty self-explanatory, so I will not go into them here. At a minimum, you should back up your encryption important in the crucial management section, Set your unattended execution account (the default account to utilize when no credentials are accessible), as well as your e mail server settings if you would like to be able to provide reports by way of e mail. If you’d like to enable self service subscriptions and alerts, fill out that section, and it contains guidelines for setting up the SQL agent service to support it.

One of the most important section is Technique Settings, which controls the bulk of how Reporting Solutions will run. Clicking on it accessed the service itself, and it’s the first spot that you will see an error for those who have configuration troubles. In early builds, I have noticed an error comparable for the following:

The requested service, ‘http://localhost:xxxxx/SecurityTokenServiceApplication/securitytoken.svc/actas’ could not be activated

(xxxxx is a neighborhood port which varies from farm to farm)

This indicated a problem with all the SecurityTokenService, which you’ll be able to see by accessing IIS. After carrying out a bit poking around, I tried to access the service directly inside a browser by way of its base url:

http://localhost:xxxxx/SecurityTokenServiceApplication/securitytoken.svc

I was then presented with an error indicating that the server was also low on memory. The answer? Allocate much more RAM. It was running with 4 GB and only SharePoint installed, nevertheless it did have the majority of the service applications activated. The lesson – if you want all of the services to function, give your server sufficient memory. Bumping it to 8 GB did it in my case.

In case you can access your method settings, then you should be very good to go. The following step would be to allow SSRS in you web site collections, and I strategy on carrying out a post on that within the really close to future. Stay tuned.

Best Recommended SharePoint 2013 Hosting

ASPHostPortal.com
ASPHostPortal.com is Perfect, suitable hosting plan for a starter in SharePoint. ASPHostPortal  the leading provider of Windows hosting and affordable SharePoint Hosting. ASPHostPortal proudly working to help grow the backbone of the Internet, the millions of individuals, families, micro-businesses, small business, and fledgling online businesses. ASPHostPortal has ability to support the latest Microsoft and ASP.NET technology, such as: WebMatrix, WebDeploy, Visual Studio 2015, .NET 5/ASP.NET 4.5.2, ASP.NET MVC 6.0/5.2, Silverlight 6 and Visual Studio Lightswitch, ASPHostPortal guarantees the highest quality product, top security, and unshakeable reliability, carefully chose high-quality servers, networking, and infrastructure equipment to ensure the utmost reliability