Показаны сообщения с ярлыком Exchange Online. Показать все сообщения
Показаны сообщения с ярлыком Exchange Online. Показать все сообщения

пятница, 6 января 2017 г.

Disable Outlook Auto-Mapping with Full Access Mailboxes

Понадобилось мне теперь отключить авто подключение ящика DiscoverySearchMailbox

Ссылка на оригинальную статью https://technet.microsoft.com/ru-ru/library/dn750894(v=exchg.150).aspx

Синтаксис powershell продолжает радовать беспредельно :(

ExOn01

Вообще строка выглядит вот так

Add-MailboxPermission -Identity "DiscoverySearchMailbox{D919BA05-46A6-415f-80AD-7E09334BB852}@yourdomain.com" -User 'user@yourdomain.onmicrosoft.com' -AccessRight FullAccess -InheritanceType All -Automapping $false

Отключаем авто мапинг ящика DiscoverySearchMailbox бла бла бла (смотрие в консоли как у вас назыается) для пользователя user.

Внимание на двойные кавычки в которые заключен Discovery…..

Но это еще не все!

  • Надо в панели управления рабочей станции в почте удалить учетную запись Outlook
  • Удалить старый ost файл
  • Создать учетную запись заново
  • А еще лучше полностью удалить всю конфигурацию Outlook

Класс!

вторник, 27 декабря 2016 г.

Еще немного команд PowerShell для Exchange OnLine

На всякий случай напомню, что если вы осуществляете поиск в организации, где присутствуют несколько доменов, то сначала необходимо выполнить команду:

Set-ADServerSettings -ViewEntireForest $true

Параметр -ResultSize:Unlimited   нужен если у вас более 1000 ящиков

Получить список всех пользователей по DisplayName

Get-Mailbox -ResultSize:Unlimited | Select DisplayName

Получить список всех пользователей по DisplayName с сортировкой по имени

Get-Mailbox -ResultSize:Unlimited | sort DisplayName | Select DisplayName

Статистика по количеству писем в ящиках, отсортировано по DisplayName

Get-Mailbox -ResultSize:Unlimited | Get-MailboxStatistics | sort DisplayName

Статистика по каждому ящику по параметрам количества писем и размеру ящика, сортируем по DisplayName и показываем данные списком по каждому пльзователю

Get-Mailbox | Get-MailboxStatistics | sort DisplayName | fl DisplayName,ItemCount,TotalItemSize

То же самое, но только в табличном виде

Get-Mailbox | Get-MailboxStatistics | sort DisplayName | ft DisplayName,ItemCount,TotalItemSize

Но больше всего меня радует вот такой синтаксис того как вывести данные о размере ящиков в Exchange OnLine с сортировкой по размеру ящиков

Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Select DisplayName, '@{name=”TotalItemSize (MB)”; expression={[math]::Round('($_.TotalItemSize.ToString().Split(“(“)[1].Split(” “)[0].Replace(“,”,””)/1MB),2)}}, ' ItemCount | Sort “TotalItemSize (MB)” -Descending

Всего-то и надо набрать строчку в полкилометра :) Проще простого!

Выводим общее количество почтовых ящиков

(Get-Mailbox -ResultSize Unlimited).Count 

Ссылки по теме:

https://msdn.microsoft.com/en-us/powershell/scripting/getting-started/cookbooks/using-format-commands-to-change-output-view

https://msdn.microsoft.com/en-us/powershell/scripting/powershell-scripting

https://blogs.technet.microsoft.com/heyscriptingguy/2013/02/27/get-exchange-online-mailbox-size-in-gb/

среда, 21 декабря 2016 г.

Подключение к Exchange OnLine 2016 при помощи PowerShell

 

1) Скачать дистрибутив Exchange 2016 тут https://www.microsoft.com/en-us/download/details.aspx?id=49161

Примечание: узнать весрию powershell можно командой $host.version

Дистриб весит дофига но нам надо только Admin Tools (Management Tools)

Как их ставить есть в этой статье https://technet.microsoft.com/ru-ru/library/bb232090(v=exchg.160).aspx

EX0001EX0002EX0003

EX0004EX0005EX0006EX0007EX0008EX0009EX0010EX0011EX0012EX0013EX0014EX0015EX0016EX0017EX0018

Вот и вышла такая фигня. То есть комп должен быть включен в домен, чтобы установить EMC. А нафига козе боян??? Домашний комп вгонять в домент????

На самом деле можно и безо всего этого обойтись на любой машине с Win 8/8.1/10. Для того чтобы подключиться к Exchange по PowerShell.

Делаем всего 4 команды:

set-executionpolicy unrestricted

$cred = Get-Credential и далее вводим логин пароль в появившемся окне

EX0019

$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic -AllowRedirection

EX00120

Import-PSSession $session

EX00121

Для проверки можно дать команду Get-Mailbox

В результате должны получить список всех почтовых ящиков.

EX00122

Но на этом еще не happy end :)

Чтобы допустим использовать команду Search-Mailbox и тем более с параметром -Deletecontent необходимо даже администратора Exchange добавить в группы обладающие соответствующими разрешениями:  Compliance Administrator и eDiscovery Management.

EX00123

И далее немного ссылок по теме:

Включение или отключение восстановления одного элемента в почтовом ящике https://technet.microsoft.com/ru-ru/library/ee633460(v=exchg.150).aspx

Set-Mailbox -Identity "ns" -SingleItemRecoveryEnabled $false  (отключаем для ящика ns)

Проверяем:

Get-Mailbox "ns" | FL SingleItemRecoveryEnabled,RetainDeletedItemsFor

EX00124

Поиск и удаление сообщений https://technet.microsoft.com/ru-ru/library/ff459253(v=exchg.150).aspx

Удаление всех отправленных и полученных писем за указанный промежуток времени для ящика ep

Search-Mailbox -identity "ep" -searchquery {sent:01/01/2010..01/01/2014} -Deletecontent

Search-Mailbox -identity "ep" -searchquery {received:01/01/2010..01/01/2014} -Deletecontent

Чтобы удалить письма в ящике окончательно и бесповоротно, надо во первых отключить политики сохранения для этих ящиков, во вторых выключить восстановление одного элемента в ящике и затем уже тереть ящик по нужным параметрам. Как в примерах выше.

понедельник, 27 января 2014 г.

How to centrally set the calendar access rights in Exchange 2010

 

by Thomas Forsmark Sørensen 2. June 2010 02:34

In exchange 2003 or Exchange 2007 you had to use PFADMIN to centrally set the rights on the users calendars, or you had to open every mailbox and set the rights on the calendar.

(Setting the user rights on the calendar is the same as what is happening when you share a calender from Outlook. It will then add the rights for the user to the calendar).

PFADMIN is not supported on Exchange 2010 because Exchange 2010 does not support WebDAV. (a replacement for PFADMIN can be found here that will support Exchange 2007 and Exchange 2010)

Starting with Exchange 2010 the calendar rights can be set centrally "out of the box". This can be done with the "Add-MailboxFolderPermission" cmdlet. 

The actual permissions for a calendar can be viewed using the "Get-MailboxFolderPermission" command, and permissions can be removed using the "Remove-MailboxFolderPermission" command.

Examples

The following command will give everybody read rights to the calender in the "MeetingRoom" calendar.

Add-MailboxFolderPermission MeetingRoom@domain.local:\calendar -User Default -AccessRights reviewer

The following command will give the users that are members of the AD group Res-CalendarAdmins read and write access to the calendar. (The AD group must be mail enabled and cannot be hidden from the address book when executing the command).

Add-MailboxFolderPermission MeetingRoom@domain.local:\calendar -User Res-CalendarAdmins -AccessRights editor

The following command will remove access rights for the default user on mailbox

Remove-MailboxFolderPermission MeetingRoom@domain.local:\calendar -User Default -AccessRights editor

The following command will show the actual rights to the calendar for the MeetingRoom.

Get-MailboxFolderPermission MeetingRoom@domain.local:\calendar

и мой примерчик

установить разрешения для всех (пользователь по умолчанию) на просмотр деталей резервирования комнаты

Set-MailboxFolderPermission room3floor@yourdomain.com:\calendar -User Default -AccessRights Reviewer

http://tfs.letsblog.it/post/2010/06/02/How-to-centrally-set-the-calendar-access-rights-in-Exchange-2010.aspx

 

и вот еще полезная ссылка

http://blog.crayon.no/blogs/janegil/archive/2010/09/20/managing-calendar-permissions-in-exchange-server-2010.aspx

ну и эта тоже

 http://technet.microsoft.com/en-us/library/ff522363.aspx

посмотреть права на папку календарь в комнате

Get-MailboxFolderPermission -Identity room1floor@yourdomain.com:\calendar

удалить права пользователя

Remove-MailboxFolderPermission -Identity room1floor@yourdomain.com:\calendar -User youruser@yourdomain.com

пятница, 9 августа 2013 г.

Как подключить PowerShell к Exchange Online (Office365)

 

Шаг 1

http://help.outlook.com/en-us/140/cc952756.aspx

Шаг 2

http://help.outlook.com/en-us/140/cc952755.aspx

если команда

Import-PSSession $Session


выдает ошибки то делаем так



http://rhoranburg.wordpress.com/2012/08/15/windows-powershell-for-office-365-error-cannot-be-loaded-because-the-execution-of-scripts-is-disabled-on-this-system/



When running the command “Import-PSSession $Session” it would return the error message below.




…cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details. then follow these steps to resolve it.




To resolve this, first check the current policy and then change it to unrestricted.



1. Check policy with the command:




Get-ExecutionPolicy




2. If it returns “Restricted”, then change it to unrestricted with the command




Set-Executionpolicy -ExecutionPolicy Unrestricted




3. Boom, works now.