Tag Archives: Administration

Central Admin – one page with every icon

Solution:   One ASPX page which shows all Central Admins functions.

Background:  I was frustrated with clicking through the 8 different ASPX pages CA offers … or my lack of memory on where to find things.  For example, if you want “Timer Jobs” you need to first know to look under “Monitoring”.   That’s fine and it does make for an overall clean display.   However, I wanted to try something more streamlined for my DEV virtual machine.

  • Explore 14TEMPLATESiteTemplatesCENTRALADMIN
  • Copy “generalapplicationsettings.aspx” to “generalapplicationsettings.BAK”
  • Edit “generalapplicationsettings.aspx”  and insert the below content.
  • Open Central Admin with IE and click “General Application Settings”
  • You should now see a single page with every function.   From here “Ctrl+F” works great to quickly jump to functions.  No more clicking around guessing.  Just scroll the mouse wheel and you’re there.  Smile

TXT16 generalapplicationsettings.aspx

 

image

How To: FREE internal SharePoint email (IMAP/POP/SMTP) inbound and outbound

If you haven’t seen http://www.hmailserver.com/ please go download a copy .  To fully demo SharePoint inbound and outbound email features on a local virtual machine I needed something simple.   Without any network dependency, I am able to send and receive emails between SharePoint and users.  Below are the steps I followed to create my single server SharePoint 2010 DEV environment.  I haven’t seen any other blog post on this important topic so hope someone finds this helpful.

Here is the final topology:

image

  1. Install SharePoint (2010 or 2007, works great on both)   I recommend Brian’s http://autospinstaller.codeplex.com/ script with Todd’s CU patch slipstream for a reliable build.  I run the Dec 2010 CU patch level.
  2. Install SMTP from Windows Server Manager   (details here)   Configure on TCP port 26 with FQDN as the host header (i.e.  “sp2010.demo.com”)
    • image
    • image
    • image
  3. Install and configure hMailServer.   This is most of the work and screenshots below show the various options I changed.
    • Configure with MSSQL storage and point to the SQL instance SharePoint uses during first install.  Don’t slow the machine with an extra SQL express instance.
    • Disable POP3.   Invented for dial-in, we can do better with IMAP.
    • image
    • Create user accounts.  I have admin@demo.com here.   I did not use Windows Authentication, but just typed in the password manually.   I realize this creates a duplicate password record to update, but it seemed more reliable during IMAP connections.  I had trouble using Windows only.  This more direct (non-Windows) authentication will login with the full email address as the user name (admin@demo.com) and has no dependency on any Active Directory user object.
    • image
    • Disable AutoBan.   During failed logins this could lock the user account, excessive for DEV.
    • image
    • Set “127.0.0.1” on the TCP listener for IMAP (143) and SMTP (25).    We reserved port 26 for the IIS SMTP that hits a drop folder for SharePoint’s timer job.   Here we will use the standard port because SharePoint Central Admin’s outbound email settings page only uses port 25 and only support a hostname configuration.
    • image
    • Enable mail relay.  This will allow FQDN (i.e. sp2010.demo.com) messages to reach the IIS SMTP drop folder and SharePoint.
    • image
    • Add MX record for both domain (i.e.  “demo.com”) and FQDN (i.e. “sp2010.demo.com”).   MX records help SMTP and mail clients route correctly.
    • image
    • Run Diagnostics.   If done correctly everything shows green.
    • image
  4. Configure SharePoint email
  5. Configure mail client (Windows Live Mail)
    • Pretty easy but the trick is to get the IMAP/SMTP server name and port numbers typed correctly.   Save the password.
    • image
    • image
    • image
    • image
  6. Test scenarios 
    • Send to SharePoint library.   Configure a library to receive email, make note of the address.   Send a test message with attachments.   Wait up to 5 minutes, you should see new content in SharePoint now.
    • Receive SharePoint alert.   Subscribe to an alert.  You should see a welcome message.  Trigger the alert by uploading content.   You should see a single notification.
    • User to user.   Make a second user and send a message from that person.   You probably need to Log Out between sessions, but it proves the internal hMail user mail routing works.
  7. Enjoy and grab a cold beer!

So there you have it.   I’ve tried many techniques (2nd VM, Exchange, SMTP only) and this is the best combination I’ve found yet.  It allows fully inbound and outbound for SharePoint along with peer-to-peer email amongst users.  It also works great on SharePoint 2007.   This robust functionality allows me to demo anything SharePoint can offer with the confidence it will work flawlessly.  If you have any questions or comments please feel free to leave them below.  I always enjoy hearing from people.  Hot

