Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

Blog

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

 

 

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

PerformancePoint Services – Error 5 – Unattended Service Account required

Today I came across the below error and how to fix it.

  1. Open “Central Admin Manage Service Applications Performance Point”
  2. Open “PerformancePoint Service Application Settings”
  3. Below “Secure Store and Unattended Service Account” specify a user name and password for PPS to use for opening data sources.
  4. Click OK.   Close the Dashboard Designer application and come back in clean.   It should work just fine now. 
    Hot

 

Log Name:      Application
Source:        Microsoft-SharePoint Products-PerformancePoint Service
Event ID:      5
Task Category: PerformancePoint Services
Level:         Error
Description:
PerformancePoint Services has not been configured with a valid Unattended Service Account. The setting is located in "Manage service applications" in SharePoint Central Administration under the PerformancePoint Services management page.

image

image

 

 

image

image

 

image

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