Thursday, October 30, 2014

Delete All Site collections [/sites] from web application using powershell

1. The Get-SPDeletedSite cmdlet lists all the deleted site collections.

2. Restore a deleted site collection.

Get-SPDeletedSite | where{$_.SiteId -eq "4563-6b2e-473b-b6c3-e0967996aa7d"} | Restore-SPDeletedSite

3. Use the Remove-SPDeletedSite to permanently remove the deleted site collection.

4. Just permanent site collection delete , won't be available to restore in Recycle bin[careful as always]

Remove-SPSite "http://sharepoint.com/sites/test"

5.  NO permanent site collection delete , still available for restore in Content database Recycle bin.

Remove-SPSite -Identity "http://sharepoint.com/sites/test1" -GradualDelete

Note: Use the (2) command to restore the site collection.

Now, let me try for my actual need :

6.  Get the all site collections under the web application

Get-SPSite "http://sharepoint.com" -Limit ALL

Now, we try find the site collections under specific root ex: http://sharepoint.com/sites/ or  http://sharepoint.com/personal/

Get-SPSite http://sharepoint.com/personal* -Limit ALL

Now , we will remove all the site collections under the /personal/ root folder

a)  Permanent delete , won't be available to restore in recycle bin  or content database

Get-SPSite "http://sharepoint.com/personal*" -Limit ALL | Remove-SPSite -Confirm:$false 

b) No permanant delete, will prompt for each site , still available for restore in recycle bin

Get-SPSite "http://sharepoint.com/personal*" -Limit ALL | Remove-SPSite -GradualDelete


This is solve the my need , to delete site collections under /personal/ root level in Sharepoint portal.

Monday, August 25, 2014

SAP BO + Unable to reconnect to the CMS :6400 . The session has been logged off or has expired. (FWM 01002)

Today, We faced below error in our SAP BusinessObjects Business Intelligence,

Error: 'Unable to reconnect to CMS :6400. The session has been logged off or has expired.(FWM 01002)'


Solution: 1. From Central Configuration Manager, disable all the services and re-enable them (or ) Restart the SIA (Server Intelligence Agent)
(OR) 2. Log into Central Management Console and go to the server area.3. Go to the properties of Central Management Server, in command line parameters type -request timeout 3600000 (60 min).

Wednesday, July 23, 2014

SharePoint 2013 + Search Crawl new Feature + Continuous Crawl + search scopes

Tip of the Day..
Continuous Crawl is a new feature of SharePoint 2013 that crawls content as it is modified or added to the sites. This can be resource intensive on large SharePoint sites. Alternatively, crawls can be scheduled for specific time

One more Tip...
SharePoint 2007 and 2010 included the option to add scopes to a drop-down list next to search boxes in the sites. This would allow site administrators to create narrowed down search results for specific uses. For instance, a scope could be created to only return items from a specific library.

With SharePoint 2013, Microsoft has removed the concept of search scopes. Instead, we will need to create a new search results page with a limited search query.

SharePoint + Configuring "anonymous access" for web application + Restrict access to application pages

Configuring anonymous access at the SharePoint web application level can also be accomplished with PowerShell or code using the server-side object model.
Configuring anonymous access for web applications using PowerShell
  1. Get the SharePoint web application with the following Get-SPWebApplication Cmdlet:
2.  $webApp = Get-SPWebApplication http://SP:80
  1. Set the AllowAnonymous property for the IIS settings of the Default zone to true:
4.  $webApp.IisSettings[[Microsoft.SharePoint.Administration.SPUrlZone]::Default].AllowAnonymous = $true
  1. Update the web application using the following command:
6.  $webApp.Update()
Configuring anonymous access for web applications with code using the server-side object model
Follow these steps to configure anonymous access for a web application with code using the server-side object model:
  1. Get the SharePoint web application by its URL:
var webApp = SPWebApplication.Lookup(new Uri("http://SP:80"));
  1. Set the AllowAnonymous property for the IIS settings of the Default zone to true:
webApp.IisSettings[SPUrlZone.Default].AllowAnonymous = true;
  1. Update the web application using the following line of code:
webApp.Update();
Limiting access to application pages
In previous versions of SharePoint, enabling anonymous access allowed users to access application pages such as the Site contents page. Preventing access to the application pages (/_layouts) previously required some manual configuration. In SharePoint 2013, access to application pages can be restricted using the new Limited-access user permission lockdown mode feature. In this recipe, we will activate this feature on our site collection.
How to do it…
Follow these steps to enable the site collection feature to limit access to application pages:
  1. Navigate to the site collection in your preferred web browser.
  2. Select Site settings from the Settings menu.
  3. Select Site collection features from the Site Collection Administration section.
  4. Activate the Limited-access user permission lockdown mode feature.


How it works…
With the Limited-access user permission lockdown mode feature enabled anonymous users will no longer be able to access pages within the /_layouts folder. This prevents these users from accessing pages such as the Site contents page and reduces the surface area for anonymous users to identify or exploit content in the site.

Using the Site contents page is one way hackers attempt to identify content on SharePoint sites in an attempt to exploit the site. Using this feature helps to eliminate that option for anonymous users.

Wednesday, July 9, 2014

SharePoint 2010 Approval Workflow-- use the "open this task" button is missing?

Issue: Today,  I'd run the OOTB approval workflow in SharePoint 2010 , I'd received the below task email to my outlook(2010) But when I try to click /open on the Open This Task Button, However I cannot locate that button for any user.






To complete this task:
  1. Review Test Ravi.
  2. Perform the specific activities required for this task.
  3. Use the Open this task button to mark the task as completed. (If you cannot update this task, you might not have access to it. Click here to request access.)

Reason:

The reason for this is because SharePoint 2010 assumes you have Outlook as your
mail client and the email that is sent out eludes to an Open this Task button
which in Outlook appears on the
OUTLOOK toolbar

Solution:

If you have outlook 2010 client installed , you can find the "Open this Task" button on Outlook Ribbon, but not is email. Please see the below pic.