# NOTE: to run PowerShell scripts, you need to set the PS execution poloicy "set-executionpolicy unrestricted" # load the list of users - this must be 1 user alias per line # the user list file must be in the same directory as this script $users = get-content MoveMbx1.txt # move em to a specific target database using 10 threads $users | move-mailbox -TargetDatabase "MailboxServer\StorageGroup01\MailboxStore01" -MaxThreads 10 -confirm:$false # put today's date in a variable $date=get-date -uformat "%Y%m%d" # read today's migration log and store it as $EMailBody $EmailBody = get-content "C:\*$date*.xml" # when done, send us an email with the log text $SmtpClient = new-object system.net.mail.smtpClient $MailMessage = New-Object system.net.mail.mailmessage $SmtpClient.Host = "smtpserver.domain.com" $mailmessage.from = ("<emailaddress>@domain.com") $mailmessage.To.add("<emailaddress>@domain.com") $mailmessage.Subject = “MoveMbx1.ps1 script has completed” $mailmessage.Body = $EmailBody $smtpclient.Send($mailmessage)
|Need a script to get all the disabled accounts in an OU||4||31|
|PowerShell script problem reading reg key data||7||22|
|powershell script example of appending data to a csv file (new tab)||2||15|
|What language/protocol is the Angular Chat?||2||11|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
19 Experts available now in Live!