Update-MSDeploymentUnitsCustomFields

Update Custom Fields from DeploymentUnits.

Syntax


Update-MSDeploymentUnitsCustomFields -Updates (Array) [-UpdateReadOnly] [-UpdateInvisible] [-UpdateLocked] [-Append]

Update-MSDeploymentUnitsCustomFields -Path (String) -PathInstanceId (Int32) -PathDataValue (String) [-UpdateReadOnly] [-UpdateInvisible] [-UpdateLocked] [-Append]

Update-MSDeploymentUnitsCustomFields -FieldId (Int32) -FieldInstanceId (Int32) -DataValue (String) [-UpdateReadOnly] [-UpdateInvisible] [-UpdateLocked] [-Append]

Examples


## Update from hash using FieldIds.
$updateHash = @()
    $updateHash += @{ FieldId = 7; Id = 1000; DataValue = "New Value" }
    $updateHash += @{ FieldId = 7; Id = 1005; DataValue = "New Value" }
Update-MSDeploymentUnitsCustomFields -Updates $updateHash

## Update from hash using FieldPaths.
$updateHash = @()
    $updateHash += @{ FieldPath = "DeploymentUnitDiscovery\Site Information\Monday Open"; Id = 1000;  DataValue = "New Value" }
    $updateHash += @{ FieldPath = "UMSP\[26_ServicePlan]\[PublishingStatus]"; Id = 1005;  DataValue = "New Value" }
Update-MSDeploymentUnitsCustomFields -Updates $updateHash

## Update via FieldId
Update-MSDeploymentUnitsCustomFields -FieldId 7 -FieldInstanceId 1002 -DataValue "New Value"

## Update via Path
Update-MSDeploymentUnitsCustomFields -Path "DUDSC\Country\City" -PathInstanceId 1005 -PathDataValue "New Value"