All posts by James Love

Start and Stop SharePoint Search Crawls with PowerShell

Share socially -

Quite often you may wish to start a SharePoint Search content crawl on demand, without waiting for the next scheduled crawl to start. You may still be running SharePoint Server 2010, or not able (or willing) to run a continuous crawl of your content.

To make your job that little bit quicker when it comes to starting a Search Crawl, you can easily start either Incremental or Full Crawls via PowerShell.

Simply retrieve the Content Source that you want to crawl, then invoke the appropriate method.

$cs = Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" -Identity "Local SharePoint Sites"

# This method starts a full crawl
$cs.StartFullCrawl()

# This method starts an incremental crawl
$cs.StartIncrementalCrawl()

# Do this to stop any currently running crawls
$cs.StopCrawl()

# This property returns the status of your crawl
$cs.CrawlStatus

 

Obviously, change the SearchApplication parameter to match the name of your search application, and the “Identity” parameter to match the name of the specific Content Source you want to crawl.

You can wrap up all of the PowerShell lines that you need to kick off the crawl you want into a text file with the extension of “.ps1” and invoke from a SharePoint Administration Shell prompt whenever you need to!

 

Enable Stack Traces to find C# Disposal Issues

Share socially -

If you look through your SharePoint ULS logs during the development of server-side code and you spot the warning:

An SPRequest object was not disposed before the end of this thread.  To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or SPWeb) as soon as you are done using it.

Then there’s a chance you haven’t followed Microsoft’s best practices around disposal of unmanaged resources in the C# SharePoint Server Side Object Model.

Going solely by the information in ULS doesn’t immediately show you where your SPSite or SPWeb was instantiated.  As the warning states, you need to enable SPReqest Allocation Callstacks to see full stack traces of your code to see where you need to fix SPRequest issues.

The following PowerShell snippet will do just that:

$cs = [Microsoft.SharePoint.Administration.SPWebService]::ContentService

$cs.CollectSPRequestAllocationCallStacks = $true
$cs.Update()

 

Of course, as you develop you can use static analysis tools such as SPCAF from Rencore to make sure you’re following the best practice for object disposal as you code.

Please note that this is only beneficial if you develop C# code using the SharePoint Server Side Object Model that runs on the SharePoint servers. If you are developing using any of the remote APIs (such as JavaScript Object Model, Client Object Model or REST) then this setting has no real benefit.

You may also notice that sometimes you will see this error when performing valid API tasks where you do not necessarily create the SPWeb or SPSite objects yourself. I’ve noticed this in particular with the Taxonomy API. I found these to be acceptable exceptions when analysing the ULS log for these warnings, as the code that raises the warning is deep within assemblies that are maintained by Microsoft, and the warnings may disappear over time with service pack releases.

5 Ways Office 365 Can Save Your Organisation Money Right Now

Share socially -

Microsoft Office 365 for Business comes with a whole host of benefits to many organisations of any size around the world. However, when it comes to making decisions it can be difficult to see straight away the “quick-wins” that could tempt you or your decision makers to take the plunge.

There is already a lot of excellent material on the Internet demonstrating all the features that Microsoft Office 365 for Business can provide, but here is a run down of the immediate benefits you can achieve by signing up.

Reduced infrastructure costs

Arguably one of the biggest selling points of Microsoft Office 365 for Business is that you can get access to all of the incredible productivity features as soon as your tenancy has been created, without any extra outlay for more infrastructure in your organisation.

For example, if you wanted to install a collaboration platform such as SharePoint, traditionally you would need at least 3 high-powered servers, licenses for each user accessing the environment, and to manage your data (backups, database maintenance etc). And then you have costs for your data centre footprint which includes electricity costs, cooling, hardware failures and end-of-life disposal. A lot of small things can up to a large total cost of ownership.

If you maintain a server on-premises for email currently, you will be able to migrate your accounts to Exchange Online and decommission your on-premises servers.

With Office 365 and SharePoint Online, all of this is taken care for you, for the cost of your user subscriptions only.

Simple, subscription-based licensing

Managing your user subscriptions and licenses is now made a lot simpler thanks to the Admin Centre. This gives you a single place to monitor how many user licenses you have purchased, how many you’ve assigned, and what your monthly cost is.

O365Subs

Which Microsoft Office 365 plan is right for your business?

Improved communications tools

Office 365 for Business includes powerful communication tools such as Skype for Business, which is a voice and video conferencing tool. With this you can telecommute with ease, arrange meetings with voice and video and send these to people outside your organisation, who will join the meeting using Skype for Business (if they are also users of Office 365), or with the web-based client.

O365SkypeForBiz
This lets you make dramatic cuts to your travel costs for meetings and presentations, allowing you to deliver to your customers regardless of where you (or they) are!

Read more about Skype for Business’s web conferencing capabilities.

Secure online storage

All of your data is securely stored in Microsoft data centres which are geographically local to your part of the world. The infrastructure is maintained by Microsoft and therefore is regularly kept up to date with the latest security updates and virus scanning capabilities. Backups and data redundancy are all taken care of for you without the need for any extra personnel or hardware. Office 365 also complies with the EU Privacy Law so you can ensure your data is safe.

O365OneDriveForBiz

The Office 365 Trust Centre has a wealth of information regarding your data security as a Microsoft Office 365 customer.

Access to your data anywhere, on any device

To be able to access Email, Documents, Tasks and even Skype for Business, all you need is an internet connection and a device with a supported browser. Here’s more on the system requirements for Office 365 for Business.O365Mobile

Because Microsoft manages data security and integrity (leaving it to you to decide and manage who can see what), Office 365 allows you the freedom to implement a “Bring Your Own Device” strategy, allowing your users to use any phone or tablet device to access their data.

As you can see, your organisation can start reducing costs almost immediately by switching over to Microsoft Office 365 for Business.

Get started today with a FREE no obligation Office 365 Trial.