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

Commented Issue: Function Get-SharePointInstall fails for Foundation [22165]

$
0
0
An issue found when repeating installer script with Foundation binaries already in place, the installer fails to detect the product installed and falls over after invoking setup again. Turns out the Get-SharePointInstall function is specifically looking for the Server class name:

Function Get-SharePointInstall
{
if (Get-Command Get-CimInstance -ErrorAction SilentlyContinue)
{
# New way, borrowed from xSharePoint DSC project (https://github.com/PowerShell/xSharePoint)
if (Get-CimInstance -ClassName Win32_Product -Filter "Name like 'Microsoft SharePoint Server%'")
...

Probably needs to have an additional check for Foundation, if the detection needs to avoid false positives from SP Designer etc.
Comments: ** Comment from web user: Emblematic **

Oops - old method! Results are much the same though:
```
PS C:\> $val= Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -like "Microsoft SharePoint*"}
PS C:\> $val.DisplayName
Microsoft SharePoint Foundation 2013
Microsoft SharePoint Foundation 2013 Core
Microsoft SharePoint Foundation 2013 1033 Lang Pack
Microsoft SharePoint Foundation 2013
Microsoft SharePoint Foundation 2013 1033 SQL Express

PS C:\> $val= Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -like "Microsoft SharePoint*"}
PS C:\> $val.DisplayName
Microsoft SharePoint Foundation 2010
Microsoft SharePoint Foundation 2010 Core
Microsoft SharePoint Foundation 2010 1033 Lang Pack
Microsoft SharePoint Foundation 2010
```


Viewing all articles
Browse latest Browse all 2279

Trending Articles



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