none
Ricoh Multi Function Printer (MFP) Address Book PowerShell Module not working RRS feed

  • General discussion

  • Original article is here: https://gallery.technet.microsoft.com/scriptcenter/Ricoh-Multi-Function-27aeea71

    Has anyone else had this issue? The module is not remote signed so we set the execution policy to 'Bypass' temporarily (Scoped to session only). This allowed us to successfully import the module, however on executing "Get-MFAB" we get the following:

    iwr : The underlying connection was closed: Could not establish trust
    relationship for the SSL/TLS secure channel.
    At C:\users\clongcor\RICOH-MFP-AB.psm1:36 char:13
    + [xml]$xml = iwr $url -Method Post -ContentType "text/xml" -Headers @{ ...
    +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:Htt
       pWebRequest) [Invoke-WebRequest], WebException
        + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
       ll.Commands.InvokeWebRequestCommand

    Cannot set "sessionId" because only strings can be used as values to set
    XmlNode properties.
    At C:\users\clongcor\RICOH-MFP-AB.psm1:127 char:1
    + $get.Envelope.Body.getObjectsProps.sessionId = $script:session
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], SetValueException
        + FullyQualifiedErrorId : XmlNodeSetShouldBeAString

    Cannot set "sessionId" because only strings can be used as values to set
    XmlNode properties.
    At C:\users\clongcor\RICOH-MFP-AB.psm1:90 char:1
    + $search.Envelope.Body.searchObjects.sessionId = $script:session
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], SetValueException
        + FullyQualifiedErrorId : XmlNodeSetShouldBeAString

    iwr : The underlying connection was closed: Could not establish trust
    relationship for the SSL/TLS secure channel.
    At C:\users\clongcor\RICOH-MFP-AB.psm1:91 char:13
    + [xml]$xml = iwr $url -Method Post -ContentType "text/xml" -Headers @{ ...
    +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:Htt
       pWebRequest) [Invoke-WebRequest], WebException
        + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
       ll.Commands.InvokeWebRequestCommand

    You cannot call a method on a null-valued expression.
    At C:\users\clongcor\RICOH-MFP-AB.psm1:92 char:1
    + $xml.SelectNodes("//rowList/item") | %{$_.item.propVal} | ?{$_.length ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull

    iwr : The underlying connection was closed: Could not establish trust
    relationship for the SSL/TLS secure channel.
    At C:\users\clongcor\RICOH-MFP-AB.psm1:134 char:13
    + [xml]$xml = iwr $url -Method Post -ContentType "text/xml" -Headers @{ ...
    +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:Htt
       pWebRequest) [Invoke-WebRequest], WebException
        + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
       ll.Commands.InvokeWebRequestCommand

    You cannot call a method on a null-valued expression.
    At C:\users\clongcor\RICOH-MFP-AB.psm1:135 char:1
    + $xml.SelectNodes("//returnValue/item") | %{
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull

    Cannot set "sessionId" because only strings can be used as values to set
    XmlNode properties.
    At C:\users\clongcor\RICOH-MFP-AB.psm1:280 char:1
    + $logout.Envelope.Body.terminateSession.sessionId = $script:session
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], SetValueException
        + FullyQualifiedErrorId : XmlNodeSetShouldBeAString

    iwr : The underlying connection was closed: Could not establish trust
    relationship for the SSL/TLS secure channel.
    At C:\users\clongcor\RICOH-MFP-AB.psm1:281 char:13
    + [xml]$xml = iwr $url -Method Post -ContentType "text/xml" -Headers @{ ...
    +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:Htt
       pWebRequest) [Invoke-WebRequest], WebException
        + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
       ll.Commands.InvokeWebRequestCommand
    • Changed type Bill_Stewart Wednesday, November 29, 2017 11:51 PM
    • Moved by Bill_Stewart Wednesday, November 29, 2017 11:51 PM This is not a support forum for gallery scripts
    Wednesday, October 4, 2017 4:34 PM

All replies