Tag Archives: SharePoint 2010

Disable Mobile View per Web Application (Android, iPhone)

Thanks to Koen Zoomers for finding this one …

http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/d1e58832-391b-42ba-a21b-6ef40d1c9acb

 
   
  isMobileDevice=false 

Open the “web.config” file for the Web Application you want to modify and insert the above code just before </system.web>.   Note:  This will disable for that one Web Application only.  For a more global solution take a look at the “compat.browser” file and instructions at http://www.avtex.com/blog/2010/06/28/disable-mobility-features-for-sharepoint-2010/

Why you should delete Autorun.ico/inf

Recently I’ve worked with http://autospinstaller.codeplex.com/ more from the Command Prompt and PowerShell consoles.   I’ve been annoyed by something minor and it’s not @brianlala ‘s fault either.   The ISO comes with “autorun” files which are useless after I flatten the CD to a folder.   To add insult to injury they confuse autocomplete so typing “auto” and pressing tab requires me to jump past two local files before I get the awesomeness of the AutoSPInstaller subfolder.  Bah.

 

So I recommend you delete Autorun.ico and Autorun.inf.   You don’t need them anymore.  This isn’t a real CD … and they just get in the way.  Hot

 

image

image

image

Server Farm Product and Patch Status

Today I attempted to join a SQL Reporting Servers machine to an existing farm and saw the below error.  While self explanatory, I wanted to document it for others that haven’t seen this.  WSS 3.0 and MOSS 2007 were more lenient allowing a mix between the two product SKUs.  The below screen is new to 2010 and acts as a bouncer to enforce server farm consistency.  It appears to check three categories:

  • Product SKU  (Server / Foundation)
  • Patch (version number)
  • Language pack(s)

So what I’ll do next is install the full SharePoint Server product (with Dec 2010 CU slipstream on the Updates subfolder) and then try to join Config DB once again.  Smile

image

Error: Some farm products and patches were not detected on this or other servers.  If products or patches are missing locally, you must quit this program and install the required products and patches on this server before restarting this wizard. If products or patches are missing on other servers, you must install the required products and patches on the specific servers, and you may then click the Refresh button to perform the status check again.

NOTE –  You may need to run the command “Get-SPProduct -local” on each machine after applying the EXE/MSP updates for it to detect correctly in the SP Config Wizard.  

Central Admin – Top Nav shortcuts

While clicking aimlessly around Central Admin today I thought “there must be a better way”.  For all of the fancy new bells and whistles SharePoint 2010 offers, it sure did make CA navigation a bit cumbersome.   Most tasks are 4 clicks away and I’m sorry but I’m just too lazy for that.

I tried editing the left Quick Launch, no luck.   However, Top Navigation is wide open.   The beautiful thing here is how it follows you anywhere in the site.  From any CA page, you can see those Top Nav items staring right back at you.

  • Open “Site Actions Site Settings Top link bar
  • Click “New Navigation Link
  • My favorite is to add “Manage Service Applications” to “/_admin/ServiceApplications.aspx” because so much time is spent here.   Open-mouthed

image

Also, Rez Khamis wrote http://sp2010resourcelinks.codeplex.com/ to help people populate the CA homepage “Resource Links” and is incredibly helpful.   If you haven’t tried it then go download a copy.  While you have to navigate through the CA homepage, it’s still much better than what the product offers out of the box.

Error: Cannot connect to PerformancePoint Services (FIXED)

I saw this today and was completely confused because I had literally just finished creating the Service Application in PowerShell and knew it was successful.   The root cause was a missing Service Connection.  Creating the SA was only the first step, I also need to associate it to the default proxy groupFiddler was handy here to quickly isolate the error.   I actually wrote PowerShell code that that but seem to have lost it during a VM snapshot restore, urg.

Cannot connect to PerformancePoint Services. Contact the administrator for more details.

Other possible causes:

  • Central Admin > Missing a Performance Point Service Application?  Make sure you have one.
  • Site Collection Feature > PerformancePoint Services needs to be active.   I use the Business Intelligence Center template to make this easier.
  • TCP/HTTP.  Don’t forget basic connectivity.  If you are using multiple servers make sure you can reach the remote host, use Fiddler to watch the connection attempt

 

image

 

image

image

Error: Cannot connect o PerformancePoint Services (FIXED)

I saw this today and was completely confused because I had literally just finished creating the Service Application in PowerShell and knew it was successful.   The root cause was a missing Service Connection.  Creating the SA was only the first step, I also need to associate it to the default proxy groupFiddler was handy here to quickly isolate the error.   I actually wrote PowerShell code that that but seem to have lost it during a VM snapshot restore, urg.

Cannot connect to PerformancePoint Services. Contact the administrator for more details.

Other possible causes:

  • Central Admin > Missing a Performance Point Service Application?  Make sure you have one.
  • Site Collection Feature > PerformancePoint Services needs to be active.   I use the Business Intelligence Center template to make this easier.
  • TCP/HTTP.  Don’t forget basic connectivity.  If you are using multiple servers make sure you can reach the remote host, use Fiddler to watch the connection attempt

 

image

 

image

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

Note Board–Comment on external sites

While reviewing the new social features I noticed this interesting hyperlink on the “My Profile” page.   It allows users to bookmark a special link which they can use to extend “I like It” and “Tags & Notes” features beyond SharePoint to comment on external websites.

I was curious to look under the hood and understand how this could be done technically.

A complete JavaScript function is added to your bookmark in the URL field and executes when clicked.   The browser context holds the external site’s detail and is passed to SharePoint as GET parameter in the URL.   There is a safety check for SharePoint sites.   If the dialog function exists (CORE.JS) then we can assume we are on a SharePoint page and display the dialog instead of a full page.

The special character escaping is very clever and gives us a single line of text which JavaScript can execute.

 

image

image

ORIGINAL

javascript:var%20d=document,l=d.location,e=encodeURIComponent,du='http:u002fu002fsp2010:8080u002f_layoutsu002fSocialDataFrame.aspx',u=du+'?Title='+e(d.title)+'&Src=bm'+'&DisplayUrl='+e(l.href)+'&Url='+e(l.href); if (typeof(OpenTagDialog)=='function') {    OpenTagDialog(du);}else{    if(!window.open(u,null,'toolbar=0,status=0,resizable=0,scrollbars=1,width=650,height=400')) {        l.href=u;    }}void(0);

SPACED FOR EASY READING

javascript:
var%20d=document,
l=d.location,
e=encodeURIComponent,
du='http:u002fu002fsp2010:8080u002f_layoutsu002fSocialDataFrame.aspx',
u=du+'?Title='+
e(d.title)+
'&Src=bm'+
'&DisplayUrl='+
e(l.href)+
'&Url='+
e(l.href);
 
if (typeof(OpenTagDialog)=='function') {
    OpenTagDialog(du);
}
else
{
    if(!window.open(u,null,'toolbar=0,status=0,resizable=0,scrollbars=1,width=650,height=400')) {
        l.href=u;
    }
}
void(0);

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

Return to Top ▲Return to Top ▲