Jump to content
Sign in to follow this  
njordur

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.

Share this post


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×