Script for Exporting and importin all webs in site Collection

by Robi 15. November 2011 11:27
I needed to export and import all web in site collection to a new Site collection, which was based on a different language template. In order to automate the process I, of course, used PowerShell. I was trying to figure out, what would be the best way to name the exported webs and found this article on TechNet Forums: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/65e5e221-4d1f-428c-8803-f46f98171651/   This lead me to write script for exporting webs to be:   #Get all webs in site collection $webs=Get-SPSite http://razvoj/sites/ang |Get-SPWeb -limit all #Export-Spweb foreach($web in $webs){$filename=$web.url.replace("http://","").replace("-","--").replace("/","-")+".cmp"; Export-SPWeb $web -Path c:\export\$filename -IncludeVersions all -IncludeUserSecurity -Verbose}   When you create new Site collection on a team site for example, there are some list and libraries which I found is best to delete them to avoid errors when importing webs. #Delete lists and libraries on a new site collection to avoid errors when importing for($i=0;$i -lt $seznami.Count;$i++){$seznami.delete($seznami[$i].id)} The next step is to get all files in a c:\Export folder which has the extension of ».cmp«. For this I wrote a script: #Get all files in folder with .cmp extension $list=Get-ChildItem c:\export | where {$_.extension -eq ".cmp"} And the final step is to import all webs to a new site collection: #Import all files and use file name as reference to where web should be created foreach($listitem in $list){$importweb=$listitem.name.replace("razvoj-","http://razvoj/").replace("-","/").replace("ang","slo").replace(".cmp",""); import-spweb $importweb -UpdateVersions overwrite -Path c:\export\$listitem -Force -IncludeUserSecurity -Verbose} Hope this helps. Robi Vončina

Tags:

SharePoint 2010

SharePoint Server 2010 Service Pack 1 PowerShell Changes

by Robi 30. June 2011 11:24
Here are some PowerShell Changes that came with SP1 for SharePoint Server 2010. New cmdlets are: Add-SPProfileLeader Get-SPProfileLeader Remove-SPProfileLeader Remove-SPProfileSyncConnection Add-SPProfileSyncConnection Disable-SPHealthAnalysisRule Enable-SPHealthAnalysisRule Get-SPHealthAnalysisRule Get-SPDeletedSite Remove-SPDeletedSite Restore-SPDeletedSite Move-SPSocialComments There are of course some changes to the existing cmdlets and here are a few that will be useful when configuring SharePoint Server 2010: Mount-SPContentDatabase New Switch Parameter:ChangeSyncKnowledge New-SPContentDatabase New Switch Parameter:ChangeSyncKnowledge Move-SPSite New Parameter:RbsProviderMapping <Hashtable> Used to move an RBS-enabled site collection from one RBS-enabled content database to another RBS-enabled content database without moving the underlying BLOB content. If the content database has more than one RBS provider associated with it, you must specify all providers. The same providers must be enabled on the target content database and the source content database." New-SPPerformancePointServiceApplication New Parameter:AnalyticResultCacheMinimumHitCount <Int32> New Parameters:DatabaseServer <string>,DatabaseName <string>,DatabaseFailoverServer <string>,DatabaseSQLAuthenticationCredential <PSCredential> This was the only Service Application that didn't allow us to set the database information when we created it so we were left with this nasty GUID in the name. Set-SPPerformancePointServiceApplication New Parameter:AnalyticResultCacheMinimumHitCount <Int32> New Parameters:DatabaseServer <string>,DatabaseName <string>,DatabaseFailoverServer <string>,DatabaseSQLAuthenticationCredential <PSCredential>,DatabaseUseWindowsAuthentication Remove-SPWeb New Switch Parameter:Recycle

Tags:

SharePoint 2010

SharePoint 2010 Updates

by Robi 30. June 2011 10:22
To update your SharePoint environment it is recommended to install Cumulative Updates. You can find all CUs as well as Service Packs and info on how updates should be applied on this page: http://technet.microsoft.com/en-us/sharepoint/ff800847 To get better knowledge on applying patches it is recommended to read this TechNet article: Software updates overview (SharePoint Server 2010) One important information when updating your server farm or administering server farm is to know on which patch level it is. To get build number, you simply open Central Administration and click »Manage Servers in this Farm«: You can compare Farm build number to the table bellow which I borrowed from Todd Klindt BuildReleaseComponent14.0.4763.1000RTMAll components14.0.4762.1000RTMFarm Build Version14.0.5114.5003June 2010 CUSharePoint Foundation 201014.0.5114.5003June 2010 CUMicrosoft Shared Components14.0.5114.5003June 2010 CUMicrosoft SharePoint Portal14.0.5114.5003June 2010 CUMicrosoft User Profiles14.0.5114.5003June 2010 CUMicrosoft Search Server 2010 Core14.0.5114.5003June 2010 CUMicrosoft Web Analytics Web Front End Components14.0.5123.5000August 2010 CUSharePoint Foundation 201014.0.5123.5000August 2010 CUSharePoint Server 201014.0.5128.5000October 2010 CUSharePoint Server 201014.0.5130.5002December 2010 CUSharePoint Foundation 201014.0.5130.5002December 2010 CUSharePoint Server 201014.0.5136.5002February 2011 CUSharePoint Foundation 201014.0.5136.5002February 2011 CUSharePoint Server 201014.0.5138.5000April 2011 CUSharePoint Foundation 201014.0.5138.5000April 2011 CUSharePoint Server 201014.0.5138.5000April 2011 CUProject Server 201014.0.6029.1000Service Pack 1SharePoint Server 201014.0.6029.1000Service Pack 1Office Web Apps14.0.6029.1000Service Pack 1Project Server 201014.0.6029.1000Service Pack 1SharePoint Foundation 201014.0.6105.5000June 2011 CUSharePoint Server 201014.0.6105.5000June 2011 CUSharePoint Foundation 201014.0.6105.5000June 2011 CUProject Server 2010Hope it helps.

Tags:

SharePoint 2010

SLOWUG - marec 2011

by Robi 10. March 2011 11:33
Pozdravljeni, objavljam prezentacijo, ki sem jo uporabil na SloWUG srečanju o namestitvi in konfiguraciji SharePoint 2010 Serverja. SLOWUG-SharePoint 2010 install_Config.pptx (2,30 mb)

Tags:

SharePoint | SharePoint - Administration | SharePoint 2010

SharePoint Print List Item

by Robi 28. February 2011 15:05
Hi,   I received a question how to easily create a print form for a SharePoint list item. This is the easiest way I can think of. Open SharePoint Designer and open your list files. Create new aspx page. 2. Edit your newly created aspx page in Advanced mode. 3.Open you aspx page in split mode and click in to the design window. From the ribbon, choose Insert/SharePoint and select Custom List Form. 4.Select the list you want to create new list form for and select Display Form. 5. Insert HTML button and insert on click event handler to "window.print()" 6. Go to Allitems.aspx and open it in Advanced mode. Add column to the right and just type "Print Preview". 7. Add hyperlink to your text. 8.Browse to your custom list form and add "?ID={@ID}. 9. Try it out...   Hope it helps!!

Tags:

SharePoint | SharePoint 2010

Calendar

<<  September 2018  >>
MonTueWedThuFriSatSun
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Page List

Month List