Hi,
You can try some PowerShell script like this.
$userfile = "C:\temp\user.csv"
$infofile = "C:\temp\info.txt"
Import-Csv -Path $userfile | ForEach-Object {
$_.users
$pattern = [regex]::new('^.+(?=@)')
$user=$pattern.Matches($_.users).Value
net user $user /domain | Where-Object {$_ -match "Password"}
""
} | Out-File -FilePath $infofile
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.