Skip to content

Commit

Permalink
Merge pull request #1301 from ykuijs/bugfix
Browse files Browse the repository at this point in the history
Bugfix
  • Loading branch information
ykuijs authored Apr 1, 2021
2 parents e3f7150 + aed1066 commit b09394c
Show file tree
Hide file tree
Showing 54 changed files with 1,509 additions and 1,240 deletions.
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- SPAccessServiceApp, SPAccessServices2010, SPAppManagementServiceApp, SPBCSServiceApp,
SPExcelServiceApp, SPMachineTranslationServiceApp, SPManagedMetadataServiceApp,
SPPerformancePointServiceApp, SPPowerPointAutomationServiceApp, SPProjectServerServiceApp,
SPPublishServiceApplication, SPSearchCrawlRule, SPSearchFileType, SPSearchServiceApp,
SPSecureStoreServiceApp, SPServiceAppSecurity, SPSubscriptionSettingsServiceApp,
SPUsageApplication, SPUserProfileProperty, SPUserProfileSection, SPUserProfileServiceApp,
SPUserProfileSyncConnection, SPUserProfileSyncService, SPVisioServiceApp,
SPWordAutomationServiceApp, SPWorkManagementServiceApp
- Fixed issue with the Name parameter of Get-SPServiceApplication, which is case
sensitive
- SPExcelServiceApp
- Fixed issue where PSBoundParameters was used multiple times, but manipulated at an early
stage, breaking all subsequent usages
- SPInstallLanguagePack
- Fixes issue in the Norwegian Language Pack detection
- Fixed issue in the Norwegian Language Pack detection
- SPSearchManagedProperty
- Fixed issue where setting Searchable=True resulted in an error
- SPSearchResultSource
- Clarified the use of ScopeName and ScopeUrl with SSA as ScopeName and added examples
- SPUserProfileServiceApp
- Fixed issue where MySiteHostLocation was return from Get method including port number,
which causes the Test method to fail
- SPWebAppAuthentication
- Fix issue in Get method to return Null when zone does not exist. That way the Test and
Set method can detect a non-existent zone and throw a proper error.
- SPWordAutomation
- Fixed issue where the resource never went into desired state when using AddToDefault

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ function Get-TargetResource
-ScriptBlock {
$params = $args[0]

$serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue
$serviceApps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}
$nullReturn = @{
Name = $params.Name
ApplicationPool = $params.ApplicationPool
Expand Down Expand Up @@ -128,8 +130,9 @@ function Set-TargetResource

$params = $args[0]

$app = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.Office.Access.Services.MossHost.AccessServicesWebServiceApplication"
$app = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq "Microsoft.Office.Access.Services.MossHost.AccessServicesWebServiceApplication"
}

$proxies = Get-SPServiceApplicationProxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ function Get-TargetResource
-Arguments $PSBoundParameters `
-ScriptBlock {
$params = $args[0]
$serviceApps = Get-SPServiceApplication -Name $params.Name `
-ErrorAction SilentlyContinue
$serviceApps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}

$nullReturn = @{
Name = $params.Name
ApplicationPool = $params.ApplicationPool
Expand Down Expand Up @@ -107,8 +109,10 @@ function Set-TargetResource
-Arguments $PSBoundParameters `
-ScriptBlock {
$params = $args[0]
$apps = Get-SPServiceApplication -Name $params.Name `
-ErrorAction SilentlyContinue
$apps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}

