Translate

Thursday, July 21, 2016

Building a SharePoint 2016 Home Lab


Click here to purchase a copy

This book is a step-by-step guide to building your own SharePoint farm in a home lab setting.
Learn how to build a windows domain and then join servers into the domain in order to create your own testing and learning environment.

After you get the domain stood up, where you go from there is up to you. This book will help you learn how to spin up SharePoint in a least privileged fashion.

This isn’t strictly a SharePoint book, though. For example, if you’re not a SharePoint professional and are just looking to create a working windows domain for other purposes; the home-lab domain that you’ll create will work great for Exam preparation for non-SharePoint purposes. You could even use it for learning how to install Exchange Server. After all, it’s your Home Lab domain.

In this book you will build your home-lab domain and you’ll have a great place for learning how to administer SharePoint and develop SharePoint Apps.

What you’ll learn

  • Create a windows domain and a certificate authority, so that you can run SharePoint on SSL
  • Join servers to the domain and configure other technology on the member servers as needed
  • Create and administer DNS Server
  • Create and administer group policy objects (GPO’s)
  • Administer Active Directory Users and Computers
  • Configure local host resolution
  • Create Virtual machines using Hyper-V
  • Install SQL Server, and correctly partition the server in accordance with best practices
  • Use Powershell to create cleanly named SharePoint databases
  • Install and configure a SharePoint farm using minimum role technology
  • Spin up Host Named Site Collections (HNSC’s)
  • Install and configure Visual Studio

Who this book is for

This book is suitable for both developers and administrators. No technical knowledge is assumed beyond a general familiarity with computers and computing terminology. The resulting domain will be suitable for both IT and developer testing needs.

Click here to purchase a copy

Saturday, January 25, 2014

This site has moved to a new URL - anothersharepointblog

Move logging of the operating system drive and right size SharePoint 2013 intranet portal


Here are your steps and you have to do them on each server in the farm:

  1.  Make sure the server is resourced at 32 GB and at least 2 quad core processors and 100 GB for the  drive storing the logs (e.g. not the C:\) and 300 GB for the SharePoint drive and 500 GB if Drive is housing the search index. (e.g. 4vCPU assuming the server has quad core processors,  the C:\ sharePoint drive stores index, iis etc) Microsoft recommends turning on Publishing infrastructure and resourcing your servers at 32GB each, see this post:  http://technet.microsoft.com/en-us/library/ff758652.aspx,
  2. Turn on publishing infrastructure


Go to your run bar on the server and run msinfo32, take note of the “Installed Physical Memory” and the “Page file space”.  The page file space should be at lease 1.5x the installed physical memory.  So if you have 32 Gb installed memory (recommended for publishing infra…) then you need page file to be set at 49152 MB (32GB x 1.5 x 1024 MB/GB)
Use sysdm.cpl to change the size of your paging file
1. click advanced  tab > Performance Settings... > advanced tab > Change...> Select a non system drive and increase the custom size accordingly

Microsoft makes a caveat  saying “Therefore, supplement this guidance with additional testing on your own hardware in your own environment. If your planned design and workload resembles the environment described in this article, you can use this article to draw conclusions about how to scale your environment”  I say that because I've seen only 16 GB and only 4 vCPU allocated to each web front end, run a minimal load (under 1000 users) without issues.


Making the drive that runs your Operating system have less writing will also improve your performance, a little because the servers will be writing logging to a separate set of spindles than the OS. 
One way to do this is to move log files to a different drive, they are in your 15 hive :
This post explains the process for SharePoint 2010 http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=304 
just adjust for the 15 hive or move to a completely different path.  It is possible to move them to E:\SharePointLogs, so where you see thispicture that says “Notice not a C” , the settings are e:\sharepointlogs vs E:\Program files\common files\microsoft shared\web server extensions\15\logs
 
Then the powershell scripts that I ran was easier - -

Set-SPDiagnosticConfig –LogLocation “E:\SharePointLogs”

And

Set-SPUsageService –UsageLogLocation “E:\SharePointLogs”

Note:  Make sure the folder exists on every front end server in your farm before doing this

If you go the route suggested by Todd Klindt, or if you use a different path for your logs, make sure the entire path is there first on all of your servers before you modify the settings via the gui, or via powerhsell 

Here’s one way to make the path if you don’t want to do it manually:

Open powershell and type

New-item –Path “E:\Program files\common files\microsoft shared\web server extensions\15\logs” –itemtype directory

Saturday, January 18, 2014

