Upgrading to SharePoint 2013 – part 2

by Robi 26. August 2013 15:19
In one of the previous blog posts I was talking about basic upgrade scenarios. We've looked at how to make the database attach method and then how to make upgrade of the site collection. In this article, I'll introduce how you can a variety of tools, get you a better insight into the farm that you are upgrading. You'll also see how you can monitor the upgrade, which site collections are in the process of upgrading and how upgrade "queue" can be edited. In the end, I will explain how to install custom solutions and what's new with installing custom solutions on SharePoint farm. First of all, I would like to introduce two essential tools for SharePoint administrators, which can be found on CodePlex: SharePoint Feature Administration and Clean Up Tool-Home http://featureadmin.codeplex.com/ SharePoint Manager 2013-Home http://spm.codeplex.com/ SharePoint Feature Administration and Clean Up SharePoint Feature Administration and Clean Up is a tool that you can use before you make a backup of your database that you want to upgrade. The tool shows all features at web app level, site collection, or individual sites. Application offers that without any installation on the server. All you have to do is start the application as a user that has sufficient rights on the entire farm. The application is particularly useful because you will find features that are either corrupt or for which you do not have installed the solution, and this way you can save a lot of debugging and browsing after upgrading to SharePoint 2013 alone. As shown in the following illustration, the application shows which function is malfunctioning, and in the event that you select a broken function also offers a variety of options, among which are: Uninstall Activation Find where this function is activated in the farm.  Example: Broken feature that we would like to remove from the farm. Select the feature, click on Uninstall and confirm some dialogs.         Application logs shows us what has been done and on which object. The application, however, offers us a very useful function, which is called "Find the faulty feature and the farm. This function enumerates the entire farm locates broken features and removes them. Then, with one click of a button you can clean your farm and database upgrade will show lot less errors than in case you don't clean your farm. SharePoint Manager SharePoint Manager is also an application that is not necessary to install it on the server, but it is enough to run the application on a server with elevated privileges. The application allows you to look at the whole structure of objects in your SharePoint 2010/2013 environment. For each object in the farm, you can view the properties of the selected object in details view in the right window and if you select view of field object you can also see the XML schema of the object. You can also change the values of the some properties and save them back to the SharePoint configuration database, respectively. Because the application offers a very detailed look at the structure of the SharePoint environment, it is very useful for developers and highly recommend it as well as for the maintenance and administration of the SharePoint 2013/2013. Manage site collection upgrade In the previous issue of the article, I introduced the process of upgrades including site collection upgrades. Site collection upgrade was run with following command in PowerShell: Upgrade-SPSite -Identity http://upgrade -VersionUpgrade  Command in PowerShell runs site collection upgrade. You would be able to add another parameter – QueueOnly, whereby site collection would be added to the upgrade queue. Queue maintainance is done by Timer Job, which runs every 2 minutes and starts the upgrade of the next site collection in a queue. Regardless of whether we add a parameter – QueueOnly or not, each site collection we upgrade appears in the list, obtained with the command: Get-SPSiteUpgradeSessionInfo -ShowInProgress -ShowCompleted -ShowFailed -null ContentDatabase [database] | select siteid, the status of the  In the event that we are upgrading multiple site collections, which are located in more than one database, you can get list of upgrading site collections as follows: $imenaBaz=("baza1","baza2") foreach($baza and $imenaBaz) { Get-SPSiteUpgradeSessionInfo -ShowInProgress -ShowCompleted -ShowFailed -A Null ContentDatabase $baza | select siteid, the status of the }  In the event that you would like to remove site collection from the list, you can use the command: Remove-SPSiteUpgradeSessionInfo -Identity http://upgrade  Server load throttling during upgrade For the process of upgrading site collections, we are also able to control how many site collections are being upgraded simultaneously. For server load management, two settings are available. First one is at the web application level, and the other is set on content database. $wa = Get-SPWebApplication http://upgrade $wa.SiteUpgradeThrottleSettings The command shows how many site collection can web app application pool process upgrade simultaneously. If the number is exceeded, a site collection is automatically placed in the queue, regardless of whether we add the parameter-Queue or not. It is also automatically placed in queue, if it exceeds SubWebCountLimit value, or if it exceeds UsageStorageLimit. By default, these two values are set to 10. You can easily increase that number, depending on your server hardware, as limits are set really low. The second option is for controlling concurrent upgrades, at the level of the individual database in which site collection are located in. The current settings can be listed with the following command: $db = Get-SPContentDatabase SP2013_Content_Upgrade $db.ConcurrentSiteUpgradeSessionLimit  By default, the number of concurrent upgrades of site collections is set to 10. This setting can be, depending on the specifications of your database servers for, easily increased. Custom solutions upgrade management Because SharePoint is a platform that can be used for development of business applications, the environments with a lot of installed custom solutions are very common. For success of the upgrade to SharePoint 2013, it is very important that all the solutions that have been installed on the SharePoint 2010 are successfully transferred to the new version. Best scenario for custom solutions is if you can get the source code for installed solutions, which you can then upgrade for the new version or if we can get already upgraded WSP file. However, since SharePoint 2013 also contains binaries of SharePoint 2010, all 2010 solution might already work on 2013. It is necessary to be aware of some changes to the security settings of custom solutions. In the past, solutions installed into the BIN folder were treated as "Partial Trusted Code", while in the last version of the SharePoint this solutions are considered as "Full Trust«. To install a custom solution with PowerShell there are additional parameters available. If we want to add a SharePoint solution in the Solution Store, we need to use the command: Add-SPSolution -LiteralPath "C:\Users\sp_FarmAdmin\Desktop\WSPs\test.wsp"  To install the solution, use the command: The Install-SPSolution -Identity test wsp -GACDeployment parameter -Force -Verbose -CompatibilityLevel all  You can use the new parameter to set the CompatibilityLevel of the solution: ValueEffect"14,15" ' AllVersions ' "All"Installs the solution to both 14 and 15 directories (in the 2013 product, subject to change and future versions)14 "OldVersions" The "Old"Installs the solution to 14 directories only (in the 2013 product, subject to change and future versions)15 "NewVersion" "New"Installs the solution to 15 directories only (in the 2013 product, subject to change and future versions)  Example: 1. 14 Hive path-_/layouts/Custompage .aspx 2. the path – the Hive _ 15/layouts/15/Custompage.aspx The Global Assembly Cache GAC aspect. After the release of NET Framework 4.0 GAC is divided into two parts, one for each CLR. c:\windows\assembly is the location for the NET version 1.0 to 3.5 and c:\windows\microsoft.netassembly is the location for all DLL projects created in NET Framework 4.0. I hope I've written some useful guidelines for a successful upgrade. In the event any additional questions or needing help with your upgrade, you can contact me at: robi@kompas-xnet.si.


