Archive for the Category SharePoint 2010

 
 

Windows PowerShell and the SharePoint Management Shell

If you’re an expert at this then you’re ahead of me here. My new install of Server 2008 R2 includes a Windows PowerShell (WPS) and my SharePoint install includes a SharePoint Management Shell (SMS).

I found this on MSDN where they explain that SMS is just WPS with the SharePoint PowerShell snap-in added. Also, this is part of the move away from the Shared Service Provider to a more generic Service Application Framework that will support all of Office 14. Here, we can see that Microsoft claims this approach will improve development, integration, load balancing, authentication and back-up\restore.

There’s also a discussion of the PowerShell and SharePoint Foundation here where you’ll find links to the beginner guides for WPS.

I also found the help file for the SMS Cmdlets here. This page is labeled for the Search Server 2010 Express but the SharePoint 2010 Beta commands are included in the third of the three help files listed.

Finally, our new best friend David explains here that cmdlets can be written into a .psl file and run from the PS> prompt as well as where to find your $profile so you can add the SharePoint cmdlets into your generic PowerShell environment.

-robot

SharePoint 2010 Creating Web Applications pt. 2

SharePoint 2010 provides a number of ways to create a new web application. We looked at the instructions on TechNet here.

Yesterday, we created a new web app using the pages in Central Admin and a non-standard port number. The TechNet page tells us we can use the new SharePoint Management Shell (SMS) application that is intended to replace stsadmin.exe. It’s available on the server under Start | Programs | SharePoint 2010 Products | SharePoint Management Shell.

TechNet also tells us the SMS command to create a new web app is:

New-SPWebApplication -ApplicationPool <Name of the application pool>
-Name <Name of the new Web application>
[-Port<Port on which the Web application can be accessed>]
[-HostHeader<Valid URL assigned to the Web application that must correlate
to the alternate access mapping configuration>]
[-URL<Load-balanced URL for the Web application>]
[-ApplicationPoolAccount<User account that this application pool will run as>]

So I composed mine like this:

New-SPWebApplication
-Name "Contoso Internet Site"
-Port 80
-HostHeader http://sharepoint.contoso.com
-URL https://www.contoso.com
-ApplicationPool ContosoAppPool
-ApplicationPoolAccount (Get-SPManagedAccount MyServer\Administrator)

And, obviously, we need to look into managed accounts in a little more detail because the error is:

Get-SPManagedAccount : No matching accounts were found.

In fact, I’m not sure I know what a managed account is.

For my money, no one explains it better than our new best friend Furuknap here. Furuknap tells us that SharePoint 2010 can take over the management of the password of accounts used as application pool IDs. This is convenient because every IIS web site will refer to an app pool and every app pool refers to an ID. When these scale out, managing the passwords can be difficult, particularly when they expire. This new SharePoint 2010 feature eliminates this headache.

So we need a managed account for our SMS create web app script to work.

So we go into Central Admin and visit the Security page. Here, there’s a linkgroup for General Security. I click Configure Managed Accounts.

There’s a Register Managed Account link at the top. I click it and enter an account I made earlier for this purpose MyServer\ManagedAccount. Furuknap explains the benefits of letting SharePoint now support your password requirement but I leave them blank all the same.

Now, I return to my SMS session and change my command to reflect the new managed account. I press Enter and it runs and runs and returns some output indicating my Site name and URL. I enter the URL in my browser and press Enter. It runs for a second and prompts me for a user name and password.

I try the only accounts on the machine: The Administrator account and the managed account. Neither works.

So I tracked down some input on Technet here. They pointed me to the KB article here talking about the trackback loops when trying to hit web sites on the local server with non-standard host headers.

-robot

Creating SPS 2010 Web Applications

I tried one yesterday but after it finished, it wouldn’ t let me log ono it.

So today, I’ve gone out and found this on Technet.

Now, like any good robot, there’s nothing I like more than following good instructions nor less, bad. So here goes.

Now the Technet page is good in that it sets some expecations. Our new web application will have it’s own database and when we create it, we’ll need to specify an anthenication type, Classic (Windows) or Claim-Based (Windows or Form Based.) Also, it points out that the new PowerShell environment will let you create web apps programatically so we’ll have to get a good look at that later.

