Unsorted Tidbits

Standard

#You need to verify if free/busy information sharing with external is enabled.
Get-OrganizationRelationship
# References: Microsoft Support | Microsoft Technet

#Use the New-MailboxAuditLogSearch cmdlet to search mailbox audit logs and have search results sent via e-mail to specified recipients.
New-MailboxAuditLogSearch
#Reference: Microsoft Technet

Start-ManagedFolderAssistant

Standard

Reference: https://technet.microsoft.com/en-us/library/aa998864(v=exchg.160).aspx

Start-ManagedFolderAssistant

Applies to: Exchange Online, Exchange Server 2016

This cmdlet is available in on-premises Exchange Server 2016 and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.

Use the Start-ManagedFolderAssistant cmdlet to immediately start messaging records management (MRM) processing of mailboxes that you specify.

For information about the parameter sets in the Syntax section below, see Syntax.

This example processes the mailbox for a user with the alias Chris.

Start-ManagedFolderAssistant -Identity "Chris"

This example uses the Get-Mailbox command to retrieve all the mailboxes that resolve from the ambiguous name resolution (ANR) search on the string “Chr” in the domain DC01 (for example, users such as Chris Ashton, Christian Hess, and Christa Geller), and the results are piped to the Start-ManagedFolderAssistant cmdlet for processing.

Get-Mailbox -Anr Chr -DomainController DC01 | Start-ManagedFolderAssistant

The Managed Folder Assistant uses the retention policy settings of users’ mailboxes to process retention of items. This mailbox processing occurs automatically. You can use theStart-ManagedFolderAssistant cmdlet to immediately start processing the specified mailbox.

Mailbox Powershell (Basic Commands)

Standard

Basic Powershell for Mailbox

#Create a mailbox
Set-Mailbox “John Doe” -EmailAddresses @{Add=Johnny.Doe@acme.com}

#send as
Add-RecipientPermission –Identity “Boss Hog” –Trustee “Roscoe Coltrane” –AccessRights SendAs

#remove send as
Remove-RecipientPermission –Identity “Boss Hog” –Trustee “Roscoe Coltrane” –AccessRights SendAs

#send on Behalf
Set-Mailbox –Identity boss.hog@contoso347er.onmicrosoft.com –GrantSendOnBehalfTo
roscoe.coltrane@contoso347er.onmicrosoft.com

#full access to another mailbox
Add-MailboxPermission –Identity “Boss Hog” –User “Roscoe Coltrane” –AccessRights FullAccess
–InheritanceType all

#create a new shared mailbox
New-Mailbox –Shared –Name “Accounting” –DisplayName “Accounting” –Alias Accounting

#create an equipment mailbox
New-Mailbox –Name “CompanyHovercraft” -Equipment

#create a room mailbox
New-Mailbox –Name SydConf –DisplayName “Sydney Conference Room” -Room

#create a new mail contact
New-MailContact –Name “Thomas Andersen” –ExternalEmailAddress tandersen@adatum.com

#set additional email addresses for the contact
#Uppercase SMTP – defines the primary email address.
Set-MailContact –Name “Thomas Andersen” –EmailAddresses
“SMTP:tandersen@adatum.com”,”smtp:tandersen@tailspintoys.com”

#New Distribution Group
New-DistributionGroup –Name “ExampleDistGroup” –Alias ExampleDG –MemberJoinRestriction Open

# approval required for distribution group
Set-DistributionGroup –Identity “ExampleDistGroup” –MemberJoinRestriction
‘ApprovalRequired’

#create a security group
New-DistributionGroup –Name “ExampleSecurityGroup” –Alias ExSecGroup –Type Security

#create a dynamic distribution group
New-DynamicDistributionGroup –Name “AccountingDDG” –Alias “AccountingDDG”
–IncludedRecipients MailboxUsers -ConditionalDepartment “Accounting”

#Enable a mailbox for archiving
Enable-mailbox “Kim Akers” –Archive

#To Enable archives on all mailboxes that do not currently have archiving

Get-Mailbox –Filter {ArchiveStatus –Eq “None” –AND RecipientTypeDetails –eq
“UserMailbox”} | Enable-mailbox -Archive

#Retention Policy Tag
New-RetentionPolicyTag “Research-Default” -Type All -RetentionEnabled $true
-AgeLimitForRetention 180 -RetentionAction PermanentlyDelete

#Retention Policy
New-RetentionPolicy “Contoso General” –RetentionPolicyTagLinks “Research”,”Accounting”

#Set a mailbox to a retention policy
Set-Mailbox “Don Funk” –RetentionPolicy “ExamplePolicy”


Spam/Malware Related

Get-MalwareFilterPolicy
Set-MalwareFilterPolicy
New-MalwareFilterPolicy
Remove-MalwareFilterPolicy
New-MalwareFilterRule
Set-MalwareFilterRule
Enable-MalwareFilterRule
Disable-MalwareFilterRule

#Connection Filter policies
Get-HostedConnectionFilterPolicy
Set-HostedConnectionFilterPolicy

#Spam Filter policies
Get-HostedContentFilterPolicy
Set-HostedContentFilterPolicy
New-HostedContentFilterPolicy
Remove-HostedContentFilterPolicy

#Quarantine
#Example Get-QuarantineMessage | ? {$_.Senderaddress –like “*@adatum.com”}
Release-QuarantineMessage
QuarantineMessegae
Get-QuarantineMessageHeader
#Example
Get-QuarantineMessage –StartReceivedDate 07/20/2015 –EndReceivedDate 07/21/2015


Legal/Litigation Hold/eDiscovery

#Litigation Hold
Set-Mailbox kim.akers@contoso347er.onmicrosoft.com –LitigationHold $True
–LitigationDuration 180
#Litigation Hold All Mailboxes
Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq “UserMailbox”} |
Set-Mailbox -LitigationHoldEnabled $true -LitigationHoldDuration 90

#in place eDiscovery Hold
New-MailboxSearch –Name “Hold-Hovercraft” –SourceMailboxes Research –SearchQuery
“‘Hovercraft’ AND ‘Secret'” –InPlaceHoldEnabled $True
#to disable the “in place” eDiscovery Hold
Set-MailboxSearch “Hold-Hovercraft” –InPlaceHoldEnabled $false
#to remove the “in place” eDiscovery Hold
Remove-MailboxSearch “Hold-Hovercraft”


OWA/Active Sync

#OWA
Set-CasMailbox dan.jump@contoso347er.onmicrosoft.com –OwaEnabled $False
#disable active sync for all
Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq “UserMailbox”} |
Set-CasMailbox –OwaEnabled $False
enable active sync for a user
Set-CasMailbox dan.jump@contoso347er.onmicrosoft.com –OwaEnabled $True

#active sync
Set-CASMailbox –Identity don.funk@contoso347er.onmicrosoft.com –ActiveSyncEnabled $False
#disable active sync for all
Get-Mailbox -ResultSize Unlimited -Filter {RecipientTypeDetails -eq “UserMailbox”} |
Set-CasMailbox –ActiveSyncEnabled $False