Posts

Showing posts from April, 2019

PowerShell to restore *.cmp backup of SPWeb

Problem I need to restore *.cmp file that contains SPWeb backup. Solution # Creating case sites and import backup files # Created by Ben - 7 March 2019 Start-Transcript clear if ((gsnp "*sharepoint*" -ErrorAction SilentlyContinue) -eq $null ){asnp *sharepoint*} $caseSiteUrlUniquePattern = 'Exporting Web http://pacman' $truncateStart = '.intranet' $targetSite = 'http://pacman-test' $importLogFilename = 'Import.txt' $currentPs1Filename = $MyInvocation .MyCommand.Name $currentPs1FilePath = $MyInvocation .MyCommand.Definition $backupFolder = $currentPs1FilePath .SubString(0, $currentPs1FilePath .indexOf( $currentPs1Filename )) $importLogFilePath = $backupFolder + $importLogFilename $processedFolder = $backupFolder +'Restored\' if (!( Test-Path $importLogFilePath )) { New-item -Path $backupFolder -Name $importLogFilename -ItemType 'file' } Get-ChildItem $backupFolder -Filter *.log | Foreach

BDC WebPart Web Service Error

Image
Problem Web-part display the following error: Solution if ((gsnp '*sharepoint*' -ErrorAction SilentlyContinue) -eq $null ){asnp *sharepoint*} $bdcsap = Get-SPServiceApplicationProxy | ?{ $_ .TypeName -eq 'Business Data Connectivity Service Application Proxy'} $tc = Get-SPBusinessDataCatalogThrottleConfig -Scope WebService -ThrottleType Size -ServiceApplicationProxy $bdcsap Set-SPBusinessDataCatalogThrottleConfig -Identity $tc -Maximum 150000000 -Default 3000000 Explanation $tc  to get throttle config  for WebService scope. Scope can be Wcf, WebService, Database, Global, or Custom. Set-SPBusinessDataCatalogThrottleConfig -Identity $tc  to set new throttle config. It took a minute or two to take effect and problem solved for now as usual.