Quantcast
Channel: Forum Microsoft Identity Manager
Viewing all articles
Browse latest Browse all 4767

Get date and time when a user registered for password reset

$
0
0

Hi All,

I am currently exporting a list of users who registered for Password reset into a CSV and recently needed to add the date and time of the registration. Does anyone know the path lookup that can get this value or where it would be stored ?

The current script looks like this.

set-variable -name URI -value "http://identity.fimservice.local:5725/resourcemanagementservice' " -option constant
set-variable -name CSV -value "c:\ps\RegisteredResetPassUsers.csv" -option constant
clear
If(@(Get-PSSnapin | Where-Object {$_.Name -eq "FIMAutomation"} ).count -eq 0) {Add-PSSnapin FIMAutomation}

$Filter = "/Person[AuthNWFRegistered = /Set[ObjectID = '7c866fd3-cf65-46cf-a198-4ea2f84980ec']/ComputedMember]"
$curObject = export-fimconfig -uri $URI –onlyBaseResources -customconfig ($Filter) -ErrorVariable Err -ErrorAction SilentlyContinue

[array]$users = $null
foreach($Object in $curObject)
{
    $ResetPass = New-Object PSObject
    $UserDisplayName = (($Object.ResourceManagementObject.ResourceManagementAttributes | Where-Object {$_.AttributeName -eq "DisplayName"}).Value)
    $ResetPass | Add-Member NoteProperty "Display Name" $UserDisplayName

    $jobTitle = (($Object.ResourceManagementObject.ResourceManagementAttributes | Where-Object {$_.AttributeName -eq "jobTitle"}).Value)
    $ResetPass | Add-Member NoteProperty "Job Title" $jobTitle

    $UserEmail = (($Object.ResourceManagementObject.ResourceManagementAttributes | Where-Object {$_.AttributeName -eq "email"}).Value)
    $ResetPass | Add-Member NoteProperty "Email" $UserEmail
    $Users += $ResetPass
}

$users | export-csv -path $CSV -NoTypeInformation

Rob

              


Rob


Viewing all articles
Browse latest Browse all 4767

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>