NIS Server snap-in throws WMI error
When we try to open Server for NIS administration snap-in; a very common issue that is reported is getting an error message like: “A WMI error has occurred. Index was out of range. Must be non-negative and less than the size of the collection”.
At a glance this message appears to be confusing. We were trying to track to internal cause. It turned out to be related to in-built search for All NIS Server in the domain. The NIS Admin snap-in searches for “serverreference” attributes in the domain and then tries to look for “gecos” attribute to determine if a domain controller is actually working as a NIS Master Server.
When a domain controller is decommissioned generally the object for that system remains in the schema but with a null value in the corresponding “serverreference” attribute. There can be other reasons to have a corrupt value in the “serverreference” attribute.
The way to fix this is to either delete the invalid machine account from schema or to put a proper value in the serverreference attribute. On this is done; restarting NIS admin snap-in should be enough to eliminate the “WMI error”.
We have a script ready to look for the servers and check the value for serverreference attribute. It can be given on need basis.
Comments
- Anonymous
January 01, 2003
Hi abhishek, after we have installed NIS on our W8k domaincontoller we get this error. Can you please send me your script. Would be great. best regards Can I have your email address?
- Abhisek
Anonymous
January 01, 2003
Hi All, Please find the script attachedAnonymous
January 01, 2003
Please send me an email using the link on this blog post; will share the script.Anonymous
January 01, 2003
Hi Abhishek, we also installed NIS on Win2008 R2 domain controller. Can you please provide us with the script to find out the location of the serverreference attribute ? Thanks DouglasAnonymous
January 14, 2013
Please send me the script to info@legasystems.com blogs.technet.com/.../nis-server-snap-in-throws-wmi-error.aspx Thanks, LegaSystems support