So, Central Administration has an Application Management page where there’s a link to the Manage Web Applications page:

../_admin/webapplicationlist.aspx. 

Here, there’s a New link on the ribbon. This loads a Create New Web Application page:

../admin/extendvs.aspx.

Now a note here. My CA web site actually loads this page in a dialog box centered over the shaded page. When I right click on it I can see the properties and get the URL for the dialog box:

http://myserver:<myCAPortNumber>/_admin/extendvs.aspx?IsDlg=1

The ?IsDlg=1 query string is what makes it the shaded dialog; if you delete the query string, the page will load in the browser window without the shading effect.

Following TechNet’s instructions, I select Classic Mode authentication and Create New IIS Web Site.  I leave the website name unchanged. The host header value is optional. I’ve always preferred to route to web sites using the host header but for this first attempt, I’ll leave it blank.

I leave the default website path unchanged. I’m also going to leave the authentication method as NTLM. At this point I’m checking Yes for Allow Anonymous. TechNet tells us this is required if you want any content to be accessible anonymously and, later, you can restrict anonymous access. This cannot be changed later.

I am not going to use SSL and I’m going to leave the default URL and zone unchanged.

I’m going to use an existing application pool, the same on I’m using for my existing site.  I dot the option and pull down the list and select SharePoint – 80 (Network Service). The option to create a new one will also let you create a new managed account by opening up a new window. I may try that later.

It gives me default database server and name. The name has a GUID suffix. I usually change it to something more easily deciphered like the port number of web app name used above. I leave the default Windows Authentication unchanged in the database authentication section.

At this point, I don’t have a failover database server and, I presume since I’m a stand alone inststallation, I don’t get to select a search server; it simply says that search is provided by SharePoint Server Search.

Next, we have a new Service Application Selection section. This can be default or custom. If we select custom, we can selectfrom the list of available services. I’m leaving the default value unchanged.

Lastly, we have some ugliness about the Customer Experience Improvement Program. I’m going to leave it as No and click OK. The dialog box indicates that it’s Processing and shows me an orbiting ball. Then I get a dialog box that says Web Application Created with a link about forms based authentication configurations and another to Create Site Collection.

I click Create Site Collection and end up at:

../_admin/CreateSite.aspx?WebApplicationID=<GUID>

and I get the &IsDlg=1 query string as well. I give it a name and make myself the owner. I leave the rest unchanged and click OK.  

The dialog box says the top-level site is created and gives me a link. I click it.

I end up with a new site called Home and it got a great picure of some new dorks.

So what did we miss? First, there’s alternative authentication options. We could look at creating new Application Pools and then there’s the PowerShell options. We’ll look at those next.

-robot

SharePoint Portal Server 2010 Up and Running

So, if you were following along, we ran aground on step 5 of 10 during the configuration wizard. I posted my error here on MSDN and got a response that Stand Alone mode is not supported on a DC.

This is odd because the Configuration Wizard never let me choose Complete mode; it just went straight into steps 1 – 10. It never asked me for my DB Access account or nothing.

So I reverted my VM back to a snapshot taken before I did the DCPromo and the SQL Server install. I installed SharePoint and the Configuration Wizard comes up and, this time, it asked me did I want Stand Alone or Complete?

So, “great” I said, I’ll install SQL Server and I’ll have complete after all. So I rework the SQL Server install and then the configuration wizard and select Complete.

When I get to the part where it wants my DBAccess acount UID and password, it barfs saying in complete mode the DBAccess account must be a domain account. Then, to twist the knife, the Configuration Wizard would not back out to where I could select Stand Alone mode. I tried to start it over and I tried to reinstall SharePoint and start it over, all to no avail.

So, I reverted once again to the pre-DC, Pre-SQL Server snaphot and was able to install SharePoint and run the Configuration Wizard into Stand Alone mode.

When it completed, it loaded the template selector page, not Central Admin. I chose the Publishing Portal and it build me an Adventure Works site with the old dorks from SharePoint 2007 team site and a couple of new dorks.

So what we’ve learned is that Microsoft wants to sell two Server 2008 licenses at a minimum to support a Complete mode setup.

hth!

-robot

SharePoint 2010 Install

With a solid domain controller and SQL Server running, it’s time to install SharePoint 2010.