Avoiding the Confirm prompt in scripts

There are two ways you can suppress confirmation from a script or console:

1. Set the automatic variable to 'None' or 0 in your
 $ConfirmPreference = 'None'

cd Variable:
then dir to see all the variables currently defined in your shell, the text above will change the behavior though, and then at the end of your script you could change it back to 'High'

 2. Pass $false to the Cmdlet's -Confirm switch

 ... -confirm:$false


Windows PowerShell blog on this topic:  http://blogs.msdn.com/b/powershell/archive/2006/12/15/confirmpreference.aspx

Windows PowerShell blog home:  http://blogs.msdn.com/b/powershell/

Saturday, January 11, 2014

Customizing your PowerShell window colors

The information about the settings for your PowerShell's shell colors are stored in the object model at:
System.Management.Automation.Internal.Host.InternalHost and at
System.Management.Automation.Internal.Host.InternalHostRawUserInterface

under the PrivateData and RawUI Properties

you can see the various settings by typing

$host.PrivateData and pressing enter

PS C:\Users\Stacy> $host.PrivateData

ErrorForegroundColor    : Red
ErrorBackgroundColor    : Black
WarningForegroundColor  : Yellow
WarningBackgroundColor  : Black
DebugForegroundColor    : Yellow
DebugBackgroundColor    : Black
VerboseForegroundColor  : Yellow
VerboseBackgroundColor  : Black
ProgressForegroundColor : Yellow
ProgressBackgroundColor : DarkCyan


Or by typing $host.UI.RawUI

ForegroundColor:             DarkYellow
BackgroundColor:            Black
CursorPosition:                 0,70
WindowPosition :             0,21
CursorSize:                       25
BufferSize:                        120,3000
WindowSize:                     120,50
MaxWindowSize:              120,84
MaxPhysicalWindowSize: 274,84
KeyAvailable:                    False
WindowTitle :                    Windows PowerShell


Now if you don't care for the red error text and would rather see it in green, type this

(get-host).PrivateData.ErrorForegroundColor = 'Green'

You also could have used Get-Host alias $host, like this:

$host.PrivateData.ErrorForegroundColor = 'Green'

Either way, powershell will just prompt back to normal, it will seem like nothing happened.  You can verify that it worked by typing this

$host.PrivateData.ErrorForegroundColor = Green

without the single quotes and including Green.

It will result in an error, the error text will be Green with a black Error background color.

If you want to see information about the User Interface

$host.UI.RawUI | gm

If you wanted to change the background color of your current shell to black:

$host.ui.rawUi.backgroundcolor = 'Black'

press enter

cls

press enter


If you want your shell to always open up with a black background, you could create a folder in your my documents folder and name this new folder, WindowsPowerShell.  Then create a .ps1 file and include these two lines of code:

$host.ui.rawUi.backgroundcolor = 'Black'
cls

This channel, by Don Jones, on YouTube has really, quick and easy PowerShell tutorials on the above information and more:  https://www.youtube.com/playlist?list=PL6D474E721138865A

Sunday, January 5, 2014

Backing up a SharePoint 2010 farm

There are a lot of good scripts out there to use for backing up your SharePoint.  This one is one of my favorites:

http://spfarmbackup.codeplex.com/ 

Just download it, unzip it, create a folder to store your backups, share that folder complete the Params.xml and you're about ready to go! 

Read this detailed instruction guide written by the scripts author for step-by-step instructions:  http://www.darrenmarsden.com/file.axd?file=2013%2f1%2fPreparing+for+%26+Configuring+the+SharePoint+Farm+Backup+Script.pdf

Here is another, and probably the best script for backing up your SharePoint Farm.  It is written by John Ferringer, a SharePoint Guru - http://gallery.technet.microsoft.com/scriptcenter/9b99c435-8831-4c9e-a70b-1f13158ef22a

If the Ferringer solution or the codeplex solution above seems a bit to daunting, you can copy and paste the powerhsell from this blog: http://bradcote.wordpress.com/2012/05/02/powershell-script-to-backup-site-collections/ into a .ps1 file and then set it up to run as a scheduled task using credentials that have Shell admin access and full control over the shared network location where the backups will be stored. 

You'll need to share a folder for the script to write into.  Here is the powershell script from bradcote with a few additional notes



# Backup all site collections in the farm, placing them in
# a directory on a shared location
# Note - Does not backup the /train site collection

# adds the SharePoint cmdlets to your powershell and effectively turns it into the SharePoint
#Management Shell


