Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Write-Host 'BPOS Admin Username: '
- $bposlogin = Read-Host
- Write-Host 'BPOS Admin Password:'
- $bpospwd = read-host -assecurestring
- $bposcred = new-object -typename System.Management.Automation.PSCredential -argumentlist $bposlogin, $bpospwd
- import-csv .\Passwords.csv | foreach {
- Set-MSOnlineUserPassword -Identity $_.user -Password $_.pass -ChangePasswordOnNextLogon:$false -Credential $bposcred | fl Identity
- Get-MSOnlineUser $_.user -Credential $bposcred | fl Identity, PasswordExpirationDate
- }
Add Comment
Please, Sign In to add comment