if ($null -ne $apps)
{
$app = $apps | Where-Object -FilterScript {
Expand Down Expand Up @@ -138,8 +142,10 @@ function Set-TargetResource
-ScriptBlock {
$params = $args[0]

$apps = Get-SPServiceApplication -Name $params.Name `
-ErrorAction SilentlyContinue
$apps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}

if ($null -eq $apps)
{
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ function Get-TargetResource
-ScriptBlock {
$params = $args[0]

$serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue
$serviceApps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}

$nullReturn = @{
Name = $params.Name
ApplicationPool = $params.ApplicationPool
Expand Down Expand Up @@ -209,8 +212,9 @@ function Set-TargetResource
-ScriptBlock {
$params = $args[0]

$app = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.SharePoint.AppManagement.AppManagementServiceApplication"
$app = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq "Microsoft.SharePoint.AppManagement.AppManagementServiceApplication"
}

if ($null -eq $params.ProxyName)
Expand Down Expand Up @@ -238,8 +242,9 @@ function Set-TargetResource
$params = $args[0]
$appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool

$app = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.SharePoint.AppManagement.AppManagementServiceApplication"
$app = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq "Microsoft.SharePoint.AppManagement.AppManagementServiceApplication"
}
$app.ApplicationPool = $appPool
$app.Update()
Expand All @@ -256,8 +261,9 @@ function Set-TargetResource
-ScriptBlock {
$params = $args[0]

$app = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.SharePoint.AppManagement.AppManagementServiceApplication"
$app = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq "Microsoft.SharePoint.AppManagement.AppManagementServiceApplication"
}

$proxies = Get-SPServiceApplicationProxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ function Get-TargetResource
-ScriptBlock {
$params = $args[0]

$serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue
$serviceApps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}

$nullReturn = @{
Name = $params.Name
ApplicationPool = $params.ApplicationPool
Expand Down Expand Up @@ -218,9 +221,9 @@ function Set-TargetResource

$appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool

Get-SPServiceApplication -Name $params.Name `
| Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplication"
Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq "Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplication"
} `
| Set-SPBusinessDataCatalogServiceApplication -ApplicationPool $appPool
}
Expand All @@ -236,8 +239,9 @@ function Set-TargetResource
-ScriptBlock {
$params = $args[0]

$app = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplication"
$app = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq "Microsoft.SharePoint.BusinessData.SharedService.BdcServiceApplication"
}

$proxies = Get-SPServiceApplicationProxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
This resource is responsible for configuring the Diagnostics Provider within
the local SharePoint farm. Using Ensure equals to Absent is not supported.
This resource can only apply configuration, not ensure they don't exist.

To get an overview of all available Diagnostics Providers, use the cmdlet
Get-SPDiagnosticsProvider.
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ function Get-TargetResource
$params = $args[0]
$serviceAppObjectType = $args[1]

$serviceApps = Get-SPServiceApplication -Name $params.Name `
-ErrorAction SilentlyContinue
$serviceApps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}

$nullReturn = @{
Name = $params.Name
ApplicationPool = $params.ApplicationPool
Expand Down Expand Up @@ -354,18 +356,19 @@ function Set-TargetResource
-ScriptBlock {
$params = $args[0]

$params.Add("Identity", $params.Name)
$newParams = @{
Identity = $params.Name
}

# Remove parameters that do not belong on the set method
@("InstallAccount", "Ensure", "TrustedFileLocations", "Name", "ApplicationPool") |
ForEach-Object -Process {
if ($params.ContainsKey($_) -eq $true)
{
$params.Remove($_) | Out-Null
}
foreach ($key in $params.Keys)
{
if ($key -notin @("InstallAccount", "Ensure", "TrustedFileLocations", "Name", "ApplicationPool"))
{
$newParams.Add($key, $params.$key)
}
}

Set-SPExcelServiceApplication @params
Set-SPExcelServiceApplication @newParams
}


Expand Down Expand Up @@ -395,8 +398,9 @@ function Set-TargetResource
$newArgs.Add($_, $desiredLocation.$_)
}
}
$serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript {
$_.GetType().FullName -eq $serviceAppObjectType
$serviceApp = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq $serviceAppObjectType
}
$newArgs.Add("ExcelServiceApplication", $serviceApp)

Expand All @@ -421,8 +425,9 @@ function Set-TargetResource
$updateArgs.Add($_, $desiredLocation.$_)
}
}
$serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript {
$_.GetType().FullName -eq $serviceAppObjectType
$serviceApp = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq $serviceAppObjectType
}
$updateArgs.Add("Identity", $desiredLocation.Address)
$updateArgs.Add("ExcelServiceApplication", $serviceApp)
Expand Down Expand Up @@ -463,8 +468,9 @@ function Set-TargetResource
$params = $args[0]
$serviceAppObjectType = $args[1]

$serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript {
$_.GetType().FullName -eq $serviceAppObjectType
$serviceApp = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq $serviceAppObjectType
}

$proxies = Get-SPServiceApplicationProxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ function Get-TargetResource
-ScriptBlock {
$params = $args[0]

$serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue
$serviceApps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}

$nullReturn = @{
Name = $params.Name
Expand Down Expand Up @@ -169,7 +171,9 @@ function Set-TargetResource
$databaseCredentialsParam = ""
}

$serviceApps = Get-SPServiceApplication -Identity $params.Name
$serviceApps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}

$serviceApp = $serviceApps | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.Office.TranslationServices.TranslationServiceApplication"
Expand Down Expand Up @@ -236,7 +240,10 @@ function Set-TargetResource
-ScriptBlock {
$params = $args[0]

$serviceApps = Get-SPServiceApplication -Identity $params.Name
$serviceApps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}

$serviceApp = $serviceApps | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.Office.TranslationServices.TranslationServiceApplication"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ function Get-TargetResource
TermStoreAdministrators = @()
}

$serviceApps = Get-SPServiceApplication -Name $params.Name `
-ErrorAction SilentlyContinue
$serviceApps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}

if ($null -eq $serviceApps)
{
Expand Down Expand Up @@ -411,10 +412,11 @@ function Set-TargetResource
-ScriptBlock {
$params = $args[0]

$serviceApp = Get-SPServiceApplication -Name $params.Name `
| Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication"
$serviceApp = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq "Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication"
}

$appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool
Set-SPMetadataServiceApplication -Identity $serviceApp -ApplicationPool $appPool
}
Expand All @@ -429,8 +431,9 @@ function Set-TargetResource
$params = $args[0]
$pName = $args[1]

$serviceApps = Get-SPServiceApplication -Name $params.Name `
-ErrorAction SilentlyContinue
$serviceApps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}
$serviceApp = $serviceApps | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication"
}
Expand Down Expand Up @@ -469,9 +472,9 @@ function Set-TargetResource
-ScriptBlock {
$params = $args[0]

$serviceApp = Get-SPServiceApplication -Name $params.Name `
| Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication"
$serviceApp = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq "Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication"
}
Set-SPMetadataServiceApplication -Identity $serviceApp -HubUri $params.ContentTypeHubUrl
}
Expand Down Expand Up @@ -758,8 +761,9 @@ function Set-TargetResource
-ScriptBlock {
$params = $args[0]

$serviceApp = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication"
$serviceApp = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq "Microsoft.SharePoint.Taxonomy.MetadataWebServiceApplication"
}

$proxies = Get-SPServiceApplicationProxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ function Get-TargetResource
-ScriptBlock {
$params = $args[0]

$serviceApps = Get-SPServiceApplication -Name $params.Name -ErrorAction SilentlyContinue
$serviceApps = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name
}

$nullReturn = @{
Name = $params.Name
ApplicationPool = $params.ApplicationPool
Expand Down Expand Up @@ -201,9 +204,9 @@ function Set-TargetResource

$appPool = Get-SPServiceApplicationPool -Identity $params.ApplicationPool

Get-SPServiceApplication -Name $params.Name `
| Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplication"
Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq "Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplication"
} | Set-SPPerformancePointServiceApplication -ApplicationPool $appPool
}
}
Expand All @@ -216,8 +219,9 @@ function Set-TargetResource
-ScriptBlock {
$params = $args[0]

$app = Get-SPServiceApplication -Name $params.Name | Where-Object -FilterScript {
$_.GetType().FullName -eq "Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplication"
$app = Get-SPServiceApplication | Where-Object -FilterScript {
$_.Name -eq $params.Name -and `
$_.GetType().FullName -eq "Microsoft.PerformancePoint.Scorecards.BIMonitoringServiceApplication"
}

$proxies = Get-SPServiceApplicationProxy
Expand Down
Loading

0 comments on commit b09394c

Please sign in to comment.