Skip to main content

Posts

Showing posts with the label Power Shell

Download/Extract a WSP from SharePoint 2010 using PowerShell

In our recent project we were facing an issue with page layouts, so we need to check our WSP solution on server. In the Central Administration screen, a link is not available for you to download the WSP solution. We can extract the WSP from farm with custom code but I have used below 3 lines of PowerShell code to achieve my goal $spfarm = Get-SPFarm $wspfile = $spfarm.Solutions.Item("wspfilename.wsp").SolutionFile $wspfile.SaveAs("d:\extract\wspfilename.wsp") Make sure, you would be a member of Farm Administrators group and have permission to the configuration database.

PowerShell script to clear Content Source (Crawled/Indexed Data)

In my recent project I have used FAST Search to crawl Oracle content source using BCS. We are getting error Error while crawling LOB contents. ( ILobSystem could not be found using criteria 'Id=xxxxx'. )  if we import BCS connector with updation after delete previous one and start crawl again. This is because of we have already indexed data in our indexer server and crawler is again trying to crawl the existing data that was not found. So we wrote a PowerShell script to delete/clear all indexed data for a particular content source. Copy the below PowerShell commands and create a .ps1 file, you have to modify only content source name and FAST Content SSA name. $sourceName = "Your content Source Name" $contentSSA = " Your FAST Content SSA Name" $source = Get-SPEnterpriseSearchCrawlContentSource -Identity $sourceName -SearchApplication $contentSSA $startaddresses = $source.StartAddresses | ForEach-Object { $_.OriginalString } $source...

Upload Master Pages & Page Layouts to Master Page Gallery using PowerShell

I am sharing a script to Upload Master Pages & Page Layouts to Master Page Gallery using PowerShell script. This script will allow users to upload files (Master pages and page layouts) on to Published/non published SharePoint sites. Download the script from here . Steps to execute script 1- Download the .zip file from here 2- Edit the “UploadMasterPages.bat” file and Change the <<site collection url>> in the text below with respect to the environment. e.g. http://sitecollectionurl 3- Save the “UploadMasterPages.bat” file and close it. 4- Put all of your master pages and page layouts to Doc folder. 5- Run “UploadMasterPages.bat” file as Administrator. 6- The files under “Docs” folder will be uploaded to the Master Page Gallery. Note: A log file is created on root directory after execution of script, check log file for details. I have posted the same article on TechNet gallery, you can have a look on this by click this link

Windows PowerShell Command Builder for Microsoft SharePoint 2010 and Microsoft Office 365

Windows PowerShell is a command-line scripting tool that provides an administrator full access to applicable application programming interfaces (APIs). Administrators can use Windows PowerShell to interact directly with SharePoint-based web applications, site collections, sites, lists, and much more. The Windows PowerShell Command Builder enables IT professionals and power users to visually assemble commands related to SharePoint 2010 Products and Office 365 on a Design Surface in a browser and take those commands to their respective products. The Windows PowerShell Command Builder provides an intelligent user experience. After you drag a verb or noun object on the Design Surface, the interface will hide either the verbs or nouns that are not associated with the verb or noun placed on the Design Surface. After you construct a command, you can copy the command to Windows PowerShell script, the SharePoint 2010 Management Shell, or other desired location to be saved or execute...