Posts

Showing posts from 2018

Errors While Importing Site Collection in SharePoint 2013/2010

Image
Actually we want delete some sub-sites from production. Which were create by custom template (Custom Site Template). We need to take all sub-sites backup separable. What we did, Just Exported one sub-site for testing purpose and trying imported on Staging farm. We faced below issues. Importing Sub-site: Import-SPWeb http://abc1:5555/Arabic/Dept/Depts/cc1 -Path "D:\cc1\cc1.cmp" -UpdateVersions Overwrite -force 1.      Import-SPWeb : Cannot find an SPWeb object with Id or Url : http://abc:5555/Arabic/depts/depts/cc1 Here problem clearly say, No Url found. Try to create new sub-site with Custom site template.Still facing problem try to reset IIS(iisreset) and create sub-site. 2.      Import-SPWeb: Cannot import site. The exported site is based on the template DEPARTMENTS#0 but the destination site is based on the template CMSPUBLISHING#0. You can import sites only into sites that are based on same template as the expor...

Deleting Multiple Sub-sites within Site using PowerShell

Deleting Multiple Sub-sites within Site using PowerShell. function RemoveSPWebRecursively(     [Microsoft.SharePoint.SPWeb] $web) {     Write-Debug "Removing site ($($web.Url))..."         $subwebs = $web.GetSubwebsForCurrentUser()         foreach($subweb in $subwebs)     {         RemoveSPWebRecursively($subweb)         $subweb.Dispose()     }         $DebugPreference = "SilentlyContinue"     Remove-SPWeb $web -Confirm:$false     $DebugPreference = "Continue" } $DebugPreference = "SilentlyContinue" $web = Get-SPWeb "http://dept-sp10-dev/Arabic/dept/dept/cdd" $DebugPreference = "Continue" If ($web -ne $null) {     RemoveSPWebRecursively $web     $web.Dispose() }

Setup is unable to proceed due to the following error(s): This product requires Microsoft .Net Framework 4.5.

Image
"Setup is unable to proceed due to the following error(s):This product requires Microsoft .Net Framework 4.5." Step 1: Uninstalling .Net framework 4.5 from server manager. =============================================       We uninstalled .Net framework completely and we rebooted server. After rebooted server it was showing only cmd prompt. Even UI is not controlling through mouse or key board. After some google search we rolled back to server with some commands.    1).  DISM.exe /online /enable-feature /all /featurename:NetFx4    2). DISM.exe /online /enable-feature /all /featurename:MicrosoftWindowsPowerShell Above two commands run with any error then reboot server using shutdown -r once server got rebooted,then type PowerShell on Cmd prompt and run  GUI installation with following cmd.   1). Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra Reboot server with Shutdown -r. Now ...

Creating new list items using VS on SharePoint 2013/2010

using Microsoft.SharePoint.Client; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SPListItemCreation {     class Program     {         static void Main(string[] args)         {             AddGeolocationField();             Console.WriteLine("Location field added successfully");         }         private static void AddGeolocationField()         {             // Replace site URL and List Title with Valid values.             ClientContext context = new ClientContext("http://t-test-sp13:7777");             List oList = context.Web.Lists.GetByTitle("RealEstates");             oList.Fields.AddFie...

Export and Import SharePoint 2013/2010 Subsites using powershell

For Backup/Export:  Export-SPWeb http://YourLinkwithsubsite -Path "D:\FCR1\FCR1.cmp" -force For Restore/Import: Import-SPWeb http://YourLinkwithsubsite -Path "D:\FCR1\FCR1.cmp" -UpdateVersions Overwrite -force Note: I tried without -Force. Its showing "Export-SPWeb : Feature '8915db8f-2a3f-4e5e-a72f-76bfcae4b185' for list template '10012' is not installed in this farm.  The operation could not be completed."

SharePoint 2013 workflow platform is not available because the workflow service is not configured on the server

Image
Issue: The option for the SharePoint 2013 workflow platform is not available because the workflow service is not configured on the server. And I checked workflow Service status. It's showing below error. I tried all possibilities from google and some blogs didn't find any solution of my issue. Finally, It's work with the following Steps. 1). Create Internal URL from AAM( CA--> Application Management --> Configure Alternate access mapping -->App Internal URLS).   Select an  Alternate Access Mapping Collection(http://server.domain.com), Add Internal URL( https://server.domain.com ) and save Note: Internal URL should be https. 2). Run the following PowerShell Query: Register-SPWorkflowService -SPSite "https://YoursiteURL" -WorkflowHostUri "http:/YourWFURL:12291" -AllowOAuthHTTP Now go and check in SharePoint designer its works like charm...!!!!

Export/Import SharePoint farm solutions using PowerShell

Image
In My environment we lost SharePoint updated code. We want migrate SharePoint from SP 2010 to SP2013. Simply I did Export all .WSP using following Script. Steps: -------- Export SharePoint 2010/2013 Farm Solutions: 1). Open SharePoint 2010/2013 Management Shell as administrator. 2).  Create new folder in any drive (In my case create new folder in D drive with ExportWSP name ) 3). Type D: and type "cd ExportWSP" 4). Copy and run the following script.         (Get-SPFarm).Solutions | ForEach-Object{$var = (Get-Location).Path + “\” + $_.Name; $_.SolutionFile.SaveAs($var)} 5). Go back to ExportWSP Folder, Here All SharePoint wsp export from SharePoint Farm. Import SharePoint 2010/2013 Farm Solutions: 1). Open SharePoint 2010/2013 Management Shell as administrator. 3). Type D: and type "cd ExportWSP" 4). Copy and run the following script. Get-ChildItem | ForEach-Object{Add-SPSolution -LiteralPath $_.Fullname} ...

Install SharePoint 2010/2013 patch (CU) using command prompt

Image
While Am running SharePoint Patch or CU from UI. It's Showing "the expected version of the product was not found on this system". 1. Open the Command prompt with Admin. 2. Go to CU location from Command prompt. 3. Run the particular CU .exe name with PACKAGE.BYPASS.DETECTION.CHECK=1    Ex: wssloc2010-kb3114890-fullfile-x64-glb.exe PACKAGE.BYPASS.DETECTION.CHECK=1   Note:  PACKAGE.BYPASS.DETECTION.CHECK=1 should be Case sensitive.