Answered by:
SQL 2014 AlwaysOn Discovery broken

Question
-
Hi,
We are trying to make SCOM discover SQL 2014 AlwaysOn Availability Group but it seems discovery is failing on all AlwaysOn instances.
The script GeneralAlwaysOnDiscovery.ps1 fails at line 216 (in fact 219) because of a Tostring() conversion. Events 4202 are generated stating this error:
Reason: Cannot find an overload for "ToString" and the argument count: "0".
We tested the script manually and have the same error. Has anyone this one working in its environment ?
Best regards,
<a href="http://myitforum.com/cs2/blogs/fdufour/default.aspx">Supervize Me ©</a>
Tuesday, November 24, 2015 2:18 PM
Answers
-
Hi,
For those who are interested about this, the problem comes in fact from a bug that has been introduced in Powershell V5. So if you're not in Powershell V5 you shouldn't have this problem.
Also note that this is combined with the fact that since UR7 for SCOM 2012 R2, the agent doesn't use Powershell v2 by default but the top version existing on the server : https://rburri.wordpress.com/2015/08/19/which-powershell-version-is-my-scom-agent-using-or-why-i-love-scom-2012-r2-update-rollup-7/
Best regards,
<a href="http://myitforum.com/cs2/blogs/fdufour/default.aspx">Supervize Me ©</a>
- Marked as answer by François Dufour Wednesday, January 20, 2016 9:23 AM
- Edited by François Dufour Wednesday, January 20, 2016 11:25 AM
Wednesday, January 20, 2016 9:23 AM
All replies
-
Forgot to mention it's SQL MP version 6.6.0.0
<a href="http://myitforum.com/cs2/blogs/fdufour/default.aspx">Supervize Me ©</a>
Tuesday, November 24, 2015 2:20 PM -
up ;)
<a href="http://myitforum.com/cs2/blogs/fdufour/default.aspx">Supervize Me ©</a>
Tuesday, December 1, 2015 4:03 PM -
Hi,
Is there any spcific features you need in MP 6.6.0.0 ?
Currently , newest MP version for SQL 2014 always on is 6.6.4.0 :
Paul
Wednesday, December 2, 2015 7:34 AM -
Hi Paul
Yes we saw that a new version exists. I downloaded it and checked if the AlwaysOn discovery script had changed. It does have changed but only minor changes that are not related to our failures. The lines that fail are still the same :(
<a href="http://myitforum.com/cs2/blogs/fdufour/default.aspx">Supervize Me ©</a>
Wednesday, December 2, 2015 10:26 AM -
Hi,
For those who are interested about this, the problem comes in fact from a bug that has been introduced in Powershell V5. So if you're not in Powershell V5 you shouldn't have this problem.
Also note that this is combined with the fact that since UR7 for SCOM 2012 R2, the agent doesn't use Powershell v2 by default but the top version existing on the server : https://rburri.wordpress.com/2015/08/19/which-powershell-version-is-my-scom-agent-using-or-why-i-love-scom-2012-r2-update-rollup-7/
Best regards,
<a href="http://myitforum.com/cs2/blogs/fdufour/default.aspx">Supervize Me ©</a>
- Marked as answer by François Dufour Wednesday, January 20, 2016 9:23 AM
- Edited by François Dufour Wednesday, January 20, 2016 11:25 AM
Wednesday, January 20, 2016 9:23 AM -
I am running SCOM 2012 R2 IUR 9 and have same issue
Management Group: OpsManager. Script: Main Module: GeneralAlwaysOnDiscovery.ps1 : Error occurred during AlwaysOn discovery. Computer: SQLSERVER-A Reason: Cannot find an overload for "ToString" and the argument count: "0". Position:220 Offset:32 Detailed error output: Cannot find an overload for "ToString" and the argument count: "0".
how to fix it.
Thursday, June 9, 2016 2:29 PM -
Hi there, wondering if there is an update/help from anyone?
PS C:\Windows\system32> $PSVersionTable Name Value ---- ----- PSVersion 4.0 WSManStackVersion 3.0 SerializationVersion 1.1.0.1 CLRVersion 4.0.30319.34209 BuildVersion 6.3.9600.17400 PSCompatibleVersions {1.0, 2.0, 3.0, 4.0} PSRemotingProtocolVersion 2.2
- Edited by Azure HA Tuesday, June 14, 2016 7:29 PM
Tuesday, June 14, 2016 7:24 PM -
Hi Any one have solution for this.
After updating Ur7 also we are getting same error.
Omkar umarani SCOM STUDENT
Thursday, August 25, 2016 4:37 AM