How can I update user's Identify provider column using PowerShell?
Get-PWUsersByMatch doesn't automatically include that info unless you ask for it with -LoginInfo which may be related to allowing the command to be run by non-admins.
Bill
I want to update each user's identity property with their email address in order to enable Bentley IMS authentication. So I was looking for a powershell function to update each user's identity property with their email address
Take a look at the following two cmdlets:
I have tried it. Program is running fine, but it is not saving into the system. I am still getting users without identity even after executing the script.
$users = Get-PWUserByLastLogin -IdentityInfo -Verbose
foreach($user in $users){ if($user.Type -ne 'Logical' -and $user.Email -ne '') { if($user.Identity -ne $user.Email) { $user.Identity #$user.Email Set-PWUserIdentity -Users $user -Identity $user.Email -Verbose } }}
Have you verified this against the user accounts within PW Administrator? I don't think the cmdlet is returning the identity data.