Un élément de tuyau vide n'est pas autorisé - le PowerShell I Copied échoue
-
09-12-2019 - |
Question
J'essaie simplement de réparer quelque chose pour obtenir ma liste externe BCS créée.Toutes les indications sont que le serveur a trop de lignes pour BCS, voici ce que j'ai mis dans l'IDE PowerShell en cours d'exécution d'administrateur:
$bdc = Get-SPServiceApplicationProxy
| Where {$_ -match "Business Data Connectivity"}
$throttle = Get-SPBusinessDataCatalogThrottleConfig -ThrottleType Connections
-Scope Global
-ServiceApplicationProxy $bdc
Set-SPBusinessDataCatalogThrottleConfig -Enforced $false -Identity $throttle
Voici l'erreur que j'ai reçue:
An empty pipe element is not allowed.
At D:\Troubleshooting\Powershell\DisableThrottleForBCS\FixToGetWalkthroughForBCSExternalListWorking.ps1:2 char:9
+ | <<<< Where {$_ -match "Business Data Connectivity"}
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : EmptyPipeElement
aide s'il vous plaît si vous pouvez voir l'erreur.
Modifier la mise à jour de l'article original:
Après plus de recherches et d'essais, j'ai eu ceci pour travailler:
$bdc = Get-SPServiceApplicationProxy | ? Where {$_.Name -like 'Business Data Connectivity Service'}
$throttle = Get-SPBusinessDataCatalogThrottleConfig -ThrottleType Connections -Scope Global -ServiceApplicationProxy $bdc
Set-SPBusinessDataCatalogThrottleConfig -Enforced $false -Identity $throttle
La solution 2
J'ai ceci pour travailler:
$bdc = Get-SPServiceApplicationProxy | ? Where {$_.Name -like 'Business Data Connectivity Service'}
$throttle = Get-SPBusinessDataCatalogThrottleConfig -ThrottleType Connections -Scope Global -ServiceApplicationProxy $bdc
Set-SPBusinessDataCatalogThrottleConfig -Enforced $false -Identity $throttle
Autres conseils
Je pense que cela devrait être
...$_.Property -match...
Dans ce cas $ _. Typename?
Cette erreur provient du tuyau de ne pas avoir une variable à comparer avec je crois, à nouveau, pas un message d'erreur très clair, aucun choc là-bas!