Implicit remoting with Scom 2012

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Thom Schumacher Thom Schumacher 1 week, 4 days ago.

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

    Has anyone been able to successfully use Implicit remoting with the Scom Modules?
    https://technet.microsoft.com/en-us/library/ff720181.aspx
    Have been attempting to connect to some of the modules found here: https://technet.microsoft.com/en-us/library/hh527817.aspx

    Refactoring the script I posted here:
    https://gallery.technet.microsoft.com/Put-server-in-Maintenance-0a23e1fe

    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
    Keymaster

    What non-success are you having?

  • #58780
    Profile photo of Thom Schumacher
    Thom Schumacher
    Participant

    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.