I am trying to add the column below via PowerShell
<Field
ID="{1920c575-d592-40eb-a163-5a302b78aa65}"
Type="Note"
DisplayName="1920c575d59240eba1635a302b78aa65"
StaticName="1920c575d59240eba1635a302b78aa65"
Name="1920c575d59240eba1635a302b78aa65"
Required="FALSE"
Hidden="TRUE"
Overwrite="TRUE"
ShowInNewForm ="FALSE"
ShowInEditForm="FALSE"
ShowInDisplayForm="FALSE"
xmlns="http://schemas.microsoft.com/sharepoint/"
/>
However I get this error message:
Exception calling "AddFieldAsXml" with "1" argument(s): ""
At line:14 char:9
+ $destWeb.fields.AddFieldAsXml($fld.OuterXml)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : SPException
All other site columns are created correctly but not this one. I know this is related to a metadata column but at this point I am not sure if it is related. I have another identical column except the GUIDs that gets created with out problem. Any idea how to troubleshoot this?
I am using the code from this site http://get-spscripts.com/2011/01/export-and-importcreate-site-columns-in.html