Forum Discussion
SSPR via powershell?
Hey,
I have recently made a riport about the sspr via powershell. I had the userprincipal names in a txt file.
------------
Connect-MsolService
$path = "path of txt"
$Users = Get-Content $path
foreach ($User in $Users)
{
Get-MsolUser -UserPrincipalName $User.ToLower() | select DisplayName, PhoneNumber, Email| Export-Csv –Append -Force -Path "C:\Users\dmeszaros\Desktop\AzureAD\userprincipal_v4.csv" -NoTypeInformation
Get-MsolUser -UserPrincipalName $User.ToLower() | select -Expand StrongAuthenticationUserDetails | select DisplayName, PhoneNumber, Email | Export-Csv –Append -Force -Path "the path to save" -NoTypeInformation
}
----------------
The first is for initialize the columns in the csv and for the displayname to know the whom the authentication info belongs to because the next command wont get it so that gets the data from the authentication box.
For those who didn't registered, there won't be a second line so that they didn't registered.
Hope it helps.
- Chris JackettOct 24, 2018Copper Contributor
Hi,
StrongAuth does NOT mean the user has registered for SSPR. It only means a user has one or more StrongAuth fields set like Phone Number.
Just setting any of these fields without ever going through the SSPR registration process will still tag them as StrongAuth.