First published on TECHNET on Jul 18, 2016 Hello All,
My customer is currently running MOSS 2007 and as we prepare for there migration, we have created several PowerShell scripts to collect data.
One of the script get's the content database object and when I tried to get the property name of that database I got this error
The field/property: "Id" for type: "Microsoft.SharePoint.Administration.SPContentDatabase" differs only in case from the field/property: "ID". Failed to use non CLS compliant type. At line:9 char:14 + $DBName = <<<< $SiteContentDB.GetProperty("Name") + CategoryInfo : NotSpecified: (:) , ExtendedTypeSystemException + FullyQualifiedErrorId : NotACLSComplaintProperty
The reason for this error is that PowerShell does not know how to handle the fact that the SPContentDatabase class has two properties with the same name but different case....'ID'. So it just errors out and gracefully continues on but doesn't give you the name of the database.
Luckly this is very easy to resolve, the script originally looked something like this