Docteur L – François Lessard

SharePoint Architect, IT Manager and IT Specialist

  • Author:
  • Published: Nov 8th, 2011
  • Category: Configuration, DNS, Domain name, Installation, PowerShell, Scripts
  • Comments: None
  •             

The Special Edition – Create a new Web Application with PowerShell – How to

Tags: , , , , , , , ,

Here’s another Special Edition post. How to create a new Web Application in SharePoint 2010 using PowerShell? Just use the following script.

# Load SharePoint 2010 CmdLets Module 
Add-PsSnapin Microsoft.SharePoint.PowerShell
# Set Variables
$SiteName = "Contoso Site"
$dns = "intranet.contoso.com"
$url = ("http://" + $dns)
$AppPool = "SharePoint - intranet.contoso.com80"
$Port = 80
$AppPoolServiceAccount = "contoso\srvshpapppool"
$ApplicationPoolAccount = Get-SPManagedAccount $AppPoolServiceAccount
$ContentDatabaseName = "SHP_2010_Intranet_Content"
$DatabaseServer = "MySQLServerName"
$SiteCollName = "Home"
$Template = "STS#0"
$Language = 1033 #Other language required the installation of the Language pack
$Owner = "contoso\myuser" 
# WebApplication Creation
New-SPWebApplication -Name $SiteName -HostHeader $SiteHostHeader -url $url -ApplicationPool $AppPool -ApplicationPoolAccount $ApplicationPoolAccount -DatabaseName $ContentDatabaseName -DatabaseServer $DatabaseServer -Port $Port 
# Site Collection Provisioning 
New-SPSite -Name $SiteName -url $url -OwnerAlias $Owner -Template $SiteCollectionTemplate -Language $Language

Requirements

Share on TwitterShare on LinkedInSubmit to StumbleUponDigg ThisSubmit to reddit
  • Author:
  • Published: Nov 7th, 2011
  • Category: Administration, Configuration, DNS, Domain name, MOSS 2007, Web Application
  • Comments: None
  •             

DNS and Web Application – Keep it simple (but not stupid)

Tags: , , , , , ,

It’s amazing how a simple thing may have a big impact. By just doing a small action in the Web Application configuration page, you can avoid a lot of complicated configuration in your network.

SharePoint 2010 (and MOSS 2007 also) always tries to be your friend. I mean, it tries to answer configuration question for you. One of it happens when creating a new Web Application.

Look this screenshot.

SharePoint 2010 - Create a Web Application

This is a default screen when creating a Web Application. SharePoint choose randomly a port number and leave the Host Header empty. I’ve seen a countless time this kind of default configuration leave like this by a SharePoint Admin. And then, the Network Administrator made special configurations in the Firewall, the Network switch and the Load balancer to make it work with a standard 80 port for the users. What a waste of time!

Why, oh why not configuring it with the port 80 right away? Some of these administrators said they weren’t aware that it was possible. Well, the Host Header field is the answer.

Domain Name System (DNS) are made to give users a friendly way to browse websites. Not only it applies over the Internet, it can be useful in a private network. Because SharePoint 2010 Web Application is, by definition, a WEB… Application, it’s a best practice to assign a DNS to each of them. Thus, everything in the network will be standard. No firewall special configuration. And even more, sometimes Firewalls do some filtering of standard port like 80, 443, 25, 21,… So keeping the SharePoint Web Application on a standard port is a good idea.

Now, in this second screenshot, here’s the good approach.

Create a Web Application - Best practice

Share on TwitterShare on LinkedInSubmit to StumbleUponDigg ThisSubmit to reddit

© 2011 Docteur L – François Lessard. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.

Switch to our mobile site