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) } `

1 Answer 1

3

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)"
}
1
  • Thank you Marek, but from MembershipUser we can get custom properties? Commented May 14, 2019 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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