Post-install scripting fun

Recently I’ve tested http://autospinstaller.codeplex.com/ from @brianlala to build new SharePoint farms.  It’s a wonderful script and a great way to learn SharePoint cmdlets with real examples.

A few more script ideas:

  • More service apps   (Access, Word, Excel, Visio, BCS, PPS)
  • Third party  (WSP, MSI, CAB, REG)

So I wrote a small script to run after Brian’s and setup these small things.   Caution:  my scripting skills are limited and the Third Party will always run (no detect if installed ) so you may not want to run this repeatedly.  Disclaimer aside, I think it’s pretty cool.  I plan to use this and thought others might find it helpful too.   I will update this blog post as needed and cross link to CodePlex.  Please leave a comment with feedback!   Smile

 


Download Now:

Post script by SPJeff.ps1

 

image

 

image

image

image

 

 

Write-Host -ForegroundColor White "Verifying Enterprise Edition service applications"
$hosted = Get-SPServiceApplicationPool "SharePoint Hosted Services"
If((Get-SPServiceApplication | ? {$_.GetType().ToString() -eq "Microsoft.Office.Access.Server.MossHost.AccessServerWebServiceApplication"}) -eq $null)
{
	Write-Host -ForegroundColor White " - Creating Access Service:"
	New-SPAccessServiceApplication -Name "Access SA" -ApplicationPool $hosted
	Write-Host -ForegroundColor Blue "   Complete"
} else {
	Write-Host -ForegroundColor White " - Already installed: Access Service"
}
If((Get-SPServiceApplication | ? {$_.GetType().ToString() -eq "Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplication"}) -eq $null)
{
	Write-Host -ForegroundColor White " - Creating Business Data Connectivity Service:"
	New-SPBusinessDataCatalogServiceApplication -Name "Business Data Connectivity SA" -ApplicationPool $hosted
	Write-Host -ForegroundColor Blue "   Complete"
} else {
	Write-Host -ForegroundColor White " - Already installed: Business Data Connectivity Service"
}
If((Get-SPServiceApplication | ? {$_.GetType().ToString() -eq "Microsoft.Office.Excel.Server.MossHost.ExcelServerWebServiceApplication"}) -eq $null)
{
	Write-Host -ForegroundColor White " - Creating Excel Service:"
	New-SPExcelServiceApplication -Name "Excel SA" -ApplicationPool $hosted
	Write-Host -ForegroundColor Blue "   Complete"
} else {
	Write-Host -ForegroundColor White " - Already installed: Excel Service"
}
If((Get-SPServiceApplication | ? {$_.GetType().ToString() -eq "Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplication"}) -eq $null)
{
	Write-Host -ForegroundColor White " - Creating Performance Point Service:"
	New-SPPerformancePointServiceApplication -Name "PerformancePoint SA" -ApplicationPool $hosted
	New-SPPerformancePointServiceApplicationProxy -Name "PerformancePoint SA Proxy" -ServiceApplication "PerformancePoint SA"
	Write-Host -ForegroundColor Blue "   Complete"
} else {
	Write-Host -ForegroundColor White " - Already installed: PerformancePoint Service"
}
If((Get-SPServiceApplication | ? {$_.GetType().ToString() -eq "Microsoft.Office.Visio.Server.Administration.VisioGraphicsServiceApplication"}) -eq $null)
{
	Write-Host -ForegroundColor White " - Creating Visio Service:"
	New-SPVisioServiceApplication -Name "Visio SA" -ApplicationPool $hosted
	New-SPVisioServiceApplicationProxy -Name "Visio SA Proxy" -ServiceApplication "Visio SA"
	Write-Host -ForegroundColor Blue "   Complete"
} else {
	Write-Host -ForegroundColor White " - Already installed: Visio Service"
}
If((Get-SPServiceApplication | ? {$_.GetType().ToString() -eq "Microsoft.Office.Word.Server.Service.WordServiceApplication"}) -eq $null)
{
	Write-Host -ForegroundColor White " - Creating Word Service:"
	New-SPWordConversionServiceApplication -Name "Word SA" -ApplicationPool $hosted
	Write-Host -ForegroundColor Blue "   Complete"
} else {
	Write-Host -ForegroundColor White " - Already installed: Word Service"
}
Write-Host -ForegroundColor White "Verifying .REG extras"
foreach ($reg in Get-Childitem "REG" -include *.REG -recurse)
{
	Write-Host -ForegroundColor White " - Loading "$reg
	Start-Process -Wait -NoNewWindow -FilePath regedit.exe -ArgumentList "/s `"$reg`""
}
Write-Host -ForegroundColor White "Verifying .MSI extras"
foreach ($msi in Get-Childitem "MSI" -include *.MSI -recurse)
{
	Write-Host -ForegroundColor White " - Loading "$msi
	Start-Process -Wait -NoNewWindow -FilePath msiexec.exe -ArgumentList "/i `"$msi`" /qb"
}
Write-Host -ForegroundColor White "Verifying .CAB extras"
foreach ($cab in Get-Childitem "CAB" -include *.CAB -recurse)
{
	Write-Host -ForegroundColor White " - Loading "$cab
	Start-Process -Wait -NoNewWindow -FilePath stsadm.exe -ArgumentList "-o addwppack -filename `"$cab`""
}
Write-Host -ForegroundColor White "Verifying .WSP extras"
foreach ($wsp in Get-Childitem "WSP" -include *.WSP -recurse)
{
	Write-Host -ForegroundColor White " - Loading "$wsp
	Start-Process -Wait -NoNewWindow -FilePath stsadm.exe -ArgumentList "-o addsolution -filename `"$wsp`""
}

