http://o365info.com/manage-office-365-users-password-using/
Notice the use of $_. to refer to columns in a CSV file
Set a Predefined Password for Office 365 user
PowerShell command Syntax
Set a Predefined Password for Office 365 users imported from a CSV File
Step 1:
Step 2:
Creating a new user and password from a CSV file
Notice the use of $_. to refer to columns in a CSV file
Set a Predefined Password for Office 365 user
PowerShell command Syntax
Set-MsolUserPassword –UserPrincipalName <UserPrincipalName> –NewPassword <New Password> -ForceChangePassword $False
Set a Predefined Password for Office 365 users imported from a CSV File
Step 1:
Get-MsolUser | Select UserPrincipalName|Export-CSV C:\Temp\o365users.csv
Step 2:
Import-CSV C:\Temp\o365users.csv |%{Set-MsolUserPassword -userPrincipalName $_.UserPrincipalName –NewPassword AbcAs123 -ForceChangePassword $False}
Creating a new user and password from a CSV file
Import-CSV –Path C:\Temp\users.csv| ForEach-Object { New-MsolUser -UserPrincipalName $_.UserPrincipalName -FirstName $_.FirstName -LastName $_.LastName -DisplayName "$($_.FirstName) $($_.LastName)" –Password $_.Password –UsageLocation “AU” }
Comments
Post a Comment