Blog Post

Core Infrastructure and Security Blog
1 MIN READ

Who has Not Registered for SSPR

AMARSIGLIA's avatar
AMARSIGLIA
Icon for Microsoft rankMicrosoft
Nov 01, 2019

First published on MSDN on Oct 08, 2014

The Following script can be used to determine who has not Registered for Self Service Password Reset for Forefront Identity Manager 2010 R2 Special thanks to Markus Vilcinskas

 

The Following script was inspired by Mr. Vilcinskas posted script http://social.technet.microsoft.com/wiki/contents/articles/3616.how-to-use-powershell-to-export-all-users-who-have-registered-for-self-service-password-reset-sspr.aspx

 


set-variable -name URI -value " http://localhost:5725/resourcemanagementservice' " -option constant

 

set-variable -name CSV -value "NotRegistredResetPassUsers.csv"

 

clear

 

If(@(Get-PSSnapin | Where-Object {$_.Name -eq "FIMAutomation"} ).count -eq 0) {Add-PSSnapin FIMAutomation}

 

$WFDFilter = "/WorkflowDefinition[DisplayName='Password Reset AuthN Workflow']"

 

$curObjectWFD = export-fimconfig -uri $URI –onlyBaseResources -customconfig ($WFDFilter) -ErrorVariable Err -ErrorAction SilentlyContinue

 

$WFDObjectID = (($curObjectWFD.ResourceManagementObject.ResourceManagementAttributes | Where-Object {$_.AttributeName -eq "ObjectID"}).value).split(":")[2]

 

$Filter = $Filter = "/Person[not(AuthNWFRegistered = '9c3aca59-a85c-437f-bb67-9ce5a70521d7')]"

 

$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 "DisplayName" $UserDisplayName

 

$Users += $ResetPass

 

}

 

$users | export-csv -path $CSV

 

 

 

## http://blogs.msdn.com/connector_space ##

 

NotRegistredResetPassUsers.ps1

Updated Feb 20, 2020
Version 3.0
No CommentsBe the first to comment