Jump to content

Discovery script: get-resources.ps1


Recommended Posts

Hi,

 

I'm using v.7.3 (Build 7316) and have restored the latest discovery scripts to the database.

 

I had a problem with one 2012R2 server when discovering the resources on it. The problem had to do with the service account on the server had an SPN record for http. So the get-resources script needed to use the option 


If ($resultsarray.ErrorDetails.Message -like "*Connecting to remote server $HostName failed with the following error message*0x80090322*" -or $resultsarray.ErrorDetails.Message -like "*Connecting to remote server $HostName failed with the following error message*The WS-Management service cannot complete the operation within the time specified in OperationTimeout*")

But the if statement:


If ($resultsarray.ErrorDetails.Message -like "*Connecting to remote server $HostName failed with the following error message*0x80090322*" -or $resultsarray.ErrorDetails.Message -like "*Connecting to remote server $HostName failed with the following error message*The WS-Management service cannot complete the operation within the time specified in OperationTimeout*")

didn't work since this is not the error message I got was different.

 

When I added:


If ($resultsarray.ErrorDetails.Message -like "*Connecting to remote server $HostName failed with the following error message*0x80090322*" -or $resultsarray.ErrorDetails.Message -like "*Connecting to remote server $HostName failed with the following error message*The WS-Management service cannot complete the operation within the time specified in OperationTimeout*")

... the results from the server came through and was written in passwordstate.

 

Just wanted to let the community know if anyone else had this problem.

Link to post
Share on other sites

Hi njordur,

 

Many thanks for reporting this issue to us. We had another customer help us with the -IncludePortInSPN switch and error capturing, and it was working for him, so possibly the different Operating System versions report this error back differently.

 

We will include your change in our next release, and we really appreciate you reporting it here.

 

Regards

Click Studios

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...