Add-PsSnapin Microsoft.SharePoint.PowerShell

# Take care of the disposable objects to prevent memory leak.
Start-SPAssignment -Global

# This is the backup path - must be shared with account that is executing the script and the
# farm account
$backupLocation="\\\SharePointBackups"

# Remove all that backup folders created > 7 days ago
get-childitem $backupLocation |
     where {$_.Lastwritetime -lt (date).adddays(-7)} |
     remove-item -recurse -Confirm:$false

# Get current date for use in log file and format it to avoid
# invalid characters such as "/" and ":"


$today=Get-Date -format "MM-dd-yyyy HH.mm.ss"

# Create a folder in the backup location with todays date (sortable)

$todayFolder = $backupLocation + '\' + $((get-date).toString('MM-dd-yyyy'))
$logFile="$todayFolder\BackupLog.log"
md $todayFolder

# Does not backup the /train site collection
# or the temporary web ap site collection on port 15702

# Disregard this, or use it, depending on whether you have a /train site collection, etc.

foreach ($site in get-spsite -limit all |
         where-object -FilterScript {$_.url -notlike "*/train*"} |
         where-object -FilterScript {$_.url -notlike "*15702"}) {
    write-Host Start backing up $site to $todayFolder
    try {
         # Create a new backup file and name it based on current date.
         # If you want to create only 1 backup file and overwrite it
         # each time the backup is run, you can replace "$today.bak"
         # with your desired file name.

         $pathName = ($todayFolder + '\' + $($site.ID) + '.bak')
         write-Host 'Backing up ' $site ' GUID = ' $($site.ID)

         # This farm does not have Enterprise SQL Server, so snapshots
         # cannot be used. This requires that the sites belocked for
         # update during the backup, so this should be run after hours

         Backup-SPSite -Identity $site -Path $pathName -EV Err
            -EA "SilentlyContinue"
         write-Host Backup succeeded.

         # Write success message to the log file
         write "$today $site GUID =
           $($site.ID) successfully backed up.">>logFile
    } catch {
        write-Host Backup failed. See $logFile for more information.
        # Write error message to the log file
        # change the logFile to some other name if you want, e.g. BackupHistory.txt
        $e = $Err[0].ToString()
        write "$today $site Error: $e">>logFile
    }
}
Stop-SPAssignment -Global
Remove-PsSnapin Microsoft.sharepoint.powershell
write-Host "Finished script."


This blog has another script that you can use, also an easier to use version:

http://www.mysharepointadventures.com/2012/05/powershell-script-to-backup-farm-configuration-and-service-applications/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Make sure to update these variables:

#Variables
$logfile = "SPFarm-Backup-" + $(Get-Date -Format dd-MM-yy) + ".log"
$ConfigDB = "SP_Config"
$DBServer = "server"
$BackupConfigFolder = "\\server\SharePoint\Backup\Config"
$BackupSAFolder = "\\server\SharePoint\Backup\ServiceApp"
$AdminEmail = <a href="mailto:admin@sharepoint.com">admin@sharepoint.com</a>
$MailServer = "mail.sharepoint.com"
$FromAddress = <a href="mailto:sharepoint.notifications@sharepoint.com">sharepoint.notifications


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Microsoft TechNet - http://technet.microsoft.com/en-us/library/ee428316.aspx - Backing up a Farm in SharePoint 2013

Petri blog - backup and restore advice - Good Read http://www.petri.co.il/how-to-backup-restore-sharepoint-2013.htm

John Ferringer on backups - http://mycentraladmin.wordpress.com/2011/07/11/use-powershell-to-back-up-your-sharepoint-farm/

Microsoft's scripting guy defers to John Ferringer - http://blogs.technet.com/b/heyscriptingguy/archive/2011/06/22/use-powershell-to-back-up-your-sharepoint-farm.aspx - same here

Cheers,
Stacy

Saturday, December 28, 2013

Merry Christmas!!!

I hope you've enjoyed reading this blog over the last year and that you've had a great year in SharePoint. 

There isn't going to be a blog post this week, due to the Christmas Holiday.

Next week I'll be back at it with instruction on putting a backup script in place.

Have a Merry Christmas and a Happy new year!

Cheers,

Stacy

P.S.

Check out this awesome PowerShell Reference Library on PowerShell.com: http://powershell.com/cs/media/28/default.aspx

Check out this PowerShell Code repository on http://poshcode.org/

Saturday, December 21, 2013

Setting up your farm for optimal performance - Super User and Super Reader Accounts

It is important to configure the super user and super reader accounts for your SharePoint farm in order to optimize it's use of the object cache.  This is true especially if you are using the SharePoint Server Publishing Infrastructure.

Here is a link to the detailed steps on TechNet: http://technet.microsoft.com/en-us/library/ff758656.aspx 


Here are the high level steps:

Create or get two service accounts created, one for the Super User and one for the Super Reader
Add the Super User account to each web application with Full Control
Add the Super Reader account to each web application with Full Read
(Both of the above can be performed via central admin - Application Management > Manage Web Applications > User Policy)

Then run the following four lines in an elevated SharePoint management console

$wa = Get-SPWebApplication -Identity "<WebApplication>"
$wa.Properties["portalsuperuseraccount"] = "<SuperUser>"
$wa.Properties["portalsuperreaderaccount"] = "<SuperReader>"
$wa.Update()

Repeat this for each web application that you have.

use these values:

  • <WebApplication> is the name of the web application to which the accounts will be added.
  • <SuperUser> is the account to use for the Portal Super User account as you saw it displayed in the User Column field mentioned in Step 14 of the previous procedure.
  • <SuperReader> is account to use for the Portal Super Reader account as you saw it displayed in the User Column field mentioned in Step 14 of the previous procedure.
For example, assuming the sp content account shown below was the Super User account, you would  type $wa.properties["portalsuperuseraccount"]="THEMANCAVE\SPContent"
on line two.  On line one, you'd type either the URL or the name of the web application, so either $wa = Get-SPWebApplication -Identity "SharePoint - 80" or $wa = Get-SPWebApplication -Identity "http://2010app1/"
 
and on line three, it would be similar to line two, just replacing the account with the reader account, assuming spreader was the reader account,
 
$wa.properties["portalsuperreaderaccount"]="THEMANCAVE\SPreader"
 
Note:  this server uses that as the search account, so you would want a different search account or a different reader account, don't use the same account for crawling and for reading the object cache.

Also, if you are working with a SharePoint 2013, you'll want to use the claims based accounts when running the powershell

$wa.properties["portalsuperreaderaccount"]="i.0#.w|THEMANCAVE\SPreader"
 
 
 
Cheers,
 

Saturday, December 14, 2013

Web Application not getting created on all Web Front ends?

If you ever run into a situation where your farm suddenly fails to create the web application on all front end web servers, in other words it only gets created on the server running central admin, one good indication of that will be that the screen shown here: 



Which normally advises you that the web application was created and would you like to know more about FBA (forms based authentication) will not appear. 


 Instead you will see a screen that says the page can not be displayed by Internet explorer, similar to the one shown here:

 
This starts to occur when the process model shutdown time limit for the application pool that runs central admin is not long enough.  This is usually due to one or a combination of the farm not having enough resources, being overworked due to more than 20 web applications, or numerous extended web applications.
 
 
The detailed steps for this blog post are found here: http://support.microsoft.com/kb/2543306
 
Here are the high level steps to resolve this issue:
 
Logon to your server that runs central admin
Open IIS Manager (inetmgr.exe)
Right click on the Central Administration application pool
Select Advanced Settings
increase the Shutdown Time Limit for the Process Model from the default of 90 seconds to something higher, e.g. 300 Seconds.
 
 
 
 
You're good to go now; but you should check and delete the web application that didn't replicate and make sure it was removed from the physical path of IIS before you attempt to recreate.  Check all servers in your farm that have SharePoint binaries installed.
 
 
Before I knew this trick, I was adding and removing servers from the farm to get the web application to replicate, adjusting the process model shutdown time limit is much faster,
 
Cheers

Saturday, December 7, 2013

Exporting and Importing just a list or a library

If the goal is to import just one list or one library there are a couple ways you can accomplish this:

1. Navigate to settings for the list or library, save it as a template, navigate to the solutions gallery, right click on the newly created template, save it as Windows SharePoint Services solutions package and then deploy that solutions package to your site, activate the feature, and begin using the list or library, Or,

2. Run this PowerShell, making sure to use the actual URL of the list or the correct name of the library.  Surround this item in quotes

Export-SPweb http://mySitethathaslist/sites/ToExport -Item "Lists\Name of the list" -Path e:\PathToSaveFile\Filename.cmp -IncludeUserSecurity -IncludeVersions All

then copy that Filename.cmp to the destination server and run

Import-spweb http://anothersharepointblog.blogspot.com -Path e:\PathtoWheretheFilewasImported\FileName.cmp -includeUserSecurity -UpdateVersions Overwrite

Note:  if the url to the list was actually lists/nameList then the Item part in the Export-spWeb above would've read "Lists\nameList"  and not "Lists\Name of Lists".  Also if you are performing this for a document library, Lists\ is not needed.

Cheers,

Saturday, November 30, 2013

Provisioning a SharePoint 2010 Farm Service Applications using a PowerShell Script

 
This video is best if watched in Full Screen mode:  http://www.youtube.com/watch?v=3HAjO8yiANM  and any references to completed services should really say, the powershell script has completed creating the service application and you still need to manually configure it, just as you would if the service were created by the White Wizard.  Difference with this method is that it generates a SharePoint environment containing database names that are GUID free.
 




Here's another video of this process


Contents of Bus.ps1 Replaces the White Wizard\Farm Wizard

It places all the service applications under one application pool in IIS

#####################################################
This script replicates most of the functionality found in the SharePoint Products Configuration Wizard with the EXCEPTION of the USER PROFILE SERVICE
##################################################### 
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue

## Settings you may want to change ##
$databaseServerName = “2010SQL”
$searchServerName = “2010WEB1” #Front end Server that will run central admin, the server you’re on right now
$saAppPoolName = “SharePoint Web Services Default”
$appPoolUserName = “DOMAIN\MyFarmer” #farm admin account for Timer and Central admin, check that both services are running under this account before
# running this script

## Service Application Service Names ##
$accesssSAName = “Access Services”
$bcsSAName = “Business Data Connectivity Service”
$excelSAName = “Excel Services Application”
$metadataSAName = “Managed Metadata Web Service”
$performancePointSAName = “PerformancePoint Service”
$searchSAName = “SharePoint Server Search”
$stateSAName = “State Service”
$secureStoreSAName = “Secure Store Service”
$usageSAName = “Usage and Health Data Collection Service”
$userProfileSAName = “User Profile Synchronization Service”
$visioSAName = “Visio Graphics Service”
$WebAnalyticsSAName = “Web Analytics Service”
$WordAutomationSAName = “Word Automation Services”


$saAppPool = Get-SPServiceApplicationPool -Identity $saAppPoolName -EA 0
if($saAppPool -eq $null)
{
Write-Host “Creating Service Application Pool…”

$appPoolAccount = Get-SPManagedAccount -Identity $appPoolUserName -EA 0
if($appPoolAccount -eq $null)
{
Write-Host “Please supply the password for the Service Account…”
$appPoolCred = Get-Credential $appPoolUserName
$appPoolAccount = New-SPManagedAccount -Credential $appPoolCred -EA 0
}

$appPoolAccount = Get-SPManagedAccount -Identity $appPoolUserName -EA 0

if($appPoolAccount -eq $null)
{
Write-Host “Cannot create or find the managed account $appPoolUserName, please ensure the account exists.”
Exit -1
}

New-SPServiceApplicationPool -Name $saAppPoolName -Account $appPoolAccount -EA 0 > $null

}


Write-Host “Creating Usage Service and Proxy…”
$serviceInstance = Get-SPUsageService
New-SPUsageApplication -Name $usageSAName -DatabaseServer $databaseServerName -DatabaseName “UsageDB” -UsageService $serviceInstance > $null

 Write-Host “Creating Access Services and Proxy…”
New-SPAccessServiceApplication -Name $accesssSAName -ApplicationPool $saAppPoolName > $null
Get-SPServiceInstance | where-object {$_.TypeName -eq “Access Database Service”} | Start-SPServiceInstance > $null

 Write-Host “Creating BCS Service and Proxy…”

New-SPBusinessDataCatalogServiceApplication -Name $bcsSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName “BusinessDataCatalogDB” > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “Business Data Connectivity Service”} | Start-SPServiceInstance > $null

 Write-Host “Creating Excel Service…”
