5.4.138 bug?

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

5.4.138 bug?

Post by Lembasts »

Product, version and build: 5.4.138
(*** Please do not write "latest" as a version, specify a version number ***)
32 or 64 bit version of product: 64
Operating system: win7
32 or 64 bit OS: 64
PowerShell Version: 5.0

DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

I had a project that worked fine until I installed 5.4.138.

The code I am running is:
$global:EXSession = New-PSSession -Name ExchangeConn -ConfigurationName Microsoft.Exchange -ConnectionUri "http://$ActiveSiteExchange.$domainDNS/PowerShell/" -Authentication Kerberos -ErrorAction Stop
Import-PSSession $global:EXSession -allowclobber -DisableNameChecking -ErrorAction Stop -verbose | out-null
Set-AdServerSettings -PreferredServer $Global:ActiveSiteDCFQDN

which as I said has always worked. The above code is running in a Try block.
The try block now fails with this error:
Running the Get-Command command in a remote session reported the following error: The type initializer for 'Microsoft.PowerShell.Commands.MeasureObjectCommand' threw an exception..

Any ideas?

Thanks
David
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Re: 5.4.138 bug?

Post by Lembasts »

Turns out to be coincidence - just as I installed 5.4.138 we also had an excahnge server problem...
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Re: 5.4.138 bug?

Post by Lembasts »

Now I dont think its a coincidence.
With debugging I am getting the error on the last line of this code:

$scriptCmd = { & $script:InvokeCommand `
@clientSideParameters `
-HideComputerName `
-Session (Get-PSImplicitRemotingSession -CommandName 'Search-Mailbox') `
-Arg ('Search-Mailbox', $PSBoundParameters, $positionalArguments) `
-Script { param($name, $boundParams, $unboundParams) & $name @boundParams @unboundParams } `
}

$steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
$steppablePipeline.Begin($myInvocation.ExpectingInput, $ExecutionContext)
} catch {
throw
}
}
Process {
try {
$steppablePipeline.Process($_)
} catch {
throw
}
}
End {
try {
$steppablePipeline.End()


The error says that Winrm is not running but I am connecting to an exchange server which always has winrm running. I have tried several exchange servers and the same error comes up.
Anything around the above code changed recently?
Thanks
david
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Re: 5.4.138 bug?

Post by Lembasts »

OK - back to thinking it is an Exchange thing ... sorry about that.
This topic is 6 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.