SharePoint 2010 | SharePoint 2013 | SharePoint - Administration

Upgrading to SharePoint 2013

by Robi 8. August 2013 09:44
Upgrading from SharePoint 2007 to SharePoint 2010 has been significantly improved and there were no major issues like with upgrading from SharePoint 2003 to SharePoint 2007. Upgrade to SharePoint 2013 has also been vastly improved but it also brings some new stuff that I would like to point out. Figure 1: 5 major steps in upgrade process Every SharePoint upgrade project should consist of the 5 major steps, but I'm not going to discuss what every step of every upgrade project should be. I'm going to concentrate on what is new and how can you actually perform an upgrade. Upgrade methods that are available in SharePoint 2013 upgrade process are or should I say is database attach method. There is no other supported upgrade method in the version to version upgrades. What this means is that you need to establish a side to side farm with your existing SharePoint 2010 environment, as earlier versions of SharePoint are not supported for direct upgrade to SharePoint 2013. If you have an earlier version of SharePoint and you do not want to make additional upgrade steps to SharePoint 2010, you can use 3rd part migration tools as Metalogix, Idera, AvePoint,… Database attach method means backing up you SharePoint 2010 databases, restoring them to you SQL Server for SharePoint 2013 and mounting those to your SharePoint environment. But not every database supports db atttach upgrade from previous version of SharePoint. Support database attach upgradeNot supporting database attach upgradeContent databasesConfiguration databaseProject databasesSearch Index databaseSearch admin databaseSync databaseSocial database Profile database Managed Metadata database Secure store database Firstly, to perform a database attach method for content database we need to create new web application in SharePoint 2013. As a best practice I would recommend removing newly created database, as we are going to attach one. If you have already restored content database to your SQL Server, you can then open SharePoint 2013 Management Shell and test the content database against the newly created web application: Test-SPContentDatabase -Name SP02_WSS_Content_Upgrade -WebApplication http://2013upgrade/ In your PowerShell window you will get a result from your test back. Figure 2: Test-SPContentDatabase You should be aware of upgrade blocking category as if this is set to true, your upgrade process won't be able to complete. If you test your content database to a web application that has a different authentication provider set than your content db, you would get an error like the following: Figure 3: Test-SPContentDatabase against Claims Web Application This may happen if your SharePoint 2010 environment was configured with Classic mode authentication and you created Claims web application in SharePoint 2013, which is the default authentication method. To create classic mode web application in SharePoint 2013 you need to do it in PowerShell using a command similar to this: New-SPWebApplication -Name SP2013_Upgrade -ApplicationPool SP2013Upgrade_AppPool -ApplicationPoolAccount dev\sp2013_app_pool -HostHeader 2013Upgrade -Port 80 -Url http://2013upgrade -DatabaseName SP2013_Content_2013Upgrade -Verbose Once all issues from your test are resolved you can start an upgrade process by using the following command Mount-SPContentDatabase -Name SP02_WSS_Content_Upgrade -WebApplication http://2013upgrade/ -Verbose When command completes, you are notified about the success of you upgrade process. In my case there were some errors thrown because of missing features for Report Server: Figure 4: Mount-SPContenDatabase You can always check progress of your upgrade process in Central administration. So if you go to central admin, Upgrade and Migration, Check upgrade status you will see status of all your previous upgrade sessions with some basic data. Figure 5: Central Admin Check Upgrade Status One of the most important information you can get is where your upgrade log is located. If you go to your logs folder, you will find not only one but 2 log files. One is whole upgrade log file and the other one is just error log file. One of the new things that I must mention here is that log files are now in ULS format, this means that they are easily readable and easier for review. Sample of ULS log is shown here: Figure 6: Upgrade Error Log With database upgrade completed, SharePoint upgrade is not completed yet. In SharePoint 2010 after an upgrade we had to do a so called Visual Upgrade which upgrades visual experience. In SharePoint 2013, we do not have visual upgrade, but we need to do the Deferred Site Collection upgrade. What this means is that site collection upgrades are separated from database upgrades and that every site collection admin can now control when he or she would like their site collection to be upgraded. Before site collection upgrade you actually use SharePoint 2010 binaries and in effect cannot use any new features SharePoint 2013 has to offer. Figure 7: Site collection after database upgrade  After upgrade and when connecting to your upgraded sites you can see that you are still in SharePoint 2010 mode. The only difference you can notice is that there is a red notification bar on top of portal. To be able to use all SharePoint 2013 features you need to do a deferred site collection upgrade, which as mentioned before is a new concept. With that said, there are also two more new concepts    introduced for site collection upgrades which are called Upgrade evaluation site collection and Site Collection Health Checker. Figure 9: Links for Health checks and site collection upgrade Site collection health checks should be run before you try to upgrade site collection. This tool will provide you information about any potential issues and that you can then address before you start upgrading your site collection. Figure 10: Health check results  Figure 11: Upgrade site collection or create evaluation site collection Before you actually run site collection upgrade, you can use one more option to test if everything works as expected. This is called evaluation site collection, which essentially is a read only copy of your existing site collection, which you can use to review the new interface and new functionalities. Evaluation sites are automatically expired and deleted after certain amount of time, which by default is set to 30 days. Finally we are about to start the site collection upgrade. As mentioned before you can do this by clicking Upgrade this site collection button as seen on figure 9. The second option is of course using PowerShell. Upgrade-SPSite -Identity http://2013upgrade -VersionUpgrade  Figure 12: Maintanance logs After upgrade process is completed you can also check logs to see if there are any issues that need to be resolved. This log files are located at http://2013upgrade/_catalogs/MaintenanceLogs. If everything went smoothly you are now able to enjoy all new features that SharePoint 2013 has to offer. There are of course some other details that need to be discussed, especially in large environments where there are plenty of site collections but this is out of scope of this article.


