Script fails if it's setup to install Office Web Apps but there aren't any updates in the folder. Checking $sp2010OWAUpdates for null (around line 1295 in 3.96) fixes the issue:
```
if ($xmlinput.Configuration.OfficeWebApps.Install -eq $true)
{
$sp2010OWAUpdates = Get-ChildItem -Path "$bits\$spYear\Updates" -Name -Include wac*.exe -Recurse -ErrorAction SilentlyContinue | Sort-Object -Descending
if($sp2010OWAUpdates)
{
foreach ($sp2010OWAUpdate in $sp2010OWAUpdates)
{
InstallSpecifiedUpdate $sp2010OWAUpdate "Office Web Apps Update"
}
}
}
```
Comments: Resolved with changeset 109744: Changes in this release:
- Much improved support for SharePoint 2010 on Windows Server 2012 R2; deals with PowerShell version issues by launching external PS windows/sessions where required!
- New function Get-MajorVersionNumber does... exactly that. Is now called in many other functions for better support of running individual functions on their own (e.g. creating web apps only)
- Fixed script halting if now Office Web Apps updates were found (issue 20487)
- New function Stop-DefaultWebsite allows this functionality to be executed inline or in a separate window for SP2010 on Win2012 R2 support
- AssignCert function updated to support parameters, again for SP2010 on Win2012 R2 support
- Support for having multiple web apps with Type = "Portal" (for re-using app pools)
- Fixed function AddToHOSTS to prevent duplicate entries
```
if ($xmlinput.Configuration.OfficeWebApps.Install -eq $true)
{
$sp2010OWAUpdates = Get-ChildItem -Path "$bits\$spYear\Updates" -Name -Include wac*.exe -Recurse -ErrorAction SilentlyContinue | Sort-Object -Descending
if($sp2010OWAUpdates)
{
foreach ($sp2010OWAUpdate in $sp2010OWAUpdates)
{
InstallSpecifiedUpdate $sp2010OWAUpdate "Office Web Apps Update"
}
}
}
```
Comments: Resolved with changeset 109744: Changes in this release:
- Much improved support for SharePoint 2010 on Windows Server 2012 R2; deals with PowerShell version issues by launching external PS windows/sessions where required!
- New function Get-MajorVersionNumber does... exactly that. Is now called in many other functions for better support of running individual functions on their own (e.g. creating web apps only)
- Fixed script halting if now Office Web Apps updates were found (issue 20487)
- New function Stop-DefaultWebsite allows this functionality to be executed inline or in a separate window for SP2010 on Win2012 R2 support
- AssignCert function updated to support parameters, again for SP2010 on Win2012 R2 support
- Support for having multiple web apps with Type = "Portal" (for re-using app pools)
- Fixed function AddToHOSTS to prevent duplicate entries