Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.
# 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)
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
20 Experts available now in Live!