#Add-SPOFieldFromXml Adds a field to a list or as a site column based upon a CAML/XML field definition ##Syntax
Add-SPOFieldFromXml [-List <ListPipeBind>] [-Web <WebPipeBind>] -FieldXml <String>##Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| FieldXml | String | True | CAML snippet containing the field definition. See http://msdn.microsoft.com/en-us/library/office/ms437580(v=office.15).aspx |
| List | ListPipeBind | False | |
| Web | WebPipeBind | False | The web to apply the command to. Omit this parameter to use the current web. |
| ##Examples |
###Example 1
PS:> $xml = '<Field Type="Text" Name="PSCmdletTest" DisplayName="PSCmdletTest" ID="{27d81055-f208-41c9-a976-61c5473eed4a}" Group="Test" Required="FALSE" StaticName="PSCmdletTest" />'
PS:> Add-SPOFieldFromXml -FieldXml $xmlAdds a field with the specified field CAML code to the site.
###Example 2
PS:> $xml = '<Field Type="Text" Name="PSCmdletTest" DisplayName="PSCmdletTest" ID="{27d81055-f208-41c9-a976-61c5473eed4a}" Group="Test" Required="FALSE" StaticName="PSCmdletTest" />'
PS:> Add-SPOFieldFromXml -List "Demo List" -FieldXml $xmlAdds a field with the specified field CAML code to the site.