Quantcast
Channel: AutoSPInstaller
Viewing all articles
Browse latest Browse all 2279

Commented Unassigned: Script fails is no updates for Office Web Apps 2010 are found [20487]

$
0
0
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: ** Comment from web user: O_Martin **

This seems to be an issue with the PowerShell version. Tested with 3.96 and SharePoint 2010 installation on Windows Server 2008 R2 with Windows Management Engine 3.0 (KB2506143) installed.

foreach ($sp2010OWAUpdate in $sp2010OWAUpdates)
{
InstallSpecifiedUpdate $sp2010OWAUpdate "Office Web Apps Update"
}

PowerShell 2.0:
-> It will run through the foreach once also if $sp2010OWAUpdates is $null and therefore it will fail because of $null.

PowerShell 3.0:
-> It will NOT run through the the foreach if $sp2010OWAUpdates is $null and therefore no error.


Viewing all articles
Browse latest Browse all 2279

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>