Problem for configure connection plugin SCCM

Hi,

i want to use this plugin for the Microsoft SCCM Automation-Assisted Patching.
I have add the Microsoft SCCM plugin, but i cant configure the connection :frowning:

so I have some questions to try to solve the problem :

  • I dont use IP address of SCCM server but the FQDN name. Its a problem ?
  • I use the 443 port ( it is well in listening, check with this PS command : winrm enumerate winrm/config/listener and telnet command its ok)

here is the error message after the connection test :slight_smile:

Connect: Connecting...
rapid7/Microsoft SCCM:2.0.10. Step name: add_devices_to_collection
Connection test failed!

There is likely an issue with the connection details, or the plugin can not communicate via WinRM on the SCCM host. An error occurred while fetching the SCCM site based on site path: CFM, please review the error for additional details: a bytes-like object is required, not 'NoneType'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/microsoft_sccm_rapid7_plugin-2.0.10-py3.7.egg/komand_microsoft_sccm/connection/connection.py", line 26, in test
    run_script = util.powershell(self, script, self.logger, False)
  File "/usr/local/lib/python3.7/site-packages/microsoft_sccm_rapid7_plugin-2.0.10-py3.7.egg/komand_microsoft_sccm/util/util.py", line 41, in powershell
    run_script = powershell_session.run_ps(script)
  File "/usr/local/lib/python3.7/site-packages/winrm/__init__.py", line 50, in run_ps
    rs = self.run_cmd('powershell -encodedcommand {0}'.format(encoded_ps))
  File "/usr/local/lib/python3.7/site-packages/winrm/__init__.py", line 37, in run_cmd
    shell_id = self.protocol.open_shell()
  File "/usr/local/lib/python3.7/site-packages/winrm/protocol.py", line 161, in open_shell
    root = ET.fromstring(res)
  File "/usr/local/lib/python3.7/xml/etree/ElementTree.py", line 1315, in XML
    parser.feed(text)
TypeError: a bytes-like object is required, not 'NoneType'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/komand-1.0.1-py3.7.egg/komand/plugin.py", line 311, in handle_step
    output = self.start_step(input_message['body'], 'action', logger, log_stream, is_test, is_debug)
  File "/usr/local/lib/python3.7/site-packages/komand-1.0.1-py3.7.egg/komand/plugin.py", line 421, in start_step
    output = func()
  File "/usr/local/lib/python3.7/site-packages/microsoft_sccm_rapid7_plugin-2.0.10-py3.7.egg/komand_microsoft_sccm/connection/connection.py", line 30, in test
    assistance=f"An error occurred while fetching the SCCM site based on site "
komand.exceptions.ConnectionTestException: Connection test failed!

There is likely an issue with the connection details, or the plugin can not communicate via WinRM on the SCCM host. An error occurred while fetching the SCCM site based on site path: CFM, please review the error for additional details: a bytes-like object is required, not 'NoneType'

Of course the site name its good, and the user is full administrator of sccm.

Thank you for your reply

Regards

There is a connection guide for this plugin. You can find it here: Microsoft SCCM | InsightConnect Documentation

I hope that is helpful. You can also open a support case for help.

Yes ! thank you.

I have already seen this documentation.

I am looking for opinions from people who have implemented it.
But okay, I’ll open a case.

Regards

Unless changed in your SCCM configuration WinRM (connection used to connect via plugin to SCCM) uses the default WinRM HTTPS port 5986.

SCCM Ports / WinRM Configuration
(Ports used for connections - Configuration Manager | Microsoft Docs) / Installation and configuration for Windows Remote Management - Win32 apps | Microsoft Docs

HI,

Ok, thank you. I have configured the port 5986, but i have a another problem… I open a case.

Problem solve ! I use the FQDN name for my SCCM server, and all its great for the connection !

2 Likes