viernes, 8 de marzo de 2013

New-spsite cmlet doesn´t create the default security groups


Lets say that for organization´s procedure we need to create a content database per each new site. In this case the easier way is using powerShell and the cmdlet new-spsite with the flag -ContentDatabase

Tech info related to the cmdlet …

The steps are straight forward:

  • Creating the new content DB (PowerShell or CA)
  • Creating the new site using new-spsite, it´s allow you to choose the name of the content DB.

But here is the surprise, it creates the new site in the content db but I was missing the
pre-defined SharePoint groups of the new site (visitors, members, owners, ...). They are not created through command line and there´s not a flag that allows it. If you search in internet you´ll find some  solutions by scripting.

Then I created the new site using the Central administration. In this case the steps are easy also but a bit more of work:

  • Creating the new content DB (PowerShell or CA)
  • Limit the number of site collections that can be created in any other content database associated with the web application. Other option is to change the status to read only during the process.
  • Create the new site.

martes, 29 de enero de 2013

MOSS2007::How to add the role of Central Administration in your farm

I wrote the same post for SharePoint 2010 here.

Short time ago I wanted to check how to enable the Central Administration service in a second server on a farm in a  MOSS2007 environment, I didn´t remember how. When you get used to work with 2010 is easy to forget about MOSS2007, the technical jump related to architecture was huge.

Then I get surprise how easy is to get high availability in this basic service in the 2010 version and how different is to enable it on a MOSS2007 environment.

Here you have to run the wizard and press the advanced button to enable the Central administration feature (it will deploy it in the IIS) in the server you want. After remember to change the alternate access mapping (AAM ).

Missing “I like it” and Tags


While working on Profiles and Metadata Service Federation between 2 farms I noticed that the “I like IT” button was missing in the child farm. After spending significant amount of time troubleshooting the Linking I found that I had missed to select the below checkboxes after creating the connection to “Service Application” in the destination farm.
The selection of checkboxes is necessary on the “Child Farm” proxy connection. This can be evoked by clicking on the “Properties” button with the focus enabled on the Proxy Connection.



























Error: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered


When you try access to the Sharepoint 2010 Management Shell you receive the error :

To solve the problem you need to follow the next instructions :
Open SQL Server Management Studio –> Security –> Logins, select the user, click on User Mapping & change the Database pointing to SharePoint_Config & select the role SharePoint_Shell_Access :



lunes, 21 de enero de 2013

SP2010::Access Services : Please open a bug and the CU February 2012


We experienced an error related to access services. What was the funny part? 
First the SharePoint log message was a surprise, how many times do you see the sentence "Please open a bug"?? . Second that it was happening in 3 farms, in other 3 farms was working perfectly. The version on all these farms was the same, SharePoint 2010 SP1.

The incident was that when we added Access Services, created a site with Access sheet and we tried to use it in a standard basic way it was working randomly. Once it failed we needed to delete the whole service and re-create it again. We tried several ways, including the Wizard and power shell, but nothing worked out.

The Error:

System.StackOverflowException: Operation caused a stack overflow.     at Microsoft.Office.Access.Server.UI.PageChopper.GetPageContent(String pageName, String parentId, SharedDataBaseInfo dataBaseInfo)     at Microsoft.Office.Access.Server.UI.AccessPortal.GetSubFormInternal(SharedDataBaseInfo dataBaseInfo, GetSubFormParameter parameter)     at Microsoft.Office.Access.Server.UI.AccessPortal.b__0(SharedDataBaseInfo database, Object param)     at Microsoft.Office.Access.Server.UI.AccessPortal.ExecuteWebMethodHandler(CoreWebMethodHandler coreWebMethodHandler, SharedDataBaseInfo dataBaseInfo, Object param, Boolean writeOperation). Please open a bug.           
After opening a ticket in the Microsoft support team they recommended us to follow the link bellow:


There were not similarities between our error (behavior of the service) or the SharePoint log, but it fixed the problem.

The solution:

  • Upgrade the server/farm with the CU February 2012. We had to install both, Foundation and server, and it was a long upgrade. The foundation takes around an hour, but the server package took 4 hours on a standalone.
  • Restart the server/farm. It will not ask for it but when you run the commands the error continues until you restart the SharePoint Server/farm
  • Run the commands:

$farm = Get-SPFarm

$farm.XsltTransformTimeOut = 10

$farm.Update()

  • Try access.

viernes, 26 de octubre de 2012

Reusing a server in a SharePoint farm


The last days we have been working hard to get some farms built in a record time, and the main issue and time consuming was the fact that we´re reusing servers. Now I can say it´s the worst idea ever.

When you remove a server form a SharePoint farm (you might check the procedure here) many configurations remain on the server, from the hive folder until the web.config of the Internet Information Services (IIS). If you really need to reuse a server but you don´t have the choice to reinstall the operating system take into account at least some steps to clean up the environment;

  • Delete the hive folder: program Files\Common files\Microsoft Shared\Web Server Extensions\14
  • Remove the Application and IIS feature of the server. And here comes the point; you should first uninstall any SharePoint product, stating always with any language pack.So you should:
    • Remove SharePoint language pack
    • Remove SharePoint server
    • Remove application and IIS feature
    • Restart the server
    • Install the application and IIS feature
    • Install SharePoint prerequisites
    • Install SharePoint server
    • Install language pack (foundation and server) ... for sure I´m missing some restarts of the server ...
 After my experience I´m willing to reinstall the operating system and apply any necessary  update prior to try to reuse a server that was before a SharePoint server.

miércoles, 24 de octubre de 2012

How to add the role of Central Administration in your farm


As part of the high availability procedure, the central administration service should be in more than a server. That way you ensure the availability of the service. What happens when you add the service to a different server? Let´s discover it!

Imagine a farm of 5 servers: 3 WFE, 2 App servers (Query/Crawl) and a SQL server. 

Let´s call them that way:

WFE01.dragons.com >> Central administration
WFE02.dragons.com
WFE03.dragons.com
QRY01.dragons.com
CRA01.dragons.com
SQL01.dragons.com

Let´s look at the AAM (alternate access mapping), select the Central Administration web application and you will see:


Now we want to add the role of the CA to the following server: CRA01.dragons.com

Go to Central administration > services on server and select  the server CRA01.dragons.com. Look for the service "Central administration" and press "start". It will take a while, it depends on how large your farm is. Take it easy.
When it will appear "started" a new site called "SharePoint Central Administration v4" appears in the IIS of the server.

Now let´s check the alternate access mapping and you will find this configuration:

 
Maybe this doesn´t mean anything for you, so let´s check if the get our goal:

Open an IE and write down the new URL of the CA: http://cra01.dragons.com , and after a while it will appear  the CA , could you please let me know which URL appears in the navigator? Maybe this one? http://wfe01.dragons.com?? 

The key is the AAM. It seems that when you add the service SharePoint creates a new entry in the AAM, but as a redirection to the original Site. If we need to ensure high availability of the service we need the service to respond on another server.

Solution: Change the alternate access mapping, and assign the new URL to another Zone. For example:


Now the Central Administration web page will open on both URLs.