PowerShell Discovery Probe Credentials

bernard6
Mega Expert

Hi everyone,

I've got a custom PowerShell script that I'm attempting to use for discovery.   The script needs specific credentials, which I have added as 'windows' credentials.   However whenever I test the probe it always returns with the following error:

Authentication failure with the local MID server service credential.

Failed to access target system.   Please check credentials and firewall settings on the target system to ensure accessibility: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

In the script I'm using the $cred variable for supplying the credentials to the command being run.   If I set the $cred variable in a PowerShell session on the MID server and run the script manually it runs successfully and outputs the XML data that I'm looking to get back from the probe.

Has anyone run into a similar issue with a PowerShell probe?   How can I further troubleshoot the issue?

Thanks,
David Bernard

1 ACCEPTED SOLUTION

bernard6
Mega Expert

The script file on the MID server 'Credentials.psm1' performs a WMI query to validate credentials for the source.   In my case since this was not a Windows server the WMI queries would all fail making it seem like it couldn't connect to the source.



To correct the issue I added a new function to the script file to validate credentials for my type of CI and then on the PowerShell probe I added a parameter to specify the credtype parameter as that same type.   For this to work natively the function should be named 'testCredential' with your type appended at the end.   In my instance I named the function 'testCredentialpure'.


View solution in original post

9 REPLIES 9

David,


If its a storage array then no we wont run this command.   See, (on computers) we have to go through the process of discovering an Operating System, identifying the host before we execute any further probes and sensors. You're not even getting past the first phases of discovery because we haven't 'discovered' anything in the first place.


Right.   My plan was to classify the array via SSH and trigger the PowerShell probe to capture the information needed to create / update the CI for the array.   My goal at the moment is to ensure that the probe returns the information properly.   I've been using the 'Test Probe' on the probe to test it against an array.



To make it stranger I tried to hard code the credentials in the PowerShell script so I could validate if the credentials were the issue, but it still fails with the same error message.   I'm dumbfounded as it works flawlessly if I execute the script manually on the MID server.


David, send me an email doug.schulze@servicenow.com and we can take a look...


Hi David, it's too late for this post but I was doing some R&D on does Pure Storage has a ServiceNow connection to be precise does Pure Storage Cloud Services are available on ServiceNow?


If Yes, what are the details? Please share anything you know about it ASAP.


bernard6
Mega Expert

The script file on the MID server 'Credentials.psm1' performs a WMI query to validate credentials for the source.   In my case since this was not a Windows server the WMI queries would all fail making it seem like it couldn't connect to the source.



To correct the issue I added a new function to the script file to validate credentials for my type of CI and then on the PowerShell probe I added a parameter to specify the credtype parameter as that same type.   For this to work natively the function should be named 'testCredential' with your type appended at the end.   In my instance I named the function 'testCredentialpure'.