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

December 2010

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

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