29 C
Dubai
Sunday, May 11, 2025
Home Blog Page 92

Working with Calendar Permissions in Bulk on Exchange 2010 Sp2

Wanted to collate all the calendar permissions which is used in Exchange 2010 Sp2.

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

image

 

How to Change (Allow/Restrict) Calendar Permission for a Specific Mailbox ?

 

To Allow Free/busy

Set-MailboxFolderPermission –Identity “EmailAddress”:\calendar -User Default -AccessRights AvailabilityOnly

To Restrict Free/busy

Set-MailboxFolderPermission –Identity “EmailAddress”:\calendar -User Default -AccessRights None

image

 

How to Change Calendar Permission in Bulk ?

 

To Allow Free/busy for all Mailboxes in the Organization

 

$allmailbox = Get-Mailbox -Resultsize Unlimited

Foreach ($Mailbox in $allmailbox)

{Set-mailboxfolderpermission –identity ($Mailbox.alias+’:\calendar’) –user Default –Accessrights AvailabilityOnly}

 

To Restrict Free/busy for all Mailboxes in the Organization

 

$allmailbox = Get-Mailbox -Resultsize Unlimited

Foreach ($Mailbox in $allmailbox)

{Set-mailboxfolderpermission –identity ($Mailbox.alias+’:\calendar’) –user Default –Accessrights None}

 

 

Note : Copy the Code into Notepad . Save As  .ps1 file and Locate the File in Exchange management Shell to execute it

 

How to Add a Calendar Permission Over a Maibox ?

 

Add-MailboxFolderPermission god@domain.com:\calendar -User Calendar-Admins -AccessRights reviewer

 

Note : You can Create a Universal Security Group – Mail Enable it – And You can add it

So that all the members of the security group and view this calendar

 

image

 

To Add a User or Security Group in Bulk over all the mailboxes in the Organization

 

$allmailbox = Get-Mailbox -Resultsize Unlimited

Foreach ($Mailbox in $allmailbox)

{Add-mailboxfolderpermission –identity ($Mailbox.alias+’:\calendar’) –user Calendar-Admins –Accessrights Reviewer}

 

To Remove a User or Security Group from all the mailboxes in the Organization

 

$allmailbox = Get-Mailbox -Resultsize Unlimited

Foreach ($Mailbox in $allmailbox)

{remove-mailboxfolderpermission –identity ($Mailbox.alias+’:\calendar’) –user Calendar-Admins }

 

 

 

Hope it will help as a Good reference point

 

Thank you

New-MailboxExportRequest : Couldn’t connect to the source mailbox – Fix

I just had to Export few mailboxes to PST.

Just struck up with an  Error.. Thought it is corruption…But the fix was beyond my thinking.

Exchange 2010 SP2

image

 

VERBOSE: [14:14:09.565 GMT] New-MailboxExportRequest : Couldn’t connect to the source mailbox. –>
MapiExceptionProtocolDisabled: Unable to make connection to the server. (hr=0x80004005, ec=2008)
Diagnostic context:
Lid: 59431   EMSMDB.EcDoConnectEx called [length=146]
Lid: 34855   EMSMDB.EcDoConnectEx returned [ec=0x7D8][length=56][latency=17]
Lid: 59505   StoreEc: 0x7D8
Lid: 52465   StoreEc: 0x7D8
Lid: 60065
Lid: 33777   StoreEc: 0x7D8
Lid: 59805
Lid: 52209   StoreEc: 0x7D8
Lid: 56583
Lid: 52487   StoreEc: 0x7D8
Lid: 19778
Lid: 27970   StoreEc: 0x7D8
Lid: 17730
Lid: 25922   StoreEc: 0x7D8
VERBOSE: [14:14:09.567 GMT] New-MailboxExportRequest : Admin Audit Log: Entered Handler:OnComplete.
Couldn’t connect to the source mailbox.
+ CategoryInfo          : NotSpecified: (0:Int32) [New-MailboxExportRequest], RemotePermanentException
+ FullyQualifiedErrorId : 6B6493C8,Microsoft.Exchange.Management.RecipientTasks.NewMailboxExportRequest

VERBOSE: [14:14:09.577 GMT] New-MailboxExportRequest : Ending processing &

 

Fix –

Go the Properties of the mailbox

Make Sure MAPI is Enabled

image

 

Smile

How to Prepare a Include File For ADMT 3.2

Let see how to prepare a INCLUDE file in ADMT, We can create a CSV for Migrating the mailboxes across forest, But in order to move Custom Users using ADMT (To Migrate User Accounts and Passwords) and change their UPN while its moved to the destination forest.

To View the ADMT migration procedure ( View the Below link )

https://www.azure365pro.com/how-to-migrate-users-across-forest-cross-forest-using-admt-3-2-with-sid-and-passwords/

The best way is to Create a INCLUDE File and use that in ADMT 3.2

Create a CSV file – SourceName,TargetSam,TargetUPN

 

image

 

Now Open ADMT – User Account Migration Wizard

Select “Read Objects from an Include File”

image

Browse for the Source CSV file,

And Choose the Source OU structure (If Users are spreaded in Sub OU’s , Choosing the Root OU, ADMT can pull it from Sub OU’s)

image

 

Now User accounts are migrated in Bulk

Password Export Server 3.2 – Unable to establish a session with the password export server

While doing cross forest move between Exchange2010 to Exchange 2010 , I had to configure PES (Password Export Service) to migrate passwords of the mailboxes

 

If you are confused with the first line,Please read the below post and come back.

https://www.azure365pro.com/how-to-migrate-users-across-forest-cross-forest-using-admt-3-2-with-sid-and-passwords/

 

Below error was popping up :

“Unable to establish a session with the password export server. Either the currently logged on user does not have sufficient permissions to call the Password Export Server or the account that the Password Export Server Service is running under does not have sufficient permissions on the target domain controller. Verify that the logged on user is a member of the Administrators group in the source domain and that the Password Export Server Service account can change passwords of user accounts in the target domain.”

image

 

My fix :

Created a Service Account

Name: ADMT

Member of (TargetDomain – DomainAdmins)

Member of (SourceDomain –Administrators)

And Configured the Password Export Server Service Properties

TargetDomain\ADMT

image

Waited for few minutes.

Logged into domainController of the TargetDomain  Using the Service Account.

 

Now it allowed me to migrate passwords

 

Smile

How to migrate Public folders from Exchange 2010 Sp3 to Exchange 2013

Let’s see how to migrate Public Folders from Exchange 2010 Sp3 to Exchange 2013

 

Step 1 : (Login to Exchange 2010 Server)

Login to Exchange 2010 Server and take a backup of Exchange 2010 PF structure

Note : Created a test PF structure for better Understanding

image

 

Step2 : (Login to Exchange 2010 Server)

Exporting Public Folder Structure , Item Count In folders(Statistics) , Permissions  in Exchange 2010 Server

Purpose – To Verify the Content after migration.

Login to your Exchange 2010 Server . Open Exchange Management Shell

Exporting Public Folder Structure to CSV

Get-PublicFolder –Recurse | Export-CSV C:\Exchange2010-PFStructure.csv

 

image

Exporting Public Folder Statistics to CSV ( Ignore the Below Error )

Get-PublicFolder -Recurse | Get-PublicFolderStatistics | Export-Csv C:\Exchange2010-PFStatistics.csv

image

Exporting Public Folder Permissions to CSV

Get-PublicFolder -GetChildren | Get-PublicFolderClientPermission | Select-Object Identity,User -ExpandProperty AccessRights | Export-CSV C:\Exchange2010-PFPermissions.csv

image

Step 3: (Run in Exchange 2010 Server)

Make Sure PublicFoldersLockedForMigration and PublicFolderMigrationComplete is set to False

PublicFoldersLockedForMigration : False
PublicFolderMigrationComplete   : False

Get-OrganizationConfig  | fl *Migration*

image

 

If this parameter is set to True , Run the below command to Change it to False

Set-OrganizationConfig -PublicFoldersLockedforMigration:$false -PublicFolderMigrationComplete:$false

 

Step 4: (Run this on Exchange 2013 server)

Make sure there is no PublicFolderMigrationRequest and PublicFolder Mailbox

Get-PublicFolderMigrationRequest

Get-Mailbox -PublicFolder

image

Get this Below Scripts and Supporting files , from Exchange 2013 Scripts folder (C:\Program Files\Microsoft\Exchange Server\V15\Scripts)

and Copy those files to Exchange 2010 Scripts Folder (C:\Program Files\Microsoft\Exchange Server\V14\Scripts)

 

image

Step 4: (Run this on Exchange 2010 server)

Login to Exchange 2010 Server , Open Exchange management Shell , As we copied the PF scripts to Scripts folder.

Locate to It and Run Both the Scripts

Script 1 :

.\Export-PublicFolderStatistics.ps1 -PublicFolderServer EXC2010.domain.com  -ExportFile C:\PFMigration\Exchange2010-PFtoSize.csv

Copy the Exported File name “Exchange2010-PFtoSize.csv”  , And Specify the same in the next script in –ImportFile Parameter

image

Script 2:

Copy the Exported File name on the above script “Exchange2010-PFtoSize.csv”  , And Specify the same in the below in –ImportFile Parameter

.\PublicFolderToMailboxMapGenerator.ps1 -MailboxSize 5000000000 -ImportFile C:\PFMigration\Exchange2010-PFtoSize.csv -ExportFile C:\PFMigration\Exchange2010-PFtoMailbox.csv

Note – MailboxSize Parameter – 1GB – 1000000000 (In Bytes) , Maximum you can specify is 25GB

image

 

Step 5 : (Log into Exchange 2010 server)

Open file Exchange2010-PFtoMailbox.csv

Specify the PF mailbox name which you wish , Default name is Mailbox1

Specified “PFMailbox”

image

 

Step 6: (Log into Exchange 2013 server)

Create the PF Mailbox as the specified name in the CSV “PFMailbox”

New-Mailbox -PublicFolder PFMailbox -HoldForMigration:$true -Database “Mailbox Database”

image

 

Step 7: (Log into Exchange 2013 server)

 

Create PublicFolderMigrationRequest

New-PublicFolderMigrationRequest -SourceDatabase (Get-PublicFolderDatabase –Server EXCH2010) -CSVData (Get-Content C:\PFMigration\Exchange2010-PFtoMailbox.csv -Encoding Byte)

 

Note : If required you can add these parameters -AcceptLargeDataLoss –BadItemLimit

Bad limit value can be= 0 to 2147483647

image

 

To Check status of Migration request

Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics -IncludeReport | FL

image

 

Get-PublicFolderMigrationRequest

image

 

Step 8: (INVOLVES DOWNTIME)

(Note : Once you set PublicFoldersLockedForMigration to True – Users will lose access to Public Folders)

Once the PublicFolderMigrationRequest goes autosuspended we got to set PublicFoldersLockedForMigration to True

Set-OrganizationConfig -PublicFoldersLockedForMigration:$true

image

 

Now users would have lost access to the legacy Public Folder Database and replication to new Public Folder Mailbox is completed .

This may take time ,depending on your topology . ( Got to wait for 60 to 120 minutes)

Step 9:(Log into Exchange 2013 server)

Now you can Complete the migration, with the following two commands

Get-PublicFolderMigrationRequest  -Identity \PublicFolderMigration | Set-PublicFolderMigrationRequest -PreventCompletion:$false

Get-PublicFolderMigrationRequest  -Identity \PublicFolderMigration | Resume-PublicFolderMigrationRequest

 

image

 

Now Verify PublicFolderMigrationRequest is 100 Percent Complete

 

Get-PublicFolderMigrationRequest | Get-PublicFolderMigrationRequestStatistics

image

 

Get-PublicFolder –Recurse

image

 

Login to OWA – Right Click on Favorites – Add Public Folder – Verify you are able to access the migrated Data

 

image

image

 

 

Hope it is helpful Smile

 

Thank you

How to Export all Address list and all members of it (Exchange 2007 & Exchange 2010 & Exchange 2013)

In some situations we had to Export all the Address list and all the members of it to a CSV file

I have wrote a script which will make Exchange Administrators life Easy

.Requires -version 2 – Runs in Exchange Management Shell

.\AddresslistMemberReport.ps1 – It Can Display all the Distribution Group and its members on a List

Or It can Export to a CSV file

Download the Script

Browse the Shell to the Appropriate Location

image

image

Run it as above

Output of CSV file look like Below

You can add some more entries if required

image

 

Download the Script

 

Good to know :

How to List members of Specific Address list

$AL = Get-addresslist “Addresslist name”

Get-Recipient -RecipientPreviewFilter $al.RecipientFilter -ResultSize unlimited

× How can I help you?