Recover deleted emails with powershell

And the tip of the day! How to restore deleted items from users deletions-folder before it get's Purged. First see what format are you using for date: Get-Date  And then use this one-liner (Finnish format for date included :))  for search and dump the items to a restore mailbox: Search-Mailbox…continue reading →

Set Booking Window for all Room Mailboxes with powershell.

Connect to Exchange Online with powershell $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://ps.outlook.com/powershell/" -Credential $cred -Authentication Basic -AllowRedirection  Import-PSSession $session  To change: get-mailbox|where {$_.recipientTypeDetails -eq "roomMailbox"} | Set-CalendarProcessing -BookingWindowInDays 365 To check the windows: get-mailbox|where {$_.recipientTypeDetails -eq "roomMailbox"} | Get-CalendarProcessing | FL Identity,BookingWindowInDays continue reading →

Find Lync user with specific Line Uri

Quick tip of the day! Tried this one?   Get-CsUser –Filter {LineUri –eq "TEL:+3581234567"} And got error: It won't work. Try this one. Get-CsUser | Where-Object {$_.LineUri -like "TEL:+3581234567"} | ft -property DisplayName, LineURI And all is well!continue reading →

Clear Exchange 2013 Log Files based on age.

Clear logs in a single Exchange 2013 Server: Set-Executionpolicy RemoteSigned $days=30 #You can change the number of days here $IISLogPath="C:inetpublogsLogFiles" $ExchangeLoggingPath="C:Program FilesMicrosoftExchange ServerV15Logging" Write-Host "Removing IIS and Exchange logs; keeping last" $days "days" Function CleanLogfiles($TargetFolder) {     if (Test-Path $TargetFolder) {         $Now = Get-Date         $LastWrite = $Now.AddDays(-$days)        …continue reading →

Add or Remove Bulk permissions to Exchange mailboxes.

Lets see How to Change Calendar Permissions in Bulk . To Restrict Free/busy or Allow Free/busy How to Get Calendar Permissions For a Specific Mailbox ? Default Calendar permissions of a Mailbox Get-MailboxFolderPermission –Identity “EmailAddress”:calendar |fl How to Change (Allow/Restrict) Calendar Permission for a Specific Mailbox ? To Allow Free/busy…continue reading →

Increase the maximum MAPI session limit from 32 concurrent to 5000 concurrent

Outlook 2013 works differently, but Legacy clients need modifications to server side. In Exchange 2013: Create Throttling Policy and apply it to all mailboxes: [crayon-5dd5be1081fbd103611654/] Then add registry key (below is for 5000 concurrent connections): [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem]"Maximum Allowed Sessions Per User"=dword:00001388 Then restart Information Store service.continue reading →