12 September, 2013

Learning PowerShell from Microsoft Resources


These days PowerShell has become a very strong scripting language to manage any MS technology from the command prompt.

However, the person like me who is a newbie to SharePoint keeps thinking from where to start and how to start.

So here I have presented some of the resources for my reference and others reference from Microsoft and these can be quickly referred to.

Windows PowerShell Quick Reference

Windows PowerShell Scripting from TechNet Learning Section

PowerShell for Beginners from Wiki library Section

Windows PowerShell for SharePoint 2013 IT pros

Windows PowerShell for SharePoint Command Builder


Hope this piece of information will be helpful for you all and will let you refer to any external resources other than the MS Ocean.

If you have any queries and questions please do let me know. I would be more than happy to answer those.

Applies to:
1)   SharePoint 2010
2)   SharePoint 2013
3)   Windows PowerShell 3.0

An Excel workbook that contains a PowerPivot table is corrupted after you upload the Excel workbook to a SharePoint PowerPivot gallery


Problem:
One of our clients reported when he tried to open Excel workbook which contains Pivot table from the SharePoint Pivot Gallery, after doing the refresh, the Excel workbook doesn’t open or opens in the repair mode.


Background: Office 2010, Excel 2010. Windows 7 64-bit.


Troubleshooting:
1)   Checked if multiple versions of office installed.
2)   Downloaded the local copy of the file and it was opening fine.
3)   Checked the content of the Excel file that does contain the pivot tables and using the external connection in the source file was fine.
4)   Tried to use the different connection string in the Excel, i.e. fetching data from any other external source.
5)   Local copy of the file was working fine, whereas when publishing to SharePoint it breaks.

Resolution:
This was a prolonging issue and MS has confirmed that this is not a SharePoint issue and has to be the SQL 2008 issue, which got fixed in the Cumulative update 2 for SQL Server http://support.microsoft.com/kb/2072493

You can also get a hot fix which is supported by KB- http://support.microsoft.com/kb/2028769

If you face any difficulties or have any further queries, please flag them, I would be happy to assist you with them.

Applies to:
Microsoft SQL Server 2008 R2 Enterprise
Microsoft SharePoint Server 2010
Microsoft Excel 2010

11 September, 2013

Find SharePoint installed feature information in SharePoint: SharePoint 2010

It is possible by means of the SharePoint Power Shell Console below is the PW script which does this for you. 

PS 1: Gives a simple output of all features in table format sorted by solutionId then featureName. 



PS 2: Gives the output of all features in table grouped by solutionId, then solutionId is replaced by actual solution name with a separate lookup (very minor performance loss due solution name replacement)
If you have any issue in executing these scripts do let me know, I would be happier to assist you.

How to Edit the Web.config Using PowerShell

While working with Client you get to work on a lot of changes and a lot of modifications to the default configuration of the farm and it is always difficult to work on these changes manually.

Recently I was trying to find a way to modify the webconfig file via some command line utility, then, I came across a very detailed article on the the MS blog Hey, Scripting Blog !, which was exactly fit for my needs so I thought of sharing it with all of you as well.

At this link you can find a detailed step by step guide by Josh the MS Premier field Engineer,
http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/14/use-powershell-to-script-changes-to-the-sharepoint-web-config-file.aspx  

A zillion thanks to Mr Josh for publishing this for us....!!!

Webpart security + disable web part connections– SharePoint 2010

One of our developers has reported that he is trying to setup connection between two webparts but somehow the connection option is disabled.
There might be a possibility that you will not get a connection menu also.

By using Web Part connections, you can create or enhance your Web Part Pages. You connect Web Parts so that when you perform an action in one Web Part, it changes the contents of another Web Part.

Now the next question will arise as:
1)   Why the connection option is disabled?
2)   Why the connection menu is greyed out?
3)   Why the connection menu is not available?
4)   Is there any setting at the site collection level or at the web application level by which we need to turn on any feature/activate something…

Let me tell you guys there is a setting which is present at the web application level so need to whether its enabled or not.

How to enable this option?
1)   Open the central administration
2)   Application management
3)   Web applications
4)   Manage web applications
5)   Select the web application for which you would like to enable the option
6)   On the top-Ribbon-You will find an option as ‘webpart security’
7)   Click on it and you will get one frame window which specifies ‘security for web pages
8)   Here you will find the option of Web part connections
9)   Select the option “Allows users to create connections between Web Parts”

Click OK and that’s it. You are done. 

After doing this, still not able to setup connection between two webparts?


In which Microsoft has specified several reasons in which web part menu may not be enabled or visible on your web part page / The Connections submenu is hidden or unavailable:

1)   You are not using the correct browser. You must use Internet Explorer version 5.5 or later to create, modify, or delete a connection between Web Parts.
2)   The Web Part you are trying to connect from does not allow connections. You can try to find or import another Web Part that does what you want and that allows connections.
3)   The zone that contains the Web Part does not allow connections.
4)   The Web Parts were connected in shared view and so the connection cannot be changed in personal view. If you can, switch to shared view.
5)   You do not have permission to make Web Part connections.
6)   Web Part connections are not supported at the site.

Some other possibilities:

Only compatible Web Parts are available from the Connections submenu. This situation can occur for one or more of the following reasons:

The Web Part you are trying to connect to does not support making connections. Not all Web Parts are designed to be connected.

1)   The Web Part you are trying to connect from is not compatible with the Web Part you are trying to connect to because it has an incompatible Web Part type. This can occur for the following reasons:
2)   You are in personal view, the Web Part you are trying to connect from is a shared Web Part or personalized Web Part, and the Web Part you are trying to connect to is a private Web Part on the same Web Part Page.
3)   The Web Part you are trying to connect from is a private Web Part, and the Web Part you are trying to connect to is a shared Web Part or personalized Web Part on the same Web Part Page.
4)   The Web Part you are trying to connect to or from allows only one connection. To create a new connection, you must first remove the current connection from that Web Part.
5)   The Web Part you are trying to connect to is already connected to the Web Part you are trying to connect from through a different connection type. Web Parts can have more than one connection, but each connection must be to a different Web Part.
6)   The Web Part you are trying to connect to is not compatible with the Web Part you are trying to connect from because the Web Part is required to run on either a client or server. There are two situations that can apply:
7)   The Web Part you are trying to connect to currently runs on the client, and the Web Part you are trying to connect from runs on the server.
8)   The Web Part you are trying to connect to currently runs on the server, and the Web Part you are trying to connect from runs on the client.

In this case, the Web Parts you are trying to connect must both run either on the client or on the server.

For assistance, contact the site administrator.

If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.