Silahkan ikuti cara berikut:
1.Create Csv File
Note :
1. Alias : For UserLogon windows
2. Name : For Account Email Name
3. UPN : For EmailAddress
Here is the script.
1.copy and paste to powershell, it should be prompt for password for all user in csv file.
# Set Password for all user in csv file
$Password=Read-Host “Enter Password” –AsSecureString
2.copy and paste to powershell
#Import User list and apply the rule
Import-CSV taxmfb.csv | ForEach {New-Mailbox -Alias $_.alias -Name $_.name -userPrincipalName $_.UPN -Database “BRONZE-3” -OrganizationalUnit "Head Office" -Password $Password}
Note:
Bronze-3 = Database mailbox
Head Office = OU
-Alias $_.alias -Name $_.name -userPrincipalName $_.UPN = Read list user from CSV file
2.copy and paste to powershell
#Import User list and apply the rule
Import-CSV taxmfb.csv | ForEach {New-Mailbox -Alias $_.alias -Name $_.name -userPrincipalName $_.UPN -Database “BRONZE-3” -OrganizationalUnit "Head Office" -Password $Password}
Note:
Bronze-3 = Database mailbox
Head Office = OU
-Alias $_.alias -Name $_.name -userPrincipalName $_.UPN = Read list user from CSV file
0 comments:
Post a Comment
komentar anda sangat berguna bagi saya..