New-SPExcelServiceApplication -name $excelSAName –ApplicationPool $saAppPoolName > $null
 

Set-SPExcelFileLocation -Identity “http://” -ExcelServiceApplication $excelSAName -ExternalDataAllowed 2 -WorkbookSizeMax 10 -WarnOnDataRefresh:$true

Get-SPServiceInstance | where-object {$_.TypeName -eq “Excel Calculation Services”} | Start-SPServiceInstance > $null

Write-Host “Creating Metadata Service and Proxy…”

New-SPMetadataServiceApplication -Name $metadataSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName “MetadataDB” > $null
 

New-SPMetadataServiceApplicationProxy -Name “$metadataSAName Proxy” -DefaultProxyGroup -ServiceApplication $metadataSAName > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “Managed Metadata Web Service”} | Start-SPServiceInstance > $null


 Write-Host “Creating Performance Point Service and Proxy…”

New-SPPerformancePointServiceApplication -Name $performancePointSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName “PerformancePointDB” > $null
 

New-SPPerformancePointServiceApplicationProxy -Default -Name “$performancePointSAName Proxy” -ServiceApplication $performancePointSAName > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “PerformancePoint Service”} | Start-SPServiceInstance > $null


##START SEARCH

Write-Host “Creating Search Service and Proxy…”
Write-Host ” Starting Services…”
Start-SPEnterpriseSearchServiceInstance $searchServerName
Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $searchServerName

