Skip to content

# SKU - SharePoint or Project? - always true $sku = "PROJ" if language pack installed #16

Description

@nikhilshankarsingh

`I have the language pack installed on a farm so production selection fail on
$sppl = (Get-SPProduct -Local) |? {$.ProductName -like "Microsoft Project Server"}; i have replaced code with following $sppl = (Get-SPProduct -Local) |? {$.ProductName -like "Project*"}

Updated code:
`# SKU - SharePoint or Project?
$sku = "SP"
$ver = "15"
if ($downloadVersion) {
$ver = $downloadVersion
}
if (Get-Command Get-SPFarm -ErrorAction SilentlyContinue) {
# Local farm
$farm = Get-SPFarm -ErrorAction SilentlyContinue
if ($farm) {
$ver = $farm.BuildVersion.Major
#$sppl = (Get-SPProduct -Local) |? {$_.ProductName -like "Microsoft Project Server"}
$sppl = (Get-SPProduct -Local) |? {$_.ProductName -like "Project*"}
if ($sppl) {
if ($ver -ne 16) {
$sku = "PROJ"
}
}
}
else {
# Detect binary folder - fallback if not joined to farm
$detect16 = Get-ChildItem "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16"
if ($detect16) {
$ver = "16"
}
}
}``

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions