Their example also contains a Syntax error (it has "}" after the csv file while it shouldn't).
It should work to a single server too because in the example they run the Export command for each server (so basically, it's the same).
Anyway, I've tried to do it like the example(without the Syntax error of course) and got the exact same error:
PS C:\Users\scomadmin> $members | foreach { Export-SCOMEffectiveMonitoringConfiguration -Instance $_ -Path "D:\EffectiveConf\$($_.DisplayName).csv" -RecurseContainedObjects }
Export-SCOMEffectiveMonitoringConfiguration : The client has been disconnected from the server. Please call ManagementGroup.Reconnect() to reestablish the connection.
At line:1 char:22
+ $members | foreach { Export-SCOMEffectiveMonitoringConfiguration -Instance $_ -P ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Syste...igurationCmdlet:ExportSCEffecti...igurationCmdlet) [Export-SCOMEffe...ngConfiguration], ServerDisconnectedException
+ FullyQualifiedErrorId : ExecutionError,Microsoft.SystemCenter.OperationsManagerV10.Commands.ExportSCEffectiveMonitoringConfigurationCmdlet
Any idea why?
P.S:
In case I didn't mention, I ran this commands from the management server.
Thanks.