SharePoint 2010 | SharePoint 2013 | SharePoint - Administration | PowerShell

Picture gallery with Galleria and Content Query Web part

by Robi 13. August 2012 09:56
Following E. Struyf 's Blog for making a picture gallery from the assets library: Making an Image Gallery Inside the Asset Library: Part 1 - E. Struyf 's Blog http://www.estruyf.be/blog/making-an-image-gallery-inside-the-asset-library-part-1 I thought that it has to be a way to get pictures from picture gallery with the Content Query Web Part and modify the results so that it can work for the galleria. So, the first step of course would be to download all the necessary files. To download files go to the galleria we page and extract the zip file. You can copy all files to the Style library, where I made the JS folder to save the jQuery library file, downloaded from the www.jQuery.com web site. Galleria files  Download Galleria http://galleria.io/download/   Screen shot of the Style library\JS folder. For the galleria to work, you will need: Jquery library Galleria.classic.css Galleria.classic.min.js Galleria-1.2.7.min.js Classic-loader.gif Classic-map.png. XSL files Next thing to do is to modify the ContentQueryMain.xsl and ItemStyle.xsl. In ContentQueryMain you need to modify the div in which pictures will be displayed. In order to do that just add the class gallery to the div id=''{concat('cbqwp',$ClientId)}''. You will specify the branding later on for the .gallery class. ContentQueryMain.xsl  In ItemStyle.xsl you need to add a new xsl:template, which will be used for rendering pictures in CQWP. Important part here is to change the variable SafeLinkUrl. So to get the full picture not just the picture thumbnail you need to select the LinkUrl column for the UrlColumnName. ItemStyle.xsl <xsl:template name="ImageGallery" match="Row[@Style='ImageGallery']" mode="itemstyle">      <xsl:variable name="SafeLinkUrl">         <xsl:call-template name="OuterTemplate.GetSafeLink">          <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>         </xsl:call-template>     </xsl:variable>                      <img src="{@LinkUrl}"/> </xsl:template>  Gallery page Next thing to do is to create and modify the web part page where the gallery will be shown. Edit the file in advanced mode in SharePoint Designer 2010 and just after the PlaceHolderMain opening tag add the following code (modify reference to your script files if needed): <link type="text/css" rel="stylesheet" href="../../Style Library/js/galleria.classic.css"/> <script type="text/javascript" src="../../Style Library/js/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="../../Style Library/js/galleria.classic.min.js"></script> <script type="text/javascript" src="../../Style Library/js/galleria-1.2.7.min.js"></script> <script type="text/javascript"> $(document).ready(function(){     $(".gallery img").unwrap().unwrap();          $('.gallery').galleria({     width: 700,     height: 467 });     Galleria.loadTheme('../../Style Library/js/galleria.classic.min.js');     Galleria.run('.gallery');  }); </script> This code will add reference to the files in Style library, JavaScript, CSS,… $(".gallery img").unwrap().unwrap(); unwraps the pictures form the <li> tag and <ul> tag which CQWP adds when it displays the pictures and needs to be done so that galleria can step in action and create the actual gallery. Galleria.loadTheme and Galleria.run just runs the galleria to create the picture gallery.  At the end of the page, just after the </asp:content> add the style tag, which will apply background, height and width to the gallery div of the Content Query Web Part. This was set in ContentQueryMain.xsl  <style type="text/css">     .gallery{     width:700px;     height: 472px;     background: #000;     margin:auto;     text-align:center;     } </style> Content Query web part On the page add the CQWP and Edit Web part. For the picture source select the picture gallery where your pictures are saved. You can also specify filter for the pictures. What is important in the CQWP settings is that you apply the ItemStyle you previously created in ItemStyle.xsl called ImageGallery. Save the CQWP settings, save the page and refresh it. And the final result is: Robert Vončina Kompas Xnet d.o.o. robi@kompas-xnet.si


