This project has moved. For the latest updates, please go here.

Add-CrmAttribute

Synopsis

Add attribute to entity

Syntax

Add-CrmAttribute [-Entity] <String> [-Attribute] <AttributeMetadata> [<CommonParameters>]

Description

Adds a new attribute to an entity using an AttributeMetadata object

Parameters

-Entity <String>

Logicalname of the entity to add the attribute to

Required? True
Position? 1
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-Attribute <AttributeMetadata>

Specific AttributeMetadata object describing the attribute to add

Required? True
Position? 2
Default value  
Accept pipeline input? false
Accept wildcard characters? False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, InformationAction, InformationVariable,
WarningAction, WarningVariable, OutBuffer, PipelineVariable and OutVariable.
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Inputs

Outputs

Microsoft.Xrm.Sdk.Metadata.AttributeMetadata

Notes

Examples

Add Attribute

PS C:\> $a = New-Object 'Microsoft.Xrm.Sdk.Metadata.StringAttributeMetadata'
...
Add-CrmAttribute -Entity contact -Attribute $a

Related links

AttributeMetadata Class https://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.metadata.attributemetadata.aspx

Last edited Mar 11 at 7:02 PM by amsoftware, version 3