Power shell connectivity :
Connect-EXOPSSession -UserPrincipalName Prabakaran.Alagesan-ext@ab-Inbev.com
__________________________________________________________________________
<<Full Access>>cloud
Add-MailboxPermission -identity Supplier.portal@ab-inbev.com -User
Austin.Moreira@za.ab-inbev.com -AccessRights fullaccess -AutoMapping:$True
-----------------------------------------------------------------------------------
-----------------
To get mailbox status with information
(get-MsolUser -UserPrincipalName
armando.marin@marelli.com).Licenses[0].ServiceStatus
-----------------------------------------------------------------------------------
---------------------
To change UPN id for GID switch User:
Template :   Set-MsolUserPrincipalName -UserPrincipalName "" -NewUserPrincipalName
""
Set-MsolUserPrincipalName -UserPrincipalName "CKS00403@calsonickansei.co.jp" -
NewUserPrincipalName "CKJ35091@calsonickansei.co.jp"
-----------------------------------------------------------------------------------
-------------------------------------------------------
Remove access
remove-MailboxPermission -identity election2020@nbcuni.com -User 206588582   -
AccessRights fullaccess -confirm:$false
___________________________________________________________________________________
___________________________________________________
<<Send as>> cloud user
Add-RecipientPermission -Identity Supplier.portal@ab-inbev.com -Trustee
Austin.Moreira@za.ab-inbev.com -AccessRights SendAs -confirm:$false
-----------------------------------------------------------------------------------
----------------------------------------------------------
Remove Send as access
Remove-RecipientPermission -Identity Supplier.portal@ab-inbev.com -Trustee
Austin.Moreira@za.ab-inbev.com -AccessRights SendAs -confirm:$false
___________________________________________________________________________________
_______________________________________________________
<<<<<Contacts and tasks ( calender contact and task)
Add-MailboxfolderPermission -identity 206445120:\contacts -User 206636416 -
AccessRights editor
___________________________________________________________________________________
_________________________________________________-
<<<<<<<<<<<<<<<<Calendar
Add-MailboxfolderPermission -identity election2020@nbcuni.com:\calendar -User
206636416 -AccessRights Editor
Restamp or reapply permission
set-MailboxfolderPermission -identity election2020@nbcuni.com:\calendar -User
206636416 -AccessRights Editor
___________________________________________________________________________________
__________________________________________________
<<<<OOO( Out Of OFFICE)
Set-MailboxAutoReplyConfiguration 206639928 -AutoReplyState enabled -
InternalMessage "Message OOO" -ExternalMessage "Message OOO"
-----------------------------------------------------
TO CHECK OOO.
Get-MailboxAutoReplyConfiguration -Identity 206630351
-----------------------------------
To check audit enbled status for account
$FormatEnumerationLimit=-1
Get-Mailbox -Identity daniel.thierauf@marelli.com | Format-List *audit*
___________________________________________________________________________________
______________________________________________________
AUTOFORWARDING
Set-Mailbox -Identity "Prabakaran.Alagesan-ext@ab-Inbev.com" -
DeliverToMailboxAndForward $true -ForwardingSMTPAddress "hema.jayasheelan-ext@ab-
inbev.com"
----------------------------------------------------------------
TO CHECK Forwarding:
Get-Mailbox Prabakaran.Alagesan-ext@ab-Inbev.com |fl
ForwardingSMTPAddress,DeliverToMailboxandForward
___________________________________________________________________________________
____________________________________
Disable auto -forwarding:
Set-Mailbox Prabakaran.Alagesan-ext@ab-Inbev.com -ForwardingAddress $NULL -
ForwardingSmtpAddress $NULL
___________________________________________________________________________________
__________________________________
<<<To check Whether user has full access to the mailbox.
Get-Mailboxpermission Supplier.portal@ab-inbev.com
--------------------------------------------------------
PUll the report who has FUll access in shared mailbox
Get-Mailboxpermission connect@AB-Inbev.com |Export-Csv New.csv
<<<To check Whether user has SendAs access to the mailbox.
Get-Recipientpermission Supplier.portal@ab-inbev.com
___________________________________________________________________________________
_____________________________________________________
<<<<<<<<<Health report commands
Test-ServiceHealth
Get-mailboxdatabasecopystatus
Get-Queue
___________________________________________________________________________________
___________________________________
Command for auto size.
| ft -autosize
Get-Mailboxpermission Supplier.portal@ab-inbev.com |ft -AutoSize
Migration status
Get-migrationuser user@domain.com
Status
Get-migrationuser user@domain.com |fl *stat*
___________________________________________________________
Exchange: An unknown error has occurred. Refer to correlation ID: afc72d98-ce84-
4ecd-963d-8c6f771aec6e.;
(Get-MsolUser -UserPrincipalName
armando.marin@marelli.com).errors[0].ErrorDetail.objecterrors.errorrecord.ErrorDesc
ription
Get-MsolUser -HasErrorsOnly | ft
UserPrincipalName,@{Name="Error";Expression={($_.errors[0].ErrorDetail.objecterrors
.errorrecord.ErrorDescription)}} -AutoSize
___________________________________________________________________________________
____________________-
<<Bulk SSO access.
$a = get-content $home\desktop\users.txt
foreach ($b in $a)
{
Add-MailboxfolderPermission -identity election2020@nbcuni.com:\calendar -User "$b"
-AccessRights Editor
}
___________________________________________________________________________________
__
<< Command to check accepted domain
Get-AcceptedDomain ab-inbev.com
______________________________________________________________________
<<Command to check max size
Get-Mailbox 206446807 |fl *max*
___________________________________________________________
<<Command to set mailbox size 0 | User shoud not send and recieve emails
>Set-Mailbox -Identity 206446807 -MaxReceiveSize 0 -MaxSendSize 0
__________________________________________________________________
<<On Cloud- command to trace the email.
Get-MessageTrace -RecipientAddress "internationalmediateam@nbcuni.com" -StartDate
"3/25/2020" -EndDate "4/24/2020"|Export-Csv hema1.csv
-_____________________________________________________
<<<Legacy command
Get-MailContact 206578973 | fl *legacy*
___________________________________________________
____________________________________________________________________
______________________________________________________
DYNAMIC DISTRIBUTION GROUP( To export the list of members)
$members = Get-DynamicDistributionGroup -Identity "DDL name"
Get-Recipient -resultsize unlimited -RecipientPreviewFilter
$members.RecipientFilter >>c:\DDL name.csv
                                OR
