On a SharePoint 2013 on premise installation, we have configured an incremental crawl, that runs every 15 minutes.
Now we need a possibility to start this crawl manually, too. Is there a WebService we can call to start the crawl manually? Maybe even a possibility to start the crawl on a smaller scope, like only a list or website?
You may just love Simple HTTP api for Executing PowerShell Scripts
In cases where you want to simply invoke a PowerShell script remotely,
a REST api is a good choice since all modern programming languages
make it simple to perform a HTTP GET operation.
and Simple HTTP api for executing PowerShell scripts (with source code) which is an out of the box solution of what the above is trying to accomplish. Here are the Windows PowerShell cmdlets to administer and configure search in SharePoint 2013 for more details.
Please also look at SharePoint Windows PowerShell Remoting if you are interested on more nitty-gritty remote SharePoint control.
Try to use powershell interface for this purpose.
It is pretty simple when you think about it.
We can use the Get-SPEnterpriseSearchCrawlContentSource command to get a ContentSource object.
After we have a reference to this object, we can start, stop, and pause crawls to our heart’s content.
This class has a few methods that you might be interested in:
StartFullCrawl, StartIncrementalCrawl, StopCrawl, PauseCrawl, and ResumeCrawl.
What each method does should go without explanation.
If it is necessary, you can create a wrapper for powershell call. Your web service will call powershell for this purpose.
Related
I am looking to build a solution where we can compare (Automated) a word document we email to a client to the word document the client emails us back.
Any suggestions please, we will be using MS Azure to create the solution.
Due to the lack of a direct automation of this feature you can use an indirect route to approach the solution.
Note:
This solution invokes Word using COM automation. Hence this is expected to be running on a VM that has word installed.
Since this solution simplifies the content that is being compared, it might lose the details you might want to show up in your comparison.
You can create a PowerShell script that does the following
Convert the documents to a simpler (txt) format - See this or this.
Compare the text files - See this.
The powershell script will get the comparison done. After that its up to how much fancy you want to get when exposing this functionality outside that VM. e.g. You could create an HTTP invokable API that can call this Powershell script and return results.
I think your best bet would be using Microsoft Azure Logic Apps! Azure Logic Apps allows you to develop advanced automation workflows on the cloud and it supports a vast array of connectors out of the box including email triggers and the Microsoft Word Connector. If that's not enough then, you could even develop your own connectors too...
Using CAML or some other query system, how can I find items that use custom code and organize by modified date?
And the background. My group is looking to upgrade a 2007 SharePoint installation to SPO. The problem we're having is a lack of clarity as to what on the site is junk and what is a custom code set. The first idea was just to run through manually and make note of every node. As there are 5,200 nodes, this is pure insanity. I've done some research to find that CAML is how to query a particular site in SharePoint, however I cannot seem to figure out how to query everything at the same time.
I tried to make a view in the root, but again, it only queries the particular level you're on. I'm having the feeling that I might need to write a tool for this and spider the site, but am unsure where to begin. After trying a couple of tools (Stramit Caml running in visual studio and SPUD) I seem to be running in place as I don't understand how the connection works.
Any advice or stories like this?
To scan your environment and detect where custom solutions are used, your best bet is to use the stsadm command called preupgradecheck. This is executed from the commandline on one of your web front end servers, invoking stsadm.exe.
From Microsoft:
The Stsadm command provides a rule-based scanning operation to determine whether servers in an existing SharePoint environment meet the core requirements for upgrading from Windows SharePoint Services 3.0 and related products to future releases of SharePoint Products and Technologies.
The pre-upgrade scanning and reporting operation is implemented as Stsadm –o preupgradecheck, and can be run with or without parameters.
Upon execution, the command checks your environment against various rules. The result of each rule check is written to both an XML log file and a text log file, located in the the %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\LOGS directory, and when the command finishes it will display an HTML file in the default web browser summarizing the results.
Is it possible to automate the publish of dxp file to the server. What I want to achieve is build a command line tool, user navigates to the dxp file and runs a command (let's say publish), this should save the file to the library without opening spotfire client (something similar to running spotfire in Headless mode).
I got to know that Spotfire Automation Services can be of some help in this task, but I have never used the automation services and don't know how to install or find the automation services module. Any help or direction is highly appreciated. Thanks
Automation Services is a licensed framework from TIBCO that lets you automate several tasks including Open or Save analysis to library, replace or remap data sources, run alerts etc.
But if your sole requirement is to publish analysis to library then use the import-library-content on command line, or save it in a batch file and use IronPython to trigger that as using button from the DXP.
See API docs of import-library-content for usage.
you can check Google for Automation Services and see more details on its capabilities, but I'm pretty sure your use case is covered. Spotfire does not offer this feature out of the box (except maybe using the admin command tool, but that'd only be for admins).
your organization will need to buy a license for AS, since it's a separate product in the Spotfire suite. talk to your TIBCO rep or send me a PM.
Yes, you can use Automation Services for this. Automation Services needs to be licensed from TIBCO, but it provides a framework that will allow you to create job.xml files which specify a list of tasks for Automation Services to execute. You can then submit the job file to a web service when you want the tasks to be executed.
I have a business requirement to process files uploaded by regional businesses for import to another system. It's envisaged that users will use SharePoint 2007 (soon to be SharePoint 2013), the event will trigger an export to CSV and the process will then run against those files.
Is this possible in either SharePoint versions?
Would that be an app, or standalone service I would want to create and schedule?
Does anyone have a more elegant solution? Essentially the CSV export is feeding in to a program that allows a user to visually validate and press a button to push to the other system after tweaking.
With custom code, you could create an event receiver on the list where CSV file lives that will run some code whenever the CSV file is updated. Here's a starter:
http://elczara.wordpress.com/2011/02/16/sharepoint-2010-event-receiver/
Make it a farm solution (sandbox solutions can't write to the filesystem directly), and you'll probably want to look up RunWithElevatedPrivileges, since the user doing the uploading may not have permission to write to the file system.
Steve's suggestion of rethinking the end-to-end solution is a good one, although I'm not sure how you can trigger the other system to "do its business".
Yes, it is possible, both with the 2007 version and the 2013.
Depending on your deployment scenario, you can:
create a custom timer job that will execute your job.
Create a custom site Workflow, with a loop and a delay, that will do the job.
The 1st is easier to build and maintain, but has less perspectives if you need to apply custom process.
But if you can control the application that consumes the feed, why don't you consume SharePoint directly? From the 2010 version, you can very easily get data using the listdata.svc web service. With older versions, you can still get data using a simple web service.
I need a routine for loading files (.html) onto a sharepoint library using SAS. The site is outside the firewall (am unable to use the 'map network drive' method).
The sharepoint library is configured with 'No versioning' etc, and my username / password has administrator privileges..
I believe there are easier ways (tools) to do it than SAS, so I'd just let SAS call some other process - e.g. if your SAS is on Windows, it could call (even generate) a Powershell script.
This http://poshcode.org/2122 seems to be a way.
I've done something similar with SAS calling curl to upload files to SAS webDAV server.
If you'd like a pure SAS way - it should be doable using new PROC HTTP as a web service call.
Refer to
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a003286672.htm for SAS side and probably this http://msdn.microsoft.com/en-us/library/ff798339.aspx
for Sharepoint side.
Anyway, PROC HTTP seems interesting for some easier things.
I don't think you can use plain old SAS to do this. If you have the SAS Enterprise BI Server product, there is a component called "SAS Web Parts for Microsoft SharePoint", but that is really an interface between Sharpoint and the BI server (so you can display dashboards or run stored processes).
The "easiest" thing to do is create your html files and then use FTP to copy then to the SharePoint server. Of course, this requires an FTP server on the other end and you would want to engage the help of the Sharepoint administrator. I've done something similar myself. I don't know SharePoint myself but there is a way to set it up so that all content that shows up in a directory is automatically recognised.
There may be other solutions and I'd love to see them as well.
Sharepoint has this wonderful web interface. Basically what you do is open your web browser, works best in IE8+ and navigate to your site URL and open your document library. If you select Items in the Ribbon you can upload a document using their interface. :)
SharePoint already exposes several options, using legacy web service and the new rest services.
http://msdn.microsoft.com/en-us/library/ff798339.aspx