Implicit remoting with Scom 2012


This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Thom Schumacher Thom Schumacher 7 months ago.

  • Author
  • #58460
    Profile photo of Thom Schumacher
    Thom Schumacher

    Has anyone been able to successfully use Implicit remoting with the Scom Modules?
    Have been attempting to connect to some of the modules found here:

    Refactoring the script I posted here:

    if you have had a chance to try this via implicit remoting and have had success would like to know your secret.

  • #58649
    Profile photo of Don Jones
    Don Jones

    What non-success are you having?

  • #58780
    Profile photo of Thom Schumacher
    Thom Schumacher

    When I import the Module for operations manager and then try and call one of the Cmdlets the session gets broken. Here is an example of the code and the call I make that breaks the session:

    $ScomMgtServer = 'ScomServer'
    $scommSession = New-PSsession -computername $ScomMgtServer -Credential $credential
    $scomImported = import-module -PSSession $scommSession -name operationsmanager
    invoke-command -session $scommsession -ScriptBlock {get-command -module operationsmanager} | out-null
    (Get-SCOMManagementServer -Credential).displayName 

    Error that follows:
    Processing data for a remote command failed with the following error message: The WSMan provider host process did not return a proper response. A
    provider in the host process may have behaved improperly. For more information, see the about_Remote_Troubleshooting Help topic.
    + CategoryInfo : OperationStopped: (pgscom1p:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : JobFailure
    + PSComputerName : ScomServer

    if you look at the sessions you'll notice one is broken and new one has been opened.

    PS PS:\> get-pssession

    Id Name ComputerName State ConfigurationName Availability
    — —- ———— —– —————– ————
    5 Session for ... ScomServer Broken Microsoft.PowerShell None
    4 Session4 ScomServer Opened Microsoft.PowerShell Available

You must be logged in to reply to this topic.