Hi,
I am trying to find out the created date for user objects but they appear to be empty.
I presume there is something wrong with my script as every object should have a created date.
Can someone review my script and see if I am missing something?
Thanks in advance,
Ann
# Connect to Tridion
#set requestedMetadata
$requestedMetadata = Set-IshRequestedMetadataField -IshSession $ishSession -Name 'USERNAME' -Level 'none' | `
Set-IshRequestedMetadataField -IshSession $ishSession -Name 'CREATED-ON' -Level "none"
$ishUsers = Find-IshUser -IshSession $ishSession -MetadataFilter (Set-IshMetadataFilterField -Name FISHLASTLOGINON -Level None -FilterOperator EMPTY | Set-IshMetadataFilterField -Name CREATED-ON -Level None -FilterOperator NOTEMPTY) -RequestedMetadata $requestedMetadata
Write-Host "Number of users found -" $ishUsers.count
foreach($ishUser in $ishUsers)
{
$user = Get-IshUser -IshSession $ishSession -IshObject $ishUser
$username = ($user.IshField | where Name -eq USERNAME).value
$lastlogon = ($user.IshField | where Name -eq FISHLASTLOGINON).value
$createdon = ($user.IshField | where Name -eq CREATED-ON).value
Write-Host $username "Last logon:" $lastlogon " Created On:" $createdon
}