Why autospinstaller rocks

I found http://autospinstaller.codeplex.com/on CodePlex and was instantly hooked.  The PowerShell + XML design is compelling and modern.  I’m still learning SP2010’s various cmdlets so it’s great to see their usage and learn by example.    This puppy is just amazing considering how much work it takes off our shoulders and the countless hours of time it can save.  

Hats off to Brian Lalancette (@brianlala) for his hard work to give the community this great tool.   Thank you!

 

Benefits

  • Speed.   Install is never the finish line so get past it quickly.  Your time is valuable and limited.  Use it wisely.
  • Consistency.   An environment lifecycle is only as good as the builder.   Have confidence that all environments have Service Apps that actually work.  There’s a reason why assembly lines became so popular.
  • Focus.   Spend less time doing repetitive install work and more face time with customers.  Teach them how to use it and show tangible business value.

Observations

  • Slipstream is THE way to go.   I grabbed the Office KB 2394320 and Foundation KB 2394323 October 2010 CU patches and extracted to Updates.   Read more about how to extract on Todd Klindt’s blog.
  • Avoid mapped drive letters, UNC is best.   I wasted time here trying to figure out the obvious.   I ran the whole install from a network UNC (cool), but I had the idea of mapping a network drive letter first (stupid).   Anyway, DON’T DO THAT.   You’ll get a nasty red error like below.  Why?  The PowerShell timer job runs in a different context as a different user who doesn’t have that fancy drive letter.   K.I.S.S. principle.   Find the Command icon, right click, Run as Administrator … type full UNC ( vboxsvrsp2010isoAutoSPInstallerlaunch.bat )  … and press enter.
  • Custom extensions might be needed.   Every organization has their own flavor.  I might code deployment of WSP, REG, and MSI files.   Each will go in a subfolder (“WSP”) and then PowerShell foreach {} file run deployment.   I’ll probably blog whatever I come up with.   As always, it would be a wrapper to run after the original author’s work to maintain safe execution and clean coding habits.   Warning:  I’m a duct tape developer so my work isn’t all that pretty, but generally gets the job done.
  • Backup SetInputs.xml   While editing I had a few typos so it may be a good idea to keep backup copies of this central config file.
  • Add Service Apps.   This installer does more than it should, but that doesn’t mean we get to be 100% lazy.   You’ll still want to create Service Apps for stuff like Access, Word, and Visio to give your users.

 

What are you waiting for?   Go download http://autospinstaller.codeplex.com/ now.   And leave a review if you like it.  Hot

 

image

 

image

Receive-Job : [localhost] There is an error launching the background process. Error reported: The directory name is invalid. At Z:AutoSPInstallerAutoSPInstaller.ps1:1088 char:15 + Receive-Job <<<<  -Name CreateProfileServiceAppJob -Verbose + CategoryInfo  : OpenError: (:) [Receive-Job], PSRemotingTranspor tException + FullyQualifiedErrorId : PSSessionStateBroken
– Creating User Profile SA Proxy…

New-SPProfileServiceApplicationProxy : Cannot validate argument on parameter ‘ServiceApplication’. The argument is null. Supply a non-null argument and try the command again. At Z:AutoSPInstallerAutoSPInstaller.ps1:1097 char:134 + $ProfileServiceAppProxy  = New-SPProfileServiceApplicationProxy -Name "$UserProfileServiceName Proxy" -ServiceApplication <<<<  $ProfileServiceApp -DefaultProxyGroup + CategoryInfo: InvalidData: (:) [New-SPProfileServiceApplicationProxy], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Office.Server.UserProfiles.PowerShell.SPCmdletNewProfileServiceApplicationProxy

