Author Posts

January 1, 2012 at 12:00 am

by dbrs at 2012-09-06 06:41:49

Is there a way to get powershell to wait for the solution to be deployed before returning from Install-SPSolution? currently I get an error when I try to activate my features since the solution has not been marked as deployed. the old stsadm deploysolution waited...

by dbrs at 2012-09-06 09:53:45

Looks like I needed the -Local parameter. when I add that it seems to deploy right away. Seems a bit odd to me...

by ToddKlindt at 2012-09-07 14:20:17

I don't know of any way to do this. -Local won't work very well if you have multiple servers in your farm. You might have to write some PowerShell that does the install-spsolution, then loop through get-spsolution until your solution shows up.

tk

by Colinstrose at 2012-09-09 19:11:18

#Wait for solution to be deployed
do {Start-Sleep -s 10} while ($solution.Deployed -eq $false)

/Colin

by dbrs at 2012-09-10 11:58:54

Thanks all, Colin, I see you are sleeping for 10 seconds in between waits, I had coding something up to sleep 1 second at a time, but it did seem to take about 10 seconds to deploy/undeploy on my local machine. Is that about normal? I also had it timeout after 40 seconds. I guess I should bump these numbers up a bit. any thoughts?

by ToddKlindt at 2012-12-16 08:42:49

[quote="princegrips"]am just trying to fix something to get my BCS external list created. All indications are that the server has too many rows for BCS so here is what I put into the Powershell IDE running as administrator:

$bdc = Get-SPServiceApplicationProxy
| Where {$_ -match "Business Data Connectivity"}
$throttle = Get-SPBusinessDataCatalogThrottleConfig -ThrottleType Connections
-Scope Global
-ServiceApplicationProxy $bdc
Set-SPBusinessDataCatalogThrottleConfig -Enforced $false -Identity $throttle

Here is the error I got:

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

Please help if you can see the error.[/quote]

when you get a "An empty pipe element is not allowed" error that something on the left of the pipe "|" returns nothing and passes nothing on to the thing on the right side of the pipe. To troubleshoot remove the variable and start piecing the statement together one step at a time until you get to the part that spits out nothing. In this case that means start with this:

Get-SPServiceApplicationProxy
Make sure this gives you some output. Then add the next step:

$bdc = Get-SPServiceApplicationProxy | Where {$_ -match "Business Data Connectivity"}
And make sure that returns something, and so on.

tk