SharePoint | SharePoint 2010 | Development

Display members of AD group in SharePoint 2010 - Updated

by Robi 3. January 2012 13:19
Hi, I updated the Display members of AD groups in ShaePoint 2010. Now the solution has a new look and as what one of my friends, Christian Stahl suggested I added links to members of groups and groups to display detailed info about user. If you use SharePoint Server 2010 and you have my sites configured, you will be redirected to my site host for details about a user. If user have permission to see members of SharePoint group, the group displays link to group membership page or group settings if you will. You can see the link in the bottom part of the picture. AD groups now have a new icon, which you can see by the »CORP\sg_finance« AD group. When you click on the group link you are redirected to a People and Groups page:  Users that are members of the site, not AD groups also have links to details view. If you use SharePoint Foundation 2010 you are redirected to a »Users« list if you use My Sites you are redirected to user's my site. Installation instructions: Install solution If you want to install the new version of solution, downlod the wsp file from Codeplex: http://sp2010adgroupmembers.codeplex.com/releases/view/79845 On your SharePoint Server run SharePoint 2010 Management Shell as Administrator and then run the command: Add-SPSolution -LiteralPath C:\Users\sp_farm\Desktop\Skupine_Web_Part.wsp To deploy the solution go to Central Administration, System settings, Manage Farm Solutions, click on »Skupine_Web_part.wsp« and click Deploy Solution. You can also deploy the solution with PowerShell by running the following command: Install-SPSolution -Identity skupine_web_part.wsp -GACDeployment -AllWebApplications Activate solution What you need to do next is go to your site collection where you want to use this solution and Activate the »Skupine Web part« solution on the »Site collection features« page: Add web part to a page To insert a web part to your page, click Edit page button and then Add a Web Part. In the »KompasXnet« category, you will find »Xnet Diplay Group Members« web part. Click Add. When you web part is on the page, it is going to be empty. From a web part menu, select »Edit web part« Enter a user name. This can be any domain user, without any special privileges. In the format domain\username. Enter password for this user. Enter domain information for querying your domain. If you have a special users container, you can specifiy just the Organizational Unit. For example, if you would like to query just the OU »Zaposleni« you can enter:  OU=Zaposleni,DC=CORP,DC=XNET,DC=SI Enter the Fully qualified domain name of domain controller where query will be sent to: »Xnet-DC01.corp.xnet.si« Click OK. Click Stop Editing on the Ribbon on the Page tab. When you click Stop Editing, the Web part will still be empty. What you need to do is click Browse on the Ribbon and navigate to the page where the Web part is. Hope you find the improved version of my solution useful. If you have any comments or suggestions please send me email to: robi@kompas-xnet.si


SharePoint 2010

Display members of AD group in SharePoint 2010

by Robi 9. December 2011 17:16
Hi, Because I got a question so many times if you can show members of AD groups on SharePoin site, I decided to build a web part that would replace the Site Users web part.   The usage is pretty simple, what you need to do is deploy a wsp package that you can find inside the bin\release folder.   Next step is to add a web part to your site and what you need to do is enter some information to access the Active Directory.   You need to enter: user name to connect to AD in the format: domain\username domain information for LDAP query in format of: DC=corp,DC=xnet,DC=si you need to enter FQDN of a domain controller to which the ldap query will be sent: xnet-dc01.corp.xnet.si Hopefully some one will find this web part usefull. You can find solution attached in a zip file.   For comments and suggestions please contact me at: robi@kompas-xnet.si THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.   There were some bug fixes so I published a new version of a Web Part.   Skupine Web Part_1.2.zip (219.37 kb)


SharePoint | Development | SharePoint 2010


<<  September 2018  >>

View posts in large calendar

Page List

Month List