Sharepoint Power Shell Create a Site Collection in a Specific Data Base

By default, Site collections are created on the web application database. If you want to create a Site Collection in a diferent database, you can use the following Script:

#Create the Database

New-SPContentDatabase -Name New_Content_DB  -WebApplication http://myWebApplication

#Create the Site Collection

New-SPSite http://myWebApplication/newSite -OwnerAlias <owner account name including domain name e.g.domain\username> -ContentDatabase New_Content_DB -Name <Name of your site collection> -Description <Description of site collection> -Template “STS#0”

Reference: http://technet.microsoft.com/en-us/library/ff607937.aspx

You should also configure your WebApplication Paths to be able to create your site collection in a specific url.

http://technet.microsoft.com/en-us/library/cc261845.aspx#section1

Sharepoint 2013 – Configure Search with Power Shell

The following script will configure the Search Service and Components on a SharePoint 2013 Server:

$AppSearch = "SERVERNAME"

$SearchAppPoolName = "SharePoint_SearchApp"

$SearchAppPoolAccountName = "domain\username"

$SearchServiceName = "SharePoint_Search_Service"

$SearchServiceProxyName = "SharePoint_Search_Proxy"

$DatabaseName = "SharePoint_Search_AdminDB"

#Create a Search Service Application Pool

$spAppPool = New-SPServiceApplicationPool -Name $SearchAppPoolName -Account $SearchAppPoolAccountName -Verbose

#Start Search Service Instance on all Application Servers

Start-SPEnterpriseSearchServiceInstance $AppSearch -ErrorAction SilentlyContinue

Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $AppSearch  -ErrorAction SilentlyContinue

#Create Search Service Application

$ServiceApplication = New-SPEnterpriseSearchServiceApplication -Partitioned -Name $SearchServiceName -ApplicationPool $spAppPool.Name -DatabaseName $DatabaseName

#Create Search Service Proxy

New-SPEnterpriseSearchServiceApplicationProxy -Partitioned -Name $SearchServiceProxyName -SearchApplication $ServiceApplication

$clone = $ServiceApplication.ActiveTopology.Clone()

$AppSSI = Get-SPEnterpriseSearchServiceInstance -Identity $AppSearch

#Configure Search Components

New-SPEnterpriseSearchAdminComponent –SearchTopology $clone -SearchServiceInstance $AppSSI

New-SPEnterpriseSearchContentProcessingComponent –SearchTopology $clone -SearchServiceInstance $AppSSI

New-SPEnterpriseSearchAnalyticsProcessingComponent –SearchTopology $clone -SearchServiceInstance $AppSSI

New-SPEnterpriseSearchCrawlComponent –SearchTopology $clone -SearchServiceInstance $AppSSI

New-SPEnterpriseSearchQueryProcessingComponent –SearchTopology $clone -SearchServiceInstance $AppSSI

$PrimaryIndexLocation = "C:\Data"

$ReplicaIndexLocation = "D:\Data"

#We need two index partitions and replicas for each partition. Follow the sequence.

New-SPEnterpriseSearchIndexComponent –SearchTopology $clone -SearchServiceInstance $AppSSI -RootDirectory $PrimaryIndexLocation -IndexPartition 0

New-SPEnterpriseSearchIndexComponent –SearchTopology $clone -SearchServiceInstance $AppSSI -RootDirectory $ReplicaIndexLocation -IndexPartition 1

$clone.Activate()

Sharepoint 2013 App with Custom Lists

This post is about how to create a SharePoint 2013 App in Visual Studio 2012 with a Custom List.
To start that, you need to create an “App for SharePoint 2013” project:
CL7

Then, add a new item to your project and select “List”:

CL1

You’ll go through a wizzard where you can select if you want to create a list instance, based on an existing template, where you can’t change that template.

Or, if you want to create a list, and a template, that you can change, based on an existing template. 

Let’s start with a list based on a template that you can’t change:

CL2

Create a list named “CustomList” based on a Document Library template:

CL3

Now, let’s choose the other option and create CustomList2:

CL4

In this case, you’ll have another step, where you can define your document’s template:

CL5

And another step, where you can add more columns, in my case, I add an Attachments column:

CL6

Now, I edited my default.aspx file, to include links to my new lists:

<ahref=”/SampleApp06/Lists/CustomList”>CustomList</a>

 <ahref=”/SampleApp06/Lists/CustomList2″>CustomList2</a>

Finally, deployed my solution and see my new app with these two Custom Lists.

Office 365 Sharepoint Online – Promoted Sites

If you want to display diferent promoted sites to diferent users or groups, in SharePoint Online My Sites, you can do that with audiences.

Go to your Office 365 SharePoint Online administration, and navigate to “user profiles -> My Site Settings -> Manage Promoted Sites”:

promoted sites

Office 365 Sharepoint Online – External Users

In Office 365 you can give access to your portal, to domain users, or to external users.
To give external users access, you need to go to your office 365 administration, and set your site collection Sharing Properties.

OOEU

You can define if you want to enable anonymous users or only authenticated accesss:

OOEU1

After saving your settings, you need to go to your Portal, and invite your external users, you need to click on Share, and then enter your external users email and permissions:

OOEU3

Your external users, will receive an invitation email, and after they accept that, they will be able to log on.

You can monitor your invitations at “Site Settings -> Access Requests and Invitations”:

OOEU2

 

Sharepoint 2007 Workflows Logs

If you have problems in Workflows, you can activate Workflows logs to see which activities are generating errors.

You should do this in two places, one in your SharePoint portal’s web.config file, and also for owstimer process.

For owstimer, you should go to 12\bin folder and create a new file “owstimer.exe.config” with the following code:

<?xml version="1.0" encoding="utf-8"?> 

<configuration>

  <system.diagnostics>

    <sources>

      <source name="System.Workflow.Runtime" >

        <listeners>

          <add name = "System.Workflow"/>

        </listeners>

      </source>

      <source name="System.Workflow.Runtime.Hosting">

        <listeners>

          <add name="System.Workflow"/>

        </listeners>

      </source>

      <source name="System.Workflow.Activities">

        <listeners>

          <add name="System.Workflow"/>

        </listeners>

      </source>

    </sources>

    <sharedListeners>

      <add name="System.Workflow"

           type="System.Diagnostics.TextWriterTraceListener"

           initializeData="c:\tracing\WFTrace.log"

           traceOutputOptions="DateTime,ProcessId"/>

    </sharedListeners>

    <switches>

      <add name="System.Workflow.LogToTraceListeners" value="1"/>

      <add name="System.Workflow.Runtime" value="All" />

      <add name="System.Workflow.Runtime.Hosting" value="All" />

      <add name="System.Workflow.Runtime.Tracking" value="All" />

      <add name="System.Workflow.Activities" value="All" />

      <add name="System.Workflow.Activities.Rules" value="All" />

    </switches>

  </system.diagnostics>

</configuration>

For your portal’s web.config file you should copy the system.diagnostics section.

Office 365 Access Services Sample

This post is about how to create an Access Application in Office 365 SharePoint Online.

First you need to create a new Access App. Go to your site menu, and select “Add an app”:

ooAApp1

Select the “Access App” option:

ooAApp2

Give your app a name and create it, mine is AccessApp1.

Next click in your new application.

ooAApp3

Click to open your new application and start adding tables:

ooAApp4

You’ll open your application in Access Client, where you can start adding tables based on access templates or create your tables without any template:

ooAApp5

In this case I selected the “Book Collection” template and it automatically created the following tables:

ooAApp6

Save your new application and start using it in your SharePoint Online Portal. You’ll have automatically the create, edit, list and delete operations available:

ooAApp7