Get-Recipient -RecipientPreviewFilter (get-dynamicdistributiongroup <name of
group>).RecipientFilter | Select Displayname | Export-Csv "<path of target CSV
file>"
___________________________________________________________________________________
______________
To Hide from GAl
Set-Mailbox -Identity $_ -HiddenFromAddressListsEnabled $true
________________________________________________________________________________
To check the SMPT assisgned to the mailbox.
Get-Recipient Prabakaran.Alagesan-ext@ab-Inbev.com | select -ExpandProperty
emailaddresses
________________________________________________________________________
___________________________________________
________________________________________________________________
To HIDE THE FREE/BUSY.
Set-MailboxFolderPermission 206629756:\calendar -user default -AccessRights none
___________________________________________________________________
To show the free/busy.
Set-MailboxFolderPermission 206629756:\calendar -user default -AccessRights
AvailabilityOnly
____________________________________________________________
IF a mailbox is not synced to O365 shell..
Check the TFAYD object, if its not there, then check if its a linked master
account.
get-mailbox 206573426 | fl *link*
If the linked master account starts with S-1, run the below command
Set-User 206573426 -LinkedMasterAccount $null
Now convert to shared
Set-Mailbox 206573426 -Type Shared
___________________________________________________________________________________
__-
If the SSO gives an error on portal.office365.com(error - failed and lenghty
message)
$ID= [GUID]("a9a46634-5afc-440d-a120-3ecfec7988a4")
Set-ADUser 206638879 -Replace @{msExchArchiveGUID = $ID}
___________________________________________________________________________________
________________________
Commands to start and complete the migration.
 Start-MigrationBatch "September_6"