Write-Host ” Creating Search Application…”
$searchApp = New-SPEnterpriseSearchServiceApplication -Name $searchSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName “SearchDB”
$searchInstance = Get-SPEnterpriseSearchServiceInstance $searchServerName

Write-Host ” Creating Administration Component…”
$searchApp | Get-SPEnterpriseSearchAdministrationComponent | Set-SPEnterpriseSearchAdministrationComponent -SearchServiceInstance $searchInstance


##Crawl
Write-Host ” Creating Crawl Component…”
$InitialCrawlTopology = $searchApp | Get-SPEnterpriseSearchCrawlTopology -Active
$CrawlTopology = $searchApp | New-SPEnterpriseSearchCrawlTopology
$CrawlDatabase = ([array]($searchApp | Get-SPEnterpriseSearchCrawlDatabase))[0]
$CrawlComponent = New-SPEnterpriseSearchCrawlComponent -CrawlTopology $CrawlTopology -CrawlDatabase $CrawlDatabase -SearchServiceInstance $searchInstance
$CrawlTopology | Set-SPEnterpriseSearchCrawlTopology -Active

Write-Host -ForegroundColor white ” Waiting for the old crawl topology to become inactive” -NoNewline
do {write-host -NoNewline .;Start-Sleep 6;} while ($InitialCrawlTopology.State -ne “Inactive”)
$InitialCrawlTopology | Remove-SPEnterpriseSearchCrawlTopology -Confirm:$false
Write-Host

 ##Query