I

Let’s get right down to it.  Oracle’s VirtualBox (http://www.virtualbox.org/) application is:

  • Free – Zero cost.  What are you waiting for?  Go download it!
  • Fast – Low performance overhead.  New VT and Nested Paging support take it to the next level.
  • Flexible – Runs on any modern processor.  Support both VHD and VDI disk images.  ISO or physical CD for media.
  • Fun– Support for many powerful features.  Saved state (no IIS cache waiting), host integrated clipboard, default NAT (network address translation) make this a breeze to get started with.   No coding or special tricks required.  It just works.

But don’t just take my word for it.  Eric Harlan thinks it’s cool.   And so does Jeremy Thake.  Of course VM Ware Workstation is a good option and others will work but for the free price VirtualBox is hard to beat.   It’s just plain easy to learn.   Most of my tech friends want to run a SharePoint 2010 DEV server on their personal Windows 7 64-bit laptop as a personal lab to learn with.   I have yet to find a better tool for this.

1 – Create VHD with Windows 7’s Computer Manager

  • Start Run compmgmt.msc
  • Right click “Disk Management” and click “Create VHD”
  • I personally like Dynamic Disks for the extra storage flexibility.  Yes, there is a small performance hit when it expands.
  • Right click “Initialize” on the new disk
  • Right click “New Volume” on the online disk
  • NTFS quick format with a volume name that matches the VHD file.
  • Detach the VHD file
  • Cogratulations!   You’ve creative a Microsoft native format VHD that can be easily managed by many tools.

2 – Create VirtualBox Guest with VHD file and RAM allocation

  • Open Oracle VirtualBox
  • Click “New” to start
  • Select the O/S type for the guest.  Note: this is important for integration (clipboard, file share, network) so please read all choices.  Windows Server 2008 R2 is the “Windows 7” kernel type and typically what I run.
  • Give it as much RAM as possible (max out the green line).  Open-mouthed
  • When asked for hard drive click “Use existing” and browse for the VHD file.  You’ll need to register the VHD path in the Media Manager.
  • Finish and check the advanced settings.   I suggest a few changes beyond the default :
    • Enable PAE
    • Enable VT
    • Enable nested paging
    • Set CPU to 2 (or more if you can)
    • Enable 2D video acceleration
    • Increase video RAM to 50% of host.   I use 64MB of the host 128 MB.
  • Now you’re ready to boot install media.
  • Under “Storage” browse for a local .ISO on the host to mount on the virtual CD drive.   When finished click “Start” and you’re all set.

 

image

image

image

image

image

image 

image

image

image

image

image

image

image 

image

Don’t Delay – PreUpgradeCheck Today!

More than 2010 upgrade readiness, this tool is a one stop 2007 best practices analyzer.   Most 2007 farms have dozens of small customizations.  Get started today because it will require time to take inventory and review the output.   The results help build a deep awareness of your system configs.  This command is read-only and safe to run in production any time, even during the work day.

So go ahead, RDP over and run “STSADM –O PREUPGRADECHECK” now!

http://bobfox.securespsite.com/foxblog/Lists/Posts/Attachments/120/PreupgradeCheck_2_3BF5F7FD.png

Profile Import Details: Forefront MIISCLIENT.EXE

Profiles sure have changed with SharePoint 2010! Smile 

We now have a User Profile Service Application and 2 Windows services as well as the Forefront Identity product.  It gets a bit confusing so I wanted to write a post with my observations in case it helps anyone else out there Googl-ing for answers.

Opening MIISCLIENT.EXE while sync is actively running has been very educational and helpful for me in troubleshooting.   Consider it an eventlog for just the profile service.   Below you can see my full import creating 141 new records in the database.   I used this to confirm the service health as well as get familiar with the FULL and DELTA operations it runs that map to the Full and Incremental we see in Central Administration.

Oh, and there are 3 SQL databases now!    [Sync DB], [Social DB], and [Profile DB] are all required.   Look at Harbar.net’s incredible Architecture Overview Diagram to learn more about the topology.    It’s tedious to get everything configured and connected but once online the new social features are incredibly useful.

Helpful References

Forefront File Stuff

  • C:Program FilesMicrosoft Office Servers14.0Synchronization ServiceUIShellmiisclient.exe
  • C:Program FilesMicrosoft Office Servers14.0ServiceMicrosoft.ResourceManagement.Service.exe
  • C:Program FilesMicrosoft Office Servers14.0Synchronization ServiceBinmiiserver.exe

image

image

image

image

image

The Unattended Service Account Application ID is not specified or has an invalid value.

This error showed up on the Monitoring > Health Analyzer of my SharePoint 2010 VM.   Apparently after using the wizard to create a new farm, you must double back to supply Visio Services with user credentials for remote data connections.

http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010general/thread/559f72a4-d9ca-4004-b5ca-a0fa6dbad51f was a helpful reference on the steps and below are screenshots.

Steps Taken:

  1. Open Health Analyzer and view details
  2. Manage the Visio Graphics Service (SA) and confirm Application ID is empty.
  3. Manage the Secure Store Service (SA) and Generate New Key
  4. Create a New Target Application
  5. Provide a unique ID, name, and contact email. Select Group Type.
  6. Accept default and just click Next
  7. Provide a user name for both fields.  I used “DEMOAdmin” as that is the only user on this machine. Click OK.
  8. Enter the Target Application ID back on the Visio Graphics Service (SA) page and click OK.
  9. Go to the Health Analyzer rule, open it and click Reanalyze Now, then you should be ready to go.  Open-mouthed

 

image

image

image

image

image

image

image

image

image

Patching SharePoint 2010 (14.0.5114.5000)

Today I am updating my virtual machine with the 5 patches I found available at http://technet.microsoft.com/en-us/sharepoint/ff800847.aspx.   7 are listed, 1 was Japanese, and for 1 was not apparent how to download.   So I ended up with 5 I could apply.   When all was finished I went from product version 14.0.4762.1000 up to 14.0.5114.5000 hoping I will see improved performance and fewer bugs.  Hot  Overall this felt identical to the MOSS 2007 patching process, however there is now a percent complete given on step 9 of 10.   Subtle but helpful.

Steps Taken:

  • Download all EXE to C:SP2010 Hotfixes
  • Run SPF (KB 2028568) first
  • Reboot and Run SP config wizard
  • Run Office (KB 2204024)
  • Run SP config wizard
  • Run Office (KB 2124512)
  • Run SP config wizard
  • Run Office (KB 2281364)
  • Run SP config wizard
  • Run Office (KB 983497)
  • Run SP config wizard

Files Downloaded:

  • office-kb2124512-fullfile-x64-glb.exe
  • office-kb2204024-fullfile-x64-glb.exe
  • office-kb2281364-fullfile-x64-glb.exe
  • office-kb983497-fullfile-x64-glb.exe
  • spf-kb2028568-fullfile-x64-glb.exe

image

image

STSADM CMD with email output

Waiting and watching STSADM run on the CMD line is an exercise in patience.  Lately I’ve been incorporating two techniques to email myself updates for the freedom to walk away from the keyboard.

A quick command line EXE project allows me to send email by giving parameters (number 0-5).   If 5 is blank, no big deal just send a plain email with subject and body.   If 5 exists then attempt to open that text file, read content, and send as email body.

That’s great, but … how does this help me?  Great question!!

1) Send email at key script milestones

