1

I'm building a report with PowerShell, but I can't find where is the creation date for the users. I need filtering by dates range and later get custom properties.

Get-User -Filter 'default\*' `
        | Where-Object { $_.Profile.??? -gt (get-date 2019-01-01) } `
2

I'm afraid you cannot get user creation date from the Sitecore User class directly.

What you can do instead is getting MembershipUser object first and using it's CreationDate property like:

$users = Get-User -Filter 'default\*'

foreach($user in $users) {
    $muser = [System.Web.Security.Membership]::GetUser($user.Name)
    "$($user.Name) $($muser.CreationDate)"
}
  • Thank you Marek, but from MembershipUser we can get custom properties? – Edwin Rivera May 14 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.