Write-Host ” Creating Query Component…”
$InitialQueryTopology = $searchApp | Get-SPEnterpriseSearchQueryTopology -Active
$QueryTopology = $searchApp | New-SPEnterpriseSearchQueryTopology -Partitions 1
$IndexPartition= (Get-SPEnterpriseSearchIndexPartition -QueryTopology $QueryTopology)
$QueryComponent = New-SPEnterpriseSearchQuerycomponent -QueryTopology $QueryTopology -IndexPartition $IndexPartition -SearchServiceInstance $searchInstance
$PropertyDatabase = ([array]($searchApp | Get-SPEnterpriseSearchPropertyDatabase))[0]
$IndexPartition | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $PropertyDatabase
$QueryTopology | Set-SPEnterpriseSearchQueryTopology -Active

 Write-Host ” Creating Proxy…”
$searchAppProxy = New-SPEnterpriseSearchServiceApplicationProxy -Name “$searchSAName Proxy” -SearchApplication $searchSAName > $null


#####END SEARCH


Write-Host “Creating State Service and Proxy…”
New-SPStateServiceDatabase -Name “StateServiceDB” -DatabaseServer $databaseServerName | New-SPStateServiceApplication -Name $stateSAName | New-SPStateServiceApplicationProxy -Name “$stateSAName Proxy” -DefaultProxyGroup > $null

 Write-Host “Creating Secure Store Service and Proxy…”

New-SPSecureStoreServiceapplication -Name $secureStoreSAName -Sharing:$false -DatabaseServer $databaseServerName -DatabaseName “SecureStoreServiceAppDB” -ApplicationPool $saAppPoolName -auditingEnabled:$true -auditlogmaxsize 30 | New-SPSecureStoreServiceApplicationProxy -name “$secureStoreSAName Proxy” -DefaultProxygroup > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “Secure Store Service”} | Start-SPServiceInstance > $null
#USER PROFILE SERVICE Creation commented out because there are still known issues
with creating it via powershell
 #Write-Host “Creating User Profile Service and Proxy…”
#$userProfileService = New-SPProfileServiceApplication -Name $userProfileSAName -ApplicationPool $saAppPoolName -ProfileDBServer $databaseServerName -#ProfileDBName “ProfileDB” -SocialDBServer $databaseServerName -SocialDBName “SocialDB” -ProfileSyncDBServer $databaseServerName -ProfileSyncDBName “SyncDB”
#New-SPProfileServiceApplicationProxy -Name “$userProfileSAName Proxy” -ServiceApplication $userProfileService -DefaultProxyGroup > $null
#Get-SPServiceInstance | where-object {$_.TypeName -eq “User Profile Service”} | Start-SPServiceInstance > $null

 Write-Host “Creating Visio Graphics Service and Proxy…”

New-SPVisioServiceApplication -Name $visioSAName -ApplicationPool $saAppPoolName > $null
 

New-SPVisioServiceApplicationProxy -Name “$visioSAName Proxy” -ServiceApplication $visioSAName > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “Visio Graphics Service”} | Start-SPServiceInstance > $null

 Write-Host “Creating Web Analytics Service and Proxy…”
$stagerSubscription = “”
$reportingSubscription = “”

New-SPWebAnalyticsServiceApplication -Name $WebAnalyticsSAName -ApplicationPool $saAppPoolName -ReportingDataRetention 20 -SamplingRate 100 -ListOfReportingDatabases $reportingSubscription -ListOfStagingDatabases $stagerSubscription > $null

New-SPWebAnalyticsServiceApplicationProxy -Name “$WebAnalyticsSAName Proxy” -ServiceApplication $WebAnalyticsSAName > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “Web Analytics Web Service”} | Start-SPServiceInstance > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “Web Analytics Data Processing Service”} | Start-SPServiceInstance > $null

 Write-Host “Creating Word Conversion Service and Proxy…”

New-SPWordConversionServiceApplication -Name $WordAutomationSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName “WordAutomationDB” -Default > $null
 

Get-SPServiceInstance | where-object {$_.TypeName -eq “Word Automation Services”} | Start-SPServiceInstance > $null
############################################## End Script

Now proceed to manually configuring your service applications (e.g. the Secure Store Service for Excel Services, Visio graphics, and performance point. The managed meta data service for a content type hub)

See this post starting at step 8 for steps to configure the  User Profile Service

Saturday, November 23, 2013

Links to Software to create a home lab

Pre-requisite:  A server with at least 16 GB of RAM
 



http://technet.microsoft.com/en-us/evalcenter/default - all Evaluation Software

http://technet.microsoft.com/en-US/evalcenter/dn407368 - previous editions (e.g. windows server 2008 R2, Sharepoint 2010, etc)


Here are your  high level steps:

On your server with 16-32 GB of ram and xeon processors, run up either Vmware, or install Windows Server 2012 Datacenter and install the Hyper-V role

Then create a VM and
Install DNS or just wait for active directory to install it on your first DC
Install Active Directory Domain Services,



Create another domain controller and join it into the domain for redundancy
Create some Host (A) records in DNS

Start creating your vm’s for your farm
Install Windows
Install SQL
Install SharePoint

Saturday, November 16, 2013

What are Crawled Properties, iFilters, and Connectors in SharePoint 2010?

This post lists links to various TechNet resources, along with a brief  regarding each resource:


Crawled Properties:  this page details the properties that are included in the index by default.  You can modify the default properties to provide a richer index that is targeted in relation to your objectives.

For example, is a person's work phone or job title part of the default content that is indexed from MySites?  check this page to find out.

http://technet.microsoft.com/en-us/library/hh134087(v=office.14).aspx

to change that, click on Metadata Properties off the Search Service Administration page, available by navigating to Application management > Manage Service Applications

Default iFilters:  this page details the file types that are supported by default. And, it lists whether the file types are included in the search administration file types page under the "file type included by default" column.  If you don't see your file type listed, (e.g. adobe acrobat pdf), you have to download and install the iFilter, an image file for the crawl server to use next to pdf's, and then register the iFilter in registry.

http://technet.microsoft.com/en-us/library/gg405170(v=office.14).aspx

Default connectors:  this page explains the various types of connectors that are supported out of the box.  Ever wonder what sps3 was for?  check out this page.

http://technet.microsoft.com/en-us/library/gg153530(v=office.14).aspx

Saturday, November 9, 2013

Move SharePoint Server IIS to a different drive

To move IIS to a different drive is a fairly straightforward procedure.

This blog - -> http://blogs.iis.net/thomad/archive/2008/02/10/moving-the-iis7-inetpub-directory-to-a-different-drive.aspx has detailed the steps very neatly.

In a nutshell, and to adapt them to a SharePoint install, here is what I recommend.

1. Run the SharePoint pre-requisite installer and say no to running the SharePoint products and Technologies Wizard.

2. Run the MoveIIS7root.bat from the site above

3. Use xcopy to copy all content to the new location

4. Verify that E:\inetpub was created, and verify ACL's and content with what is on C:\InetPub

5. navigate to HKLM\Software\Microsoft\InetSTP and make sure physical path to IIS is set to the path you selected when running MoveIIS7root.bat and verify that it does not contain two \\'s.  it should read e:\ not e:\\

6. Verify that you can delete the C:\InetPub folder, and if you can not, then take ownership starting at the deepest directories and work your way up to the C:\inetpub, deleting as you go.

7. Stop and start www service (sc stop w3svc, sc query w3svc, then after is stopped, sc start w3svc - or via services.msc)

8. Stop and start IIS admin service (sc stop iisadmin, sc query iisadmin, sc start iisadmin)

9. Restart server, make sure recovery settings for services are set to restart on failures
.
10. Continue with the SharePoint install by running the SharePoint Product and Technologies Wizard

Saturday, November 2, 2013

How to - IIS moving sites and applications

In this completely, hypothetical, situation, you are the web administrator for a website named ChiNet.  Chinet is an old, antiquated site, but you love it nonetheless and want to move it to a completely different server.  The URL to Chinet is http://chinet.yourdomain.com

1. Open inetmgr (iis manager)

2. Then right click on the web you want to move to another server, or right click on the entire server if you want

3. Click on deploy and if you dont see deploy, click here

4. Click on export application

5. Copy the zip file to your destination server

6. Make sure the physical path to your web exists, and any local users and groups exist, on the destination server (e.g. d:\inetpub\chihome\wwwroot  or whatever, and then the local users) - - this would be the relative same physical path where the site was stored, only now it is on the new server.

7. Open iis manager (inetmgr)

8. Create a new site that points to the physical path that you created in step 6

9. Right click on the site, click deploy, click import application

10. Navigate to the location where you placed the zip file

11. Place the contents of it in the root (watch this, it will try to double root you, maybe  chihome/chihome,   remove the second chihome)

12. Next through

13. Begin enjoying your website named chinet on the new server

14. Get the cname record in dns switched to point to this servers host name (A record)

Saturday, October 26, 2013

A few Random development tricks - slighted trickery


CSS to block quicklaunch etc.


<style>
.ms-quicklaunch
{
display:none;
}
.ms-navframe
{
display: none;
}
.ms-globalTitleArea {
display: none;

}
</style> 

The following code is for a sharepoint redirect, just add it to a content editor web part

<meta http-equiv="refresh" content="10;url=http://MYSERVERNAME.com/Pages/default.aspx">

This code, below, taken from http://pathtosharepoint.com  will ADD the quicklaunch using a CEWP

<!-- Load and display Quick Launch - iframe version -->
<!-- Questions and comments: Christophe@PathToSharePoint.com -->
<!-- Paste the URL of the source page below: -->

< iframe id="SourcePage" style="display:none;" src="http://[YourSite]/default.aspx" onload="DisplayQuickLaunch()"></iframe>
<script type="text/javascript">
function DisplayQuickLaunch()
{
var placeholder = document.getElementById("LeftNavigationAreaCell");
var quicklaunchmenu = null;
var SourcePage = document.getElementById("SourcePage");
try {
   if(SourcePage.contentDocument)
      // Firefox, Opera

      {quicklaunchmenu = SourcePage.contentDocument.getElementById("LeftNavigationAreaCell") ;}
   else if(SourcePage.contentWindow)
      // Internet Explorer
      {quicklaunchmenu = SourcePage.contentWindow.document.getElementById("LeftNavigationAreaCell") ;}
   else if(SourcePage.document)
      // Others?
      {quicklaunchmenu = SourcePage.document.getElementById("LeftNavigationAreaCell") ;}
}
catch(err) { alert ("Loading failed");}
var allDescendants = quicklaunchmenu.getElementsByTagName("*");
for (i=0;i<allDescendants.length;i++) {
allDescendants[i].removeAttribute("id");
allDescendants[i].removeAttribute("onclick");
allDescendants[i].removeAttribute("onfocus");
allDescendants[i].removeAttribute("onmouseover");
}
placeholder.innerHTML = quicklaunchmenu.innerHTML;
}
</script>

Popular Posts