The freedom to walk away and receive alerts as progress continues allows you to be stay confident and know progress is moving forward.  Just add “SendMail.exe” inline with your existing CMD files to send an email at that step in the process.

 

2) Send email with script outcome

The detailed knowledge of what return value came from the CMD when it finished is helpful.   Imagine running a site move (STSADM backup/delete/restore) and heading out for dinner.   It’s very nice to get an email showing “Operation completed successfully” three times.  Smile   Just use “SendMail.exe” with parameter 5 being the text file full path and name.

image

image 

using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Mail;
using System.IO;
 
namespace SendMail
{
    class Program
    {
	static void Main(string[] args)
	{
		//0-from
		//1-to
		//2-subject
		//3-body
		//4-server
		//5-filename
		string textFile = "";
		if (!String.IsNullOrEmpty(args[5]))
		{
			//send text file as body
			TextReader tr = new StreamReader(args[5]);
			textFile = tr.ReadToEnd();
			tr.Close();
		}
		//create message
		Console.WriteLine("from {0} to {1} subject {2} body {3} on server {4}", args[0], args[1], args[2], args[3], args[4]);
		MailMessage message = new MailMessage(args[0], args[1], args[2], args[3]);
		//if file was given modify body
		if (textFile != "") message = new MailMessage(args[0], args[1], args[2], textFile);
		SmtpClient emailClient = new SmtpClient(args[4]);
		emailClient.Send(message);
		}
    }
}
Return to Top ▲Return to Top ▲