Basic Exchange PowerShell command

_______________________________________________________________________________
1. Установка PrimarySmtpAddress в Exchange

get-mailbox a.petrov | fl name, alias, primarysmtpaddress, emailaddresses

Name : Петров Андрей Вячеславович 
Alias : A.Petrov
PrimarySmtpAddress : A.Petrov2@domain.ru
EmailAddresses : {smtp:a.petrov@domain.ru, SMTP:A.Petrov2@domain.ru}
set-Mailbox a.petrov -PrimarySmtpAddress a.petrov@domain.ru

WARNING: Couldn’t update the primary SMTP address because this mailbox is configured to use an e-mail address policy.
To disable the e-mail address policy for this mailbox, run the command with the EmailAddressPolicyEnabled parameter set
to $false.
добавьте к команде этот параметр: -EmailAddressPolicyEnabled $false
________________________________________________________________________________
2. Копирование ящика в .pst файл 

New-MailboxExportRequest -Mailbox Bart -FilePath \\LONEX1\PSTFileShare\Bart_Mailbox.pst
______________________________________________________________________
3. Создание почтового ящика существующему пользователю в AD.
The following command enables mailbox for an existing Active Directory user (Bart)with the domain and alias combination adatum\Bart by creating mailbox in the mailboxdatabase named MailboxDatabase:
Enable-Mailbox -Identity adatum\Bart -Database MailboxDatabase
________________________________________________________________________________________
4. The following command creates mailbox database named MailboxDatabase on theserver LON-EX1:
New-MailboxDatabase -Name MailboxDatabase -Server LON-Ex1 __________________________________________________________________________________________
5. The following command creates query-based dynamic distribution grounamed DDGthat is located in the organizational unit (OU) and has the alias DDGAlias:
New-DynamicDistributionGroup -Name DDG -Alias DDGAlias -OrganizationalUnit OU -IncludedRecipients MailboxUsers
___________________________________________________________________________________________________
6.The following command creates move request for the mailbox associated with the aliasuser1 to the mailbox database named Executives:
New-MoveRequest -Identity 'user1'-TargetDatabase Executives ________________________________________________________________________________________7.Перенос почтового базы данных на другую букву Move-DatabasePath –Identity “MB2” –EdbFilePath C:\_DB2\MB2\MB2.edb –LogFolderPath G:\Logs\DB1_________________________________________________________________________________________
8. Список действующих ящиков, находящихся в базе:
Get-Mailbox | Where {$_.Database -eq "Base1"}
Get-Mailbox | select -expand EmailAddresses | %{$_.SmtpAddress} | sort | Out-File C:\scripts\all_mailbox.txt
Dismount-Database Base1

Комментарии

Популярные сообщения из этого блога

У вас нет прав для отправки сообщения вместо указанного пользователя. Ошибка: [0x80070005-0x0004dc-0x000524]

Поиск и удаление писем в ящиках Exchange Server

KSMG Подготовка конфигурационных файлов для подключения к LDAP