In SQL Server, I connected to the server and opened the Security | Logins node. I right clicked and selected New. I added the db access account. On the Server Roles tab, I assigned it dbcreator and securityadmin roles.

For SharePoint, you can download the Beta package here.

I clicked on the .exe and I get the pretty new SharePoint Server 2010 dialog.

Under the prepare heading, I click Read The Install Guide. This is a link that points to Technet. Now I know you’re wondering who I am and what happened to Robot but I’m going to take a few minutes and read through it.

In the meantime, I click Install the Prerequisites. I get the SharePoint Product Preparation Tool that wants to check a bunch of stuff so I click Next. I accept the agreement and click Next.

It loads a bunch of stuff and gives me an Installation Complete page so I click Finish.

I take a deep breath and click Install SharePoint Server.

I enter the product key, accept the agreement and click Continue.

I accept the default file locations and click Install Now.

It runs and runs… Then I get a dialog that says Run Configuration Wizard so I click Close.

The SharePoint Products Configuration Wizard opens. I click Next. It warns me that some services will be stopped. I click Yes.

It counts configuration tasks.. 1 of 10, 2 of 10, 3, 4, 5…

I get: Configuration Failed and it’s pointing me to a PSCDiagnostics.log that’s about a thousand pages long. About five minutes into the install I got a warning:

Found registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS\Services\Microsoft.Office.Server.Administration.DiagnosticsService, but the SubKeyCount is zero

I get the same warning two more times in the next 20 seconds. Then, about seven minutes into the install, I get this:

Calling SPServiceInstance.Provision for instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance, service Microsoft.Office.Server.Search.Administration.SearchService
02/23/2010 17:16:14  11  ERR                  Task services has failed with an unknown exception

Then a bunch of errors:

02/23/2010 17:16:14  11  ERR                  Exception: System.ServiceProcess.TimeoutException: Time out has expired and the operation has not been completed.
   at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)
   at Microsoft.SharePoint.Win32.SPAdvApi32.StartService(String strServiceName)
   at Microsoft.SharePoint.Administration.SPWindowsServiceInstance.Start()
   at Microsoft.SharePoint.Administration.SPWindowsServiceInstance.Provision(Boolean start)
   at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Provision()
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInstanceInConfigDB(Boolean provisionTheServiceInstanceToo, String serviceInstanceRegistryKeyName, Object sharepointServiceObject)
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInstances(Boolean provisionTheServiceInstancesToo, String serviceRegistryKeyName, Object sharepointServiceObject)
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServices(Boolean provisionTheServicesToo)
   at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.Run()
   at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

Less than Optimal…

-robot

 http://blogs.msdn.com/opal/archive/2009/11/16/installation-notice-for-sharepoint-2010-public-beta.aspx

-robot

New Best Friend on Twitter

I was having trouble extracting the files I spent about six hours downloading yesterday from microsoft.com here. These are one .exe and fourteen .rar files, each around 700 mb.

So I put them in a folder and clicked on the .exe and it crapped out with an error:

CRC failed in Ext 2010-4a\Virtual Hard Disks\2010-4a.vhd Unexpected end of archive Packed data CR…

I had to truncate the whole message because I copied it into the Twitter search bar and found our new best friend @Ivor59. He suggested figuring out which one was faulty by checking the file sizes and, sure enough, the first one was a little short of capacity, around 65 Mb. The others were all 716,800 Kb except the last on which was 479,944 lb.

I redownloaded the first one, the .exe, and now it’s 716,807 Kb which seems like it might be a full set of bits. I clicked it and now the extraction seems to be running…

Extracting Ext 2010-4a\config.xml
Extracting Ext 2010-4a\Virtual Hard Disks\2010-4a.vhd
Extracting from Ext 2010-4a.part02.rar
Extracting from Ext 2010-4a.part03.rar
Extracting from Ext 2010-4a.part04.rar
Extracting from Ext 2010-4a.part05.rar
Extracting from Ext 2010-4a.part06.rar
Extracting from Ext 2010-4a.part07.rar
Extracting from Ext 2010-4a.part08.rar
Extracting from Ext 2010-4a.part09.rar
Extracting from Ext 2010-4a.part10.rar
Extracting from Ext 2010-4a.part11.rar
Extracting from Ext 2010-4a.part12.rar
Extracting from Ext 2010-4a.part13.rar
Extracting from Ext 2010-4a.part14.rar
Extracting from Ext 2010-4a.part15.rar
Extraction Complete

And then the extraction wizard just went away

In it’s place, I have a folder with a config.xml file and three folders:

1. Snapshots – Empty
2. Virtual Hard Disks – One 32 Gb file: 2010-4a.vhd.
3. Virtual Machines – One <guid>.exp file.

I guess it’s time to figure out how Hyper-V works.

I followed the instructions I rewrote yesterday and created that internal network and imported the VM. I right clicked and selected Start and get an error:

‘Ext 2010-4a’ could not initialize. The virtual machine could not be started because the hypervisor is not running.

Great. What’s a Hypervisor?

hth

-robot

The SharePoint 2010 Beta VM Download Page

When I go here I get to the Overview and it’s missing suitable line breaks. Maybe it was written in the SharePoint 2007 rich text editor.

So I’m going to reformat it for you here:

This download contains a two Virtual Machine set for evaluating and demonstrating Office 2010 and SharePoint 2010.

Virtual machine “a” contains the following pre-configured software:

1. Windows Server 2008 SP2 Standard Edition x64, running as an Active Directory Domain Controller for the “CONTOSO.COM” domain with DNS and WINS

2. Microsoft SQL Server 2008 SP1 + CU2 Enterprise Edition with Analysis, Notification, and Reporting Services

3. Microsoft Office Communication Server 2007 R2

4. Visual Studio 2010 Beta 2 Ultimate Edition

5. Microsoft SharePoint Server 2010 Enterprise Edition Beta 2

6. Microsoft Office Web Applications Beta 2 

7. FAST Search for SharePoint 2010 Beta 2 <

8. Microsoft Project Server 2010 Beta 2 

9. Microsoft Office 2010 Beta 2

10. Microsoft Office Communicator 2007 R2

Virtual machine “b” contains the following pre-configured software:

1. Windows Server 2008 R2 Standard Evaluation Edition x64, joined to the “CONTOSO.COM” domain 

2. Microsoft Exchange Server 2010

Active directory has been preconfigured over 200 “demo” users with metadata in an organizational structure. All of these user profiles have been imported and indexed for search within SharePoint Server 2010, with “contoso\administrator” granted administrator permissions.

SharePoint Server 2010 has been configured in a “Complete” farm using Kerberos authentication and the default SQL Server 2008 instance for data, and has a site collection created using the Team Site template at http://intranet.contoso.com/ and a FAST Search Center at http://intranet.contoso.com/search/.

Performance Considerations

1. If possible, unpack and run the VM image on a separate, fast hard drive (7200 RPM or better) from the operating system of the host machine.

2. If this is being done on a laptop, a second internal drive or external eSATA drive works best, though USB 2.0 (make sure it’s 2.0, 1.1 is too slow) or Firewire is acceptable.

3. For absolute best performance use a second internal SSD drive.

Passwords for all users in the CONTOSO AD are “pass@word1” (remove quotes) (including the Administrator account).

Then the instructions:

a. Start Hyper-V Manager from Control Panel -> Administrative Tools

b. Confirm that the local host machine appears in the Hyper-V Manager list and select it if not already done

c. Under Actions, click Virtual Network Manager…

d. Confirm that you have created an Internal virtual network named “Internal”. Internal networks limit connectivity to only VMs and the host. If a suitable not, create one now using the following steps:

i. Click on Virtual Network Manager in the Actions pane

ii. Choose New virtual network in the Virtual Networks pane

iii. Choose Internal from the type list and click Add

iv. Enter a name of Internal and click OK

v. Start menu -> right-click Network -> Properties

vi. Click Change adapter settings

vii. Find the adapter with a description of Internal, right-click and choose Properties

viii. Double-click on Internet Protocol Version 4 and enter the following values:

1. IP address: 192.168.150.6

2. Subnet mask: 255.255.255.0

3. Default gateway: (leave blank)

4. Preferred DNS server: 192.168.150.1

ix. Click OK

e. Close the Virtual Network Manager dialog.

a. Under Actions, click Import Virtual Machine…

b. Use the Browse button to select the folder where the virtual machine package was extracted. Do not check

c. Click Import and wait for the Import to complete – the import status will appear in the Operations column

d. Select the newly imported virtual machine and click Settings in the right pane of the Hyper-V Manager

e. Confirm (and correct if necessary) that the Network Adapter is connected to the Internal network from step 1d.

f. Close the virtual machine Settings dialog.

Now the “4a” machine amounts to an .exe file and 14 .rar files all but one of which is 700 Mb. So if you’re going to dowload them, give yourself some time.

You’re welcome.

-robot

GreenField Server 2008 R2 x64

I gotta be honest; I outsourced this server build.

What I did was go to the Dell.com clearance rack and found a refurbished PowerEdge 300 with the Quad-Core Xeon 2.8 gHz, 8 gb RAM and two 250 gb hard drives for less than $1000

I got my tech guy to install Server 2008 R2 x64 and Sql Server 2008 x64.  This software cost me $1750 through my local reseller. The install took a week (I was out of town) and I bought dinner him dinner at The Pit in exchange for the effort. You might think that was a deal but he’s actually a family of four and the BBQ there beat Bobby Flay on the Food Network.

Though the T300 is no longer available but you can find similar deals here on Dell.Com’s Deals space.

So let’s just say I got here under my previously stated budget of $3K. I did not get the cool $150 monitor though I wish I had. Continuing with this honesty thing, can we really have enough flat screen monitors? In many respects, I think the flat-screen, more than just about anything else (besides Flash) made geeks cool. If you disagree, think about what dorks we’d look like staring at those big monster, sterilizer CRTs all day.

So I’ve got this machine and it’s hooked to my router at home. I have static IP DSL through AT&T. On Server 2008, you get this “Initial Configuration Tasks” page where you get links to Configure Networking, Add Roles, and Enable Remote Control.

On networking, I added the machine’s local IP addresses, default gateway and DNS servers to the two connections.

The Add Roles link points to the Add Roles Wizard. This will allow you to check the Application Server, File Services, Hyper-V, and Web Server (IIS) roles that we’ll need. Check them and click through the wizard.

The Enable Remote Desktop link points to the Remote tab of the system properties where you can check allow connections… 

On my router, on the Port Forwarding tab, I point port 3389 to one of the IP addresses. Now, I can access my new server from anywhere on the internet.

The only thing I can’t do is connect to shares on other LAN computers. I’m not running a domain so when I get prompted for user name and password, nothing I enter allows me to connect. These other computers are a mix of XP and Server 2000 and connecting from them to this server seems to work just fine. Frustrating but I’m not sure this is a priority.

So with all this in place, let mess it all up. Stay tuned…

-robot

MSF System Requirements

The Microsoft SharePoint Foundation 2010 involves some number of system requirements outlined onTechNet here.

These requirements include 64 bit quad core processors operating at 2.5 Ghz or better and 80 Gb hard drive space.

If you go to Dell.com you can get this box for around $3K including the licenses for Server 2008 x64 and SQL Server (for workgroups) This would give you the basis for a great showcase environment environment. I bet if you worked it harder, you could save about a quarter of that.

Of note, 64 bit OS is not “optional”. Also, I had to query the Intel website to make sure the processers were quad-core. Most of you gearheads probably know which are and are not QCs. I lost track back when I got my 1Ghz PIII PowerEdge 300 server. Also, since RAM and disk space are cheap (compared to the software) I went with 8Gb RAM, 2x250Gb hard drives and a sweet 23″ flat screen monitor for $154 to bring my total to $3109.

I’ve never filled up a hard drive, have you? In fact, I’ve still got 6 Mb left on the 20Mb hard drive on the amber screen DOS computer out in the workshop.

-robot

Well, it's 2010

So we’re looking at the SharePoint 2010 Beta program.

In 2010 terms, WSS is now WSF or “Windows SharePoint Foundation.” Technet is supporting WSF here.

MOSS is now MSS for Microsoft SharePoint Server. There’s a good landing page on TechNet here

Developers will need to start at MSDN here.

Looks like there’s two different flavors of the office server, one for intranets and one for internets.

I guess we’ll look at the internet version first. I’m getting the download here.

-robot