You are on page 1of 3

Connect-EXOPSSession -UserPrincipalName Prabakaran.Alagesan-ext@ab-Inbev.

com
N2576admin@calsonickansei.co.jp

Connect-EXOPSSession -UserPrincipalName N2576admin@calsonickansei.co.jp

Remove-CalendarEvents -Identity <mailbox email address> -CancelOrganizedMeetings -


QueryWindowInDays 180

N2576admin@calsonickansei.co.jp

Get-Mailbox -Identity M00103A CKJ33923

===================================================================================
===============

Get-Mailbox -ResultSize 10 | Select-Object DisplayName, SamAccountName,


PrimarySmtpAddress | Out-GridView

To displayb all maibox in the tenet:

Get-Mailbox -Resultsize Unlimited | Select-Object DisplayName, SamAccountName,


PrimarySmtpAddress | Out-GridView

WARNING: There are more results available than are currently displayed. To view
them, increase the value for the ResultSize parameter.
-----------------------------------------------------------------------------------
------------------------------------------------------
To export all maibox in CSV format:

Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName, SamAccountName,


PrimarySmtpAddress | Sort-Object PrimarySmtpAddress | Export-CSV c:\Praba\
display_sam_smtp.csv -NoTypeInformation -Encoding UTF8

===================================================================================
=======
$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri


https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -
Authentication Basic -AllowRedirection

Set-ExecutionPolicy RemoteSigned

Import-PSSession $Session
==============================================================================
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

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

===================================================================
Get-InboxRule -Mailbox daniel.thierauf@marelli.com

Get-MailboxFolderStatistics -Identity daniel.thierauf@marelli.com -FolderScope


RecoverableItems | Format-Table FolderPath,ItemsInFolder,folderandSubfolderSize

connect-msolservice

if the above msolservice not connect please run the below command.
$TLS12Protocol = [System.Net.SecurityProtocolType] 'Ssl3 , Tls12'

[System.Net.ServicePointManager]::SecurityProtocol = $TLS12Protocol
=================================================================================

(Get-ADUser CKJ24590 -Properties *).proxyaddresses

Get-MailboxStatistics CKJ24590| select totalitemsize

Get-MailboxStatistics CKJ24590| select totalitemsize

Get-MailboxStatistics CKJ24590-Archive | select totalitemsize

Set-ADUser CKJ24590 -Replace @{mailNickname='Deleted_202109_ CKJ24590'} -


DisplayName 'Deleted_202109_Jibin KJ' -EmailAddress
Deleted_202109_Jibin.KJ@external.marelli.com -server win5e141

Get-Mailbox Carlos.Echavarria@marelli.com -identity Simona.CHIAPINO@marelli.com


Jeevarathinam.Velliyengiri@external.marelli.com

Get-MailboxFolderPermission Simona.CHIAPINO@marelli.com:\calendar –User Default

Set-MailboxFolderPermission Simona.CHIAPINO@marelli.com:\calendar –User Default –


AccessRights Reviewer

(Get-MsolUser -UserPrincipalName
armando.marin@marelli.com).errors[0].ErrorDetail.objecterrors.errorrecord.ErrorDesc
ription

Get-MsolUser -HasErrorsOnly | ft
DisplayName,UserPrincipalName,@{Name="Error";Expression={($_.errors[0].ErrorDetail.
objecterrors.errorrecord.ErrorDescription)}} -AutoSize
set-mailbox gbs.emea.purchasing.direct@marelli.com -MessageCopyForSentAsEnabled
$True

set-mailbox gbs.emea.purchasing.direct@marelli.com -
MessageCopyForSendOnBehalfEnabled $True

Get-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery 'Kind:Meetings AND


Organizer:stefano.deandrea@marelli.com' -DeleteContent –Force

Remove-CalendarEvents -Identity stefano.deandrea@marelli.com -


CancelOrganizedMeetings -QueryWindowInDays 120

You might also like