Can it be done ? I want to mimic the behaviour of an ADObject on a custom object in a way that when you change a property it is listed in 'modifiedproperties'
eg.
$ADUser = Get-ADUser 'someSamAccountName' -Properties description
$ADUser.Description = 'Changed ...'
$ADUser.ModifiedProperties
How do I get the same modifiedproperties for a custom object :
$var = New-Object -TypeName psobject -Property @{ Description = 'value' }
$var.description = 'Changed ...'
$var.ModifiedProperties