?
 Complete-MigrationBatch "September_6"
___________________________________________________________________________________
__
Weekly Mail Statistics report.
cd d:\adfind
now drag the file adfind and adfind.exe and the command.
Once the excel   is generated...open it, in Exchange server abd home DM, select the
column( select   the first row and drag the cursor down and press the last ro and now
hold control f   and change the field to replace, now except the server name copy the
rest and place   it in find filed and in replace filed give a sape and run it.)
once its done save the file and upload in sharepoint link.
___________________________________________________________________________________
_______________
Commands to get the folders in Mailbox.
 Get-MailboxFolderStatistics 206473028 | ft name,folderpath, *count, *size -
AutoSize
Command to check the policy applied on particular folder:
Get-MailboxFolderStatistics 206629495 | Select FolderPath,*Policy*,*size*
__________________________________________________________________________________-
RE-CONCILE
It should be linked    in on-prem ECP and in o365 ECP it should user(archive)
---- In O365
Get the details of email addresess and GUID values.
->Get-Recipient 206608074|select -ExpandProperty emailaddresses
Make a note of all the addresses
->Get-Recipient 206608074| fl *guid*
Make a note of Exchange and Archive guid values.
----In ON-PREM shell
->Disable-Mailbox 206608074
Confirmation -Yes
->Get-Recipient 206608074
To check whether it exists or not after disable
->Enable-RemoteMailbox 206608074 -RemoteRoutingAddress
206608074@nbcuni.mail.onmicrosoft.com
->Enable-RemoteMailbox 206608074 -Archive
->Set-User 206608074 -LinkedMasterAccount    TFAYD\206608074 -LinkedDomainController
aoadcwp00021.TFAYD.com
now link the mailbox
->IN ADSIET- change the mailnickname to SSO.
->Set-RemoteMailbox    206608074 -ArchiveGuid 54667ab3-8fbf-4398-9757-52ff305883c7
->Set-RemoteMailbox    206608074 -ExchangeGuid c6a7496e-7a54-4912-b0f4-5218b9e0aa9f
----In ON PREM ECP.
->Update the email addresses.
You made a note of which in the intial step.
Drop an email to IDM ,reconcile is done and check with after 3to 4 hours.
Close the ticket.
________________________________________________________________________
Export path:
\\tfayd.com\shared\platform_engineering_ec\us-aoa\share\Messaging
___________________________________________________________________________________
_____
Inbox Rule.
 Get-InboxRule -Mailbox tebogo.malapane@za.ab-inbev.com
-------------------------------------------
get inbox rule properties:
Get-InboxRule -Mailbox tebogo.malapane@za.ab-inbev.com|fl
---------------------------------------------------------
Remove AllInbox rule with Identity
remove-InboxRule -Mailbox tebogo.malapane@za.ab-inbev.com -Identity
5257213001701785602
-------------------------------------------------------------------------
Remove AllInbox rule
Get-InboxRule -Mailbox tebogo.malapane@za.ab-inbev.com |remove-InboxRule
_____________________________________________________________________________
ALLOW DEVICES.
Set-CASMailbox �Identity 127001638 �ActiveSyncAllowedDeviceIDs
@{add=�HS2FPNC6D917R8P8HTEDSQSVSC�}
__________________________________________________________
To check SOFTDELETED ITEMS.
Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -eq
"Disabled" } | ft DisplayName,Database,DisconnectDate
________________________________
Mailboxes ON Server/Database.
Get-MailboxDatabase |Select-Object Name,@{n="TotalMailboxes";e={@(Get-Mailbox -
Database $_).count}}
________________________________________
QUOTA SET
Set-Mailbox 206552523-j -ProhibitSendQuota 3GB -ProhibitSendReceiveQuota 3.3GB -
IssueWarningQuota 2.9GB -defaultsetting:$false
-----------------------------------------------------------------------------------
--------------
Command to know whats the quota set:
Get-Mailbox MC.Wellons@nbcuni.com | Format-List
IssueWarningQuota,ProhibitSendQuota,ProhibitSendReceiveQuota,UseDatabaseQuotaDefaul
ts
_________________________________________
Command to trace email and to find which folder its getting delivered
 Get-MessageTrace -SenderAddress chandan.kumar1@nbcuni.com -RecipientAddress
hema.jayasheelan@nbcuni.com |Ge
t-MessageTraceDetail | fl
((Check deatils field to check to which folder its delivering to)
_______________________________________________
PUBLIC FOLDER PARENTAL PATH>
$pf = Get-MailPublicFolder Rachel@nbcuni.com
Get-PublicFolder -Identity $pf.entryid
__________________________________________________
Restricted DL, if user is part of this acnnot open PST.
"GPL-OU-DU_Users_Accounts-RestrictPST_V01"
PST option disabled for these users.
_______________________________________________________
Birthright DL-
APL-Azure_LIC_Office365_E3_Except Exchange
Audi conferencig -
APL-Azure_LIC_Office365_Audio Conferencing
_____________________________________________________
To check soft Deleted Items.
PS C:\Rushi> Get-Recipient t52la@nbcuni.com -IncludeSoftDeletedRecipients
Name                RecipientType
LA, T52 (206611008) UserMailbox
PS C:\Rushi> Get-Mailbox t52la@nbcuni.com -SoftDeletedMailbox
Name                      Alias           Database
ProhibitSendQuota    ExternalDirectoryObj----                       -----
LA, T52 (206611008)       206611008       NAMPR14DG001-db020                10 GB
(10,737,418... 939697d7-3d3f-4e88-b2ee-5117ffb0e15e
___________________________________________________________________________________
_____
Command to Check the policy applied on folders:
Get-MailboxFolderStatistics UserID | where {$_.DeletePolicy} | ft folderpath,
DeletePolicy
______________________________________________________________________
Command to check the backupdaily report status.
Get-MailboxDatabase ashdb0* -Status| ft name,*lastfull* -AutoSize
Get-MailboxDatabase potdb* -Status| ft name,*lastfull* -AutoSize
_______________________________________________________________________
Mobile Device Whitelist:
Set-CASMailbox �Identity 206030271 �ActiveSyncAllowedDeviceIDs
@{Add="LQ4ORQCBSH47BBT0DJ9UAA7TN4�}
___________________________________________________________________________________
____
Mail audit report
Admin login report
Search-MailboxAuditLog -ResultSize 200000 -Identity "daniel.thierauf@marelli.com" -
LogonTypes Admin,Delegate -ShowDetails -StartDate (get-date).adddays(-10) -EndDate
(get-date) | Export-csv -Encoding UTF8 .\MailboxDelegateAuditLogs.csv
Delegate login report
Search-MailboxAuditLog -Identity "daniel.thierauf@marelli.com" -LogonTypes Owner -
ShowDetails -StartDate 1/11/2022 -EndDate 10/11/2022 | Where-Object {$_.Operation -
eq "HardDelete"} | Export-csv -Encoding UTF8 .\MailboxOwnerAuditLogs.csv
Or
Search-MailboxAuditLog -ResultSize 200000 -Identity "daniel.thierauf@marelli.com" -
LogonTypes Owner -ShowDetails -StartDate (get-date).adddays(-10) -EndDate (get-
date) | Export-csv -Encoding UTF8 .\MailboxOwnerAuditLogs.csv
===================================================================================
======================================
To check backup status for one database.
Get-MailboxDatabase ashdb016 -Status| fl *backup*
___________________________________________________________________________________
_____
To check   the database status of all servers(login to any server)
Get-MailboxDatabaseCopyStatus potdb*
Get-MailboxDatabaseCopyStatus ashdb*
___________________________________________________________________________________
__________
------Mailbox not migrated with Mailbox GUID not found suring migration-----
Get-Recipient Erin.Lemkey@nbcuni.com
***if the Excahnge and archive Guid matches, check next command.
Get-MsolUser -SearchString 206655745
UserPrincipalName   DisplayName                            isLicensed
-----------------   -----------                            ----------
206655745@tfayd.com Lemkey, Erin (Contractor-NBCUniversal) True
Get-MsolUser -SearchString 206655745 | fl *error*
DirSyncProvisioningErrors : {}
Errors                    :
IndirectLicenseErrors     : {}
*******as we don't find any errors.
Now check the GUID value you received in migration report for the user.
Get-Recipient 625800ff-7eaf-4a7a-9ecb-14a0c27bf30c
The operation couldn't be performed because object '625800ff-7eaf-4a7a-9ecb-
14a0c27bf30c' couldn't be found on
*****this error tells that there is no GUID with this value.
PS C:\Users\hemaj> Get-Recipient Erin.Lemkey@nbcuni.com -
IncludeSoftDeletedRecipients
Name                                     RecipientType
----                                     -------------
Lemkey, Erin (Contractor-NBCUniversal)   MailUser
Lemkey, Erin (206655745)                 MailUser
We could see there are 2 different entries, this why migration failed, so now we
have to check why there are 2 entries.
___________________________________________________________________________________
_______________________________________________
Command to trace Message tracking and to find if this a automaic email or user
sent.
Search-MailboxAuditLog -Identity 206432993 -LogonTypes Owner -StartDate (Get-
Date).AddHours(-12) -ShowDeta
 ---audit logs will show the emails sent from admin/delegation/owner...it will not
show any logs of automatic emails
------this command if for 12 hours logs(-12) this can be based on for last how many
hours we need the logs.
___________________________________________________________________________________
________________________________________
Command to get active users from the list of SSOs.
gc .\users.txt | Get-Recipient | fl alias >activeusers.csv
___________________________________________________________________________________
___________________________________
Command to delete the emails with subject line.
->get-content users.txt |Search-Mailbox -SearchQuery
('from:"alaw@globalconnections.org.uk",Subject:"[EXTERNAL] Re:   BACS"') -
TargetMailbox sunilkumar.singh@nbcuni.com -TargetFolder "Sent Items" -LogOnly -
LogLevel full
->get-content users.txt |Search-Mailbox -SearchQuery
('from:"alaw@globalconnections.org.uk", Subject:"[EXTERNAL] Re:   BACS"') -
Deletecontent -ErrorAction silentlycontinue -Force|select
identity,displayname,Success,resultitemscount |Export-Csv "C:\work\
maildeletionlogs.csv"
___________________________________________________________________________________
_____________________________________________
Command to delete a meeting scheduled by organizer:
Get-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery 'Kind:Meetings AND
Organizer:EmailAddressOfExEmployee' -DeleteContent �Force
___________________________________________________________________________________
__________________________________________________________
Restore
New-MailboxRestoreRequest -SourceMailbox "5f2be6b2-0ded-421a-b2b9-649ab43857ed" -
TargetMailbox "88356ac1-5321-471c-9dd3-50a13a1e6188" -AllowLegacyDNMismatch -Name
INC2811181 -Bad 100
New-MailboxRestoreRequest -SourceMailbox "5f2be6b2-0ded-421a-b2b9-649ab43857ed" -
SourceIsArchive -TargetMailbox "88356ac1-5321-471c-9dd3-50a13a1e6188" -
AllowLegacyDNMismatch -TargetRootFolder "Archive Mailbox" -Name Ajithlal -Bad 100
Take the exchange GUID of source mailbox(soft deleted) and target mailbox(newly
created)
To check the status of the restored mailbox
Get-MailboxRestoreRequest 206657815 | ft
_________________________________________________________-
Mailbox reports :
Office 365:
Get-Mailbox -ResultSize Unlimited | Select-Object
DisplayName,UserPrincipalName,Alias,PrimarySMTPAddress,RecipientTypeDetails,CustomA
ttribute4,CustomAttribute15,Database,RetentionPolicy,ArchiveStatus,ArchiveState,Arc
hiveName,Identity,Name,DistinguishedName,When*,*GUID*,RetentionHoldEnabled,InPlaceH
olds,MaxSendSize,MaxReceiveSize | Export-Csv "Office365AllMailboxes.Csv"
On-Premises:
Get-Mailbox -ResultSize Unlimited | Select-Object
DisplayName,UserPrincipalName,Alias,PrimarySMTPAddress,RecipientTypeDetails,CustomA
ttribute4,CustomAttribute15,LinkedMasterAccount,RetentionPolicy,ArchiveName,Databas
e,ExchangeVersion,WhenMailboxcreated,@{n='Country'; e={(Get-ADUser -identity
$_.Alias -Properties *).co}} | Export-Csv "OnPremisesallMailboxes.Csv"
___________________________________________________________________________________
___________________---
Moving mailbox to different database:
New-MoveRequest -Identity 'tony@alpineskihouse.com' -TargetDatabase "DB01"
  To check the status of move:
Get-MoveRequestStatistics ukpayroll@nbcuni.com
  To resume the move:
Resume-MoveRequest ukpayroll@nbcuni.com
___________________________________________________________________________________
___________________________________________
When emails always goes to junk.
Set-MailboxJunkEmailConfiguration �Identity 206555639 -TrustedSendersAndDomains
@{Add='Dan_Murdock@comcast.com'}
___________________________________________________________________________________
_____________________________________________
To search and delete an ITEM.
a. Get-Content d:\emails.txt | Search-Mailbox -SearchQuery 'Subject:" Important -
Internal Only"' -TargetMailbox "501444875" -TargetFolder "SearchAndDeleteLog" -
LogOnly -LogLevel Full
3. Run command to delete emails
a. Get-Content d:\work\emails.txt | Search-Mailbox -SearchQuery 'Subject:"Important
- Internal Only"' -DeleteContent -ErrorAction SilentlyContinue -Force | Select
Identity,DisplayName,Success,ResultItemsCount | Export-Csv "D:\work\Important -
Internal Only.csv" -notype
___________________________________________________________________________________
___________________
BULK SSO details( display name, alias etc)
Get-Content C:\Users\yamunaj\Desktop\Users.txt|Get-Recipient | Select-Object
alias*, reci*, pri*, disp*, when*, exter*, *Object* | Export-Csv "AnyName"
___________________________________________________________________________________
_______________________________________________________
Searching emails with subject line, the email will directly get exported to your
mailbox:
Get-Content E:\work\emails.txt| Search-Mailbox -SearchQuery ('Subject:"[EXTERNAL]
Training Calendar"') -TargetMailbox Anand.sharma@nbcuni.com -TargetFolder Export
___________________________________________________________________________________
______________________________
Secure POP Enable:
Set-CASMailbox mediapulsesupport@nbcuni.com -PopEnabled $true
___________________________________________________________________________________
_____________________________________
All Emails moving to deleted items.
Set-calendarprocessing dms@nbcuni.com -DeleteNonCalendarItems $false
___________________________________________________________________________________
______________________________________
All Mail contacts export
Get-MailContact -ResultSize unlimited | Select-Object
DisplayName,UserPrincipalName,Alias,Prima
rySMTPAddress,RecipientTypeDetails,ServerLegacyDN |Export-Csv "D:\
ezlinkscontacts.Csv"
___________________________________________________________________________________
_______________________________________________________
Command to check CPU/Memory utilization.
$Computername = "ASHEMWP00001";(Get-counter -Counter "\Processor(_Total)\%
Processor Time" -Computername $computername).readings ;gwmi -Class
win32_operatingsystem -computername $computername |ft @{n="\\$computername\\
Memory(_total)\% Memory :";e={�{0:N2}� -f((($_.TotalVisibleMemorySize -
$_.FreePhysicalMemory)*100)/$_.TotalVisibleMemorySize)}} -AutoSize
___________________________________________________________________________________
_______________________________________________________________
Post migration commands:
POST Migration --
Set-Mailbox 206662348 -AuditEnabled $true
Set-User -Identity 206662348 -RemotePowerShellEnabled $false
set-mailbox 206662348 -ProhibitSendQuota 10GB -ProhibitSendReceiveQuota 10.5GB -
IssueWarningQuota 9.5GB
Enable-RemoteMailbox 206662348 -Archive ( On on-prem )
Set-Mailbox 206662348 -RetentionPolicy 'GRC Policy 5 Years'
___________________________________________________________________________________
_______________________________________________________________________
The following example command sets the rules quota to the maximum value of 256 KB.
Set-Mailbox *** Email address is removed for privacy *** -RulesQuota:256kb
The following example command allows you to view the current rules quota for a
mailbox.
Get-Mailbox *** Email address is removed for privacy *** |FL displayname,
rulesquota
But this shows the current Quota, not the Usage. What I'm looking for, for example
user A. Says user A has hundreds of rules. I want to find out the current size of
his inbox rules, to see if he's exceeding his inbox rule quota or not.
Is it possible?
---------------------------------------
to find deleted user in softdelete
Get-Mailbox FabioFernando.deOliveira-ext@ab-Inbev.com -SoftDeletedMailbox
---------------------------------------------------
Check DUMPSTER
Get-MailboxFolderStatistics -Identity Gurudath.Mallya@ab-Inbev.com -FolderScope
RecoverableItems | Format-Table FolderPath,ItemsInFolder,folderandSubfolderSize
-----------------------------------------------------------------------------------
---------------------------------------
Mailbox archive enable
get-mailbox yash.ramchurn@mu.ab-inbev.com |fl *archi*
-----------------------------------------------------------------------
hold enbled
get-mailbox yash.ramchurn@mu.ab-inbev.com |fl *hold*
------------------------------------------------------------
EURO zone mailbox
Get-Mailbox -ResultSize unlimited | ? {$_.CustomAttribute1 -eq "Europe"}| Select-
Object
Displayname,Samaccount,Alias,RecipientTypeDetails,PrimarySmtpAddress,EmailAddresses
| Export-Csv AllEuropemailboxes.csv
--------------------------------
Inbox rule-
remove single rule from user mailbox
Remove-InboxRule -Mailbox Craig.Weiner@brewerscollective.com -Identity
"4158330986033053698"
-----------------------------------------------------------------------------
Remove all inbox rule-
Remove-InboxRule -Mailbox Joe@Contoso.com
-----------------------------------------
get inbox rule
---------------------------------------------
disable inbox rule-
Disable-InboxRule -Identity "MoveAnnouncements" -Mailbox "Joe@Contoso.com"
------------------------------------------------------------
APAC report Mailbox all users |extract all APAC user mailboxes
Get-Mailbox -ResultSize unlimited -RecipientTypeDetails UserMailbox -Filter
{ WindowsEmailAddress -like "*@budweiserapac.com"} | export-csv "C:\Users\C907751\
Desktop\Apac reportA"
-----------------------------------------------------------------------------------
---------------------------------------------------------------------------
Shard mailbox enabled to store sent items emails
set-mailbox gbs.emea.purchasing.direct@marelli.com -
MessageCopyForSendOnBehalfEnabled $True