Category: Microsoft Exchange Server 2007

Microsoft Exchange Server 2007 – Query Public Folder Primary Email Addresses

You may use the script below in the Exchange Management Shell to list all public folders and their primary email address in Microsoft Exchange Server 2007.

<#
.SYNOPSIS
Query all of the Microsoft Exchange Server 2007 public folders, provide their primary email address and write the output to a file.
.DESCRIPTION
Automate the output of the email addresses associated with the Microsoft Exchange Server 2007 public folders.
.EXAMPLE
Get-Mailpublicfolder | Format-List alias, emailaddresses | Out-File -filepath C:\Users\User01\Desktop\email.txt
.AUTHOR
Written by Noel Enrique Alvarez on Thursday, January 28, 2016.
#>

#Request the name of the file.
$File = Read-Host “What will be the name of the file?”

#Query the Microsoft Exchange Server 2007 public folders and provide the results in a text file
Get-Mailpublicfolder | Format-List alias, emailaddresses | Out-File -filepath <<<INSERT PATH>>>\$File


Microsoft Exchange Server 2007 – List Email Forwarding

You may use the script below in the Exchange Management Shell to list all mailboxes that are forwarding in Microsoft Exchange Server 2007.

<#
.SYNOPSIS
This script will provide a list of all Microsoft Exchange 2007 email addresses that are forwarding emails.
.DESCRIPTION
This script will automate the process of creating a list of all Microsoft Exchange 2007 email addresses that are forwarding emails.
.EXAMPLE
N/A.
.AUTHOR
Written by Noel Enrique Alvarez on Thursday, March 24, 2016.
#>

#Request the name of the output file
$File = Read-Host “What would you like to name the file?”

#Provide a list of all email addresses that are forwarding emails
Get-Mailbox | Where {$_.ForwardingAddress -ne $null} | Select Name, SamAccountName, PrimarySmtpAddress, ForwardingAddress, DeliverToMailboxAndForward | Out-File -filepath “<<<INSERT PATH>>>\$File.txt”


Microsoft Exchange Server 2007 – List Email Addresses

You may use the script below in the Exchange Management Shell to list the primary email address of each mailbox in Microsoft Exchange Server 2007.

<#
.SYNOPSIS
This script will provide a list of all Microsoft Exchange users and their primary email address then provide the results in a text file.
.DESCRIPTION
This script will automate the process of providing a list of all Microsoft Exchange users and their primary email address then provide the results in a text file.
.EXAMPLE
N/A.
.AUTHOR
Written by Noel Enrique Alvarez on Thursday, March 24, 2016.
#>

#Request the name of the output file
$File = Read-Host “What would you like to name the file?”

#List all of the Microsoft Exchange users and their primary email address then provide the results in a text file
Get-Mailbox | Select Name, SamAccountName, PrimarySmtpAddress | format-list | Out-File -filepath “<<<INSERT PATH>>>\$File.txt”


Microsoft Exchange Server 2007 – List Public Folder Permissions

You may use the script below in the Exchange Management Shell to list public folder permissions in Microsoft Exchange Server 2007.

<#
.SYNOPSIS
This script will list a public folder and it’s subfolders in Microsoft Exchange 2007.
.DESCRIPTION
This script will automate the process of listing a public folder and it’s subfolders in Microsoft Exchange 2007.
.EXAMPLE
N/A.
.AUTHOR
Written by Noel Enrique Alvarez on Thursday, March 24, 2016.
#>

#Request the Microsoft Exchange public folder
$Folder = Read-Host “What is the path to the Microsoft Exchange public folder?”

#List the Microsoft Exchange Server 2007 public folder and it’s subfolder
Get-PublicFolder –Identity $Folder -Recurse


Microsoft Exchange Server 2007 – Configure Public Folder Permissions

The Microsoft Windows PowerShell script below may be run with the Exchange Management Shell to automate the configuration of public folder permissions in Microsoft Exchange Server 2007. Additionally, you may modify the script by manually adding a list of public folders (which is included in the EXAMPLE section) to help with further automation of configuring public folder permissions.

<#
.SYNOPSIS
This script will apply access rights to a user for a public folder and it’s subfolders in Microsoft Exchange 2007.
.DESCRIPTION
This script will automate the process of applying access rights to a user for a public fodler and it’s subfolders in Microsoft Exchange 2007.
.EXAMPLE
Get-PublicFolder -Identity “\Departments\Accounting” -Recurse | Add-PublicFolderClientPermission -User $User -AccessRights $Access
Get-PublicFolder -Identity “\Departments\Information Technology” -Recurse | Add-PublicFolderClientPermission -User $User -AccessRights $Access
Get-PublicFolder -Identity “\Departments\Marketing” -Recurse | Add-PublicFolderClientPermission -User $User -AccessRights $Access
.AUTHOR
Written by Noel Enrique Alvarez on Thursday, March 24, 2016.
#>

#Request the Microsoft Exchange public folder
$Folder = Read-Host “What is the path to the Microsoft Exchange public folder?”

#Request the user’s Microsoft Active Directory display name
$User = Read-Host “What is the user’s Microsoft Active Directory display name?”

#Request the users access right
$Access = Read-Host “What access right should be applied to user (i.e. Editor)?”

#Configure the access right on the Microsoft Exchange Public Folder for the Microsoft Active Directory user
Get-PublicFolder –Identity $Folder –Recurse | Add-PublicFolderClientPermission –User $User –AccessRights $Access


Microsoft Exchange Server 2007 – External E-Mails to an Internal Distribution Group

In order to send emails to a Microsoft Exchange Server 2007 distribution group from an external user uncheck the following setting in the properties of the distribution group.

Mail Flow Settings > Message Delivery Restrictions > Require that all senders are authenticated

Enjoy!


Microsoft Exchange Server 2007 – Convert a Mailbox Type

You may use the following command to convert a Microsoft Exchange Server 2007 mailbox to a User Mailbox.

Set-Mailbox “User Name” -Type Regular

NOTE: Replace “User Name” with the actual username of the user.

Enjoy!