Working with different data and attribute types
Date data types
# Sets the expiry date to the current date and time
$obj = Get-Resource -ObjectType Person -AttributeName AccountName -AttributeValue testuser
$obj.ExpiryDate = [DateTime]::Now
Save-Resource $obj
# Sets the expiry date to a specific value
$obj.ExpiryDate = "2020-01-01T00:00:00.000"
Save-Resource $objReference data types
# Sets the value of a person's manager attribute to a known ID
$obj = Get-Resource -ObjectType Person -AttributeName AccountName -AttributeValue testuser
$obj.Manager = '7fb2b853-24f0-4498-9534-4e10589723c4'
Save-Resource $obj
# Sets the value of a person's manager attribute to that of another object
$obj.Manager = GetResource -ObjectType Person -AttributeName AccountName -AttributeValue testuser2
Save-Resource $objBinary data types
Integer data types
Working with multivalued attributes
Last updated