Tech Support Guy banner
Status
Not open for further replies.

What is wrong with this powershell script?

692 views 0 replies 1 participant last post by  ksham1985 
#1 ·
# Need to create 100 mailboxes using the powershell script"


$DefaultPW = read-host "Enter Password" -AsSecureString

import-csv "C:\ExchangeTest1.csv" | Foreach-object {

$Fname = $_.FName
$LName = $_.LName
$User = $_.Username


New-Mailbox -UserPrincipalName $User@canips.pri -Alias $User -Database "MB1" -Password $DefaultPW -FirstName $FName -LastName $LName -ResetPasswordOnNextLogon $true



}
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top