(Title of Nugget (chronological in course), Description of Cmdlet, Cmdlet(s)) Planning for eDiscovery, Retention, and Data Loss Prevention (DLP) # Create eDiscovery mailbox New-MailboxSearchResults Discovery UserPrincipalName SearchResults@CBTNuggets.com Planning for Client Requirements and Outlook Web Access (OWA) # Sets OWA Mailbox policy to allow .pdf files Set-OWAMailboxPolicy Identity Default AllowedFileTypes .pdf Planning for Exchange ActiveSync (EAS) and Documenting Planning Findings # Retrieve list of devices in organization using Exchange Active Sync Set-OWAMailboxPolicy Identity Default AllowedFileTypes .pdf Configuring MRM In-Place Archiving # Enable in-place archiving Enable-Mailbox User Name Archive # Check mailboxes enabled for archiving Get-Mailbox Archive ResultSize Unlimited # Disable in-place archive Disable-Mailbox Identity User Name Archive # (1) Retrieve GUID, (2) then connect disabled archive to mailbox user by replacing GUID with one retrieved in (1) (1) Get-MailboxDatabase | Get-MailboxStatistics-Filter DisconnectDate ne $null (2) Connect-Mailbox Identity 8734c04e-981e-4ccf-a547-1c1ac7ebf3e2 Archive User User Name Configuring MRM Retention Tags and Policies # Connect to your Exchange Online service Connect-MSolService # (1)Create and (2)change a retention policy (1) New-RetentionPolicy<Name> -RetentionPolicyTagLinks <list of retention tags> (2) Set-MailBox Mailbox Name RetentionPolicy Retention Policy Name # Change policy for all mailboxes Get-Mailbox ResultSize unlimited | Set-Mailbox -RetentionPolicy Retention Policy Name #Change old retention policy to new one $OldPolicy={Get-RetentionPolicy "Old-Retention-Policy"}.distinguishedName Get-Mailbox -Filter {RetentionPolicy -eq $OldPolicy} -Resultsize Unlimited | SetMailbox -RetentionPolicy "New-Retention-Policy" # Test whether mailbox policy was applied Get-Mailbox Mailbox Name | Select RetentionPolicy Configuring MRM eDiscovery and In-Place Holds # Create additional discovery mailbox
Searchresults@cbtnuggets.com # Display available discovery mailboxes Get-Mailbox -Resultsize unlimited -Filter {RecipientTypeDetails -eq "DiscoveryMailbox"} # Create In-place hold New-MailBoxSearch Search Name SourceMailboxes Kengle@cbtnuggets.com InPlaceHoldEnabled $true Configuring Malware Filters in Exchange Online Protection (EOP) # Create new malware filter New-MalwareFilterPolicy -Name "CBT Nuggets Defense System" -EnableInternalSenderAdminNotifications $true InternalSenderAdminAddress admin@cbtnuggets346.onmicrosoft.com # Configure existing malware filter Set-MalwareFilterPolicy Identity CBT Nuggets Defense System Configuring Additional Email Addresses # Connect to your Exchange Online service Connect-MSolService Credentials $Credentials # Configure additional proxy addresses $users = Get-Mailbox foreach ($a in $users) {$a.emailaddresses.Add("smtp:$ ($a.alias)@thenewdomainname")} $users | %{Set-Mailbox $_.Identity -EmailAddresses $_.EmailAddresses} #Configure additional addresses using .csv file Import-CSV "C:\Users\Administrator\Desktop\AddEmailAddress.csv" | ForEach {Set-Mailbox $_.Mailbox -EmailAddresses @{add=$_.NewEmailAddress}} Working with Mail Contacts # Create contacts using PowerShell with a .csv file Import-Csv .\ExternalContacts.csv|%{New-MailContact -Name $_.Name -DisplayName $_.Name ExternalEmailAddress $_.ExternalEmailAddress -FirstName $_.FirstName -LastName $_.LastName} # Add more information to each existing contact using .csv file (1) $Contacts = Import-CSV .\externalcontacts.csv (2) $contacts | ForEach {Set-Contact $_.Name -StreetAddress $_.StreetAddress -City $_.City StateorProvince $_.StateorProvince -PostalCode $_.PostalCode -Phone $_.Phone -MobilePhone $_.MobilePhone -Pager $_.Pager -HomePhone $_.HomePhone -Company $_.Company -Title $_.Title -OtherTelephone $_.OtherTelephone -Department $_.Department -Fax $_.Fax -Initials $_.Initials -Notes $_.Notes -Office $_.Office -Manager $_.Manager} # Hide contacts using PowerShell Set-MailContact <contact name> HiddenFromAddressListsEnabled $true Get-Contact -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'MailContact')} | SetMailContact -HiddenFromAddressListsEnabled $true
Configuring Mail Users and Shared Mailboxes
# Create and configure a mail user using PowerShell New-MailUser -Name <name> -WindowsLiveID <Microsoft ID> -Password (ConvertToSecureString -String '<password>' -AsPlainText -Force) Set-MailUser LindaAdams-ExternalEmailAddress LindaAdams@cbtnuggets.org # Create and configure a shared mailbox using PowerShell New-Mailbox -Name "CBT Nuggets Trainers" -Alias CBTNTrainers Shared Set-Mailbox CBTNTrainers -ProhibitSendReceiveQuota 5GB -ProhibitSendQuota 4.75GB -IssueWarningQuota 4.5GB # Manage Mailbox permissions using PowerShell Remove-MailboxPermission -Identity <Mailbox ID1> -User <Mailbox ID2> -AccessRights FullAccess Add-MailboxPermission -Identity Kengle -User 'Kurt Engle' -AccessRight FullAccess InheritanceType All -Automapping $false Configuring Equipment and Room Mailboxes # Create and configure a room mailbox user using PowerShell New-Mailbox -Name "Second Floor Back Patio" Room Set-CalendarProcessing <Identity> -AutomateProcessing AutoAccept #Create and configure an equipment mailbox using PowerShell New-Mailbox -Name "Trainer Laptop Tag BR549" Equipment Set-CalendarProcessing <Identity> -AutomateProcessing AutoAccept #Change Mailbox type Set-Mailbox <mailboxname> -Type Regular Get-Mailbox -Identity <mailboxname> | Format-List RecipientTypeDetails Configuring Distribution and Security Groups # Create and view a mail-enable security group using PowerShell New-DistributionGroup -Name "CBT Nuggets Trainers" -Alias CBTNTrainers -Type security Get-DistributionGroup CBTNTrainers | FL Name,RecipientTypeDetails,PrimarySmtpAddress # Create a mail-enable distribution group using PowerShell New-DistributionGroup -Name "CBTN Managers" -Alias CBTNMngrs MemberJoinRestriction Open # Create and view a dynamic distribution group using PowerShell New-DynamicDistributionGroup -IncludedRecipients MailboxUsers -Name "CBTN Marketing Dynamic Group" -Department Marketing Get-DynamicDistributionGroup -Identity "Marketing" | Format-List Managing SharePoint Online Using PowerShell # Connect to your SharePoint Online service using PowerShell Connect-SPOService -Url https://cbtnuggets346-admin.sharepoint.com credential brianalderman@cbtnuggets346.onmicrosoft.com # Retreive list of available site templates using PowerShell Get-SPOWebTemplate # Create new site collection using PowerShell
Engle@cbtnuggets346.onmicrosoft.com Template STS#0 -Title HR Site # Retrieve information about site collection using PowerShell Get-SPOSite or Get-SPOSite Identity SiteCollectionUrl #Configure site collection settings using PowerShell Set-SPOSite Identity https://cbtnuggets346.sharepoint.com/teams/HR StorageQuota 750 -StorageQuotaWarningLevel 500 # Delete or restore a site collection using PowerShell Remove-SPOSite -Identity https://cbtnuggets346.sharepoint.com/teams/HR -NoWait Restore-SPODeletedSite -Identity https://cbtnuggets.sharepoint.com/teams/HR -NoWait Configuring Lync Online # Enable or Disable push notifications using PowerShell Set-CsPushNotificationConfiguration EnableApplePushNotificationService or EnableMicrosoftPushNotificationService # Retrieve information about Lync Online users using PowerShell Get-CsOnlineUser # Assign audio conference number to a user using PowerShell Set-CSUserAcp -TollNumber, -TollFreeNumbers, -ParticipantPassCode # Retrieve information about Lync Tenant using PowerShell Get-CsTenant # Enable or disable ability to record online conferences using PowerShell Set-CsMeetingConfiguration AllowConferenceRecording # Retrieve list of blocked domains from blocked domains list using PowerShell Get-CsTenantFederationConfiguration # Enable or disable federation with public IM providers using PowerShell Set-CsTenantFederationConfiguration AllowPublicUsers Office 365 Reporting # Enable mailbox auditing for a specific user using PowerShell Set-Mailbox user@domainname.com -AuditEnabled $true # Enable mailbox auditing for all users using PowerShell $UserMailboxes = Get-mailbox -Filter {(RecipientTypeDetails -eq 'UserMailbox')} $UserMailboxes | ForEach {Set-Mailbox $_.Identity -AuditEnabled $true} # View configuration settings for current administrator audit logging Get-AdminAuditLogConfig # Add comments to administrator audit log Write-AdminAuditLog # Search content of administrator audit log Search-AdminAuditLog or New-AdminAuditLogSearch # View accounts that bypass mailbox audit logging Get-MailboxAuditBypassAssociation
# Specify accounts that bypass mailbox audit logging
Set-MailboxAuditBypassAssociation # Retrieve data from a specific message tracking report Get-MessageTrackingReport # Find unique message tracking report using search criteria provided Search-MessageTrackingReport # View information about open logon sessions to specified mailbox Get-LogonStatistics # View information about the folders in a specified mailbox Get-MailboxFolderStatistics # View information about a specified mailbox Get-MailboxStatistics # View information about total number of recipients in organization Get-RecipientStatisticsReport
URLs Discussed in Enabling Office 365 Services (70347)