Browsed by
Tag: powershell

Exchange 2010 FAQ: How Do I Install the Exchange 2010 Management Tools?

Exchange 2010 FAQ: How Do I Install the Exchange 2010 Management Tools?

roualin banniere5 Exchange 2010 FAQ: How Do I Install the Exchange 2010 Management Tools?The Exchange Server 2010 management tools can be installed on a computer running one of the following operating systems:

  • Windows Vista 64-bit with Service Pack 2
  • Windows 7 64-bit
  • Windows Server 2008 64-bit with Service Pack 2
  • Windows Server 2008 R2
Import-Mailbox – Import mailboxes from PST into Exchange 2007 using powershell cmdlets

Import-Mailbox – Import mailboxes from PST into Exchange 2007 using powershell cmdlets

roualin ex-mgmt-shell1 Import-Mailbox – Import mailboxes from PST into Exchange 2007 using powershell cmdletsIn Exchange 2003, one of the simplest ways to move mailboxes from one Exchange organisation to another was using exmerge. It was particularly useful for sites using ‘Small Business Server’ where the level of data and requirements were low.

-ErrorAction and -ErrorVariable

-ErrorAction and -ErrorVariable

roualin powershell_2 -ErrorAction and -ErrorVariableLet me take a minute to tell you about 2 of my favorite things in Windows PowerShell:  -ErrorAction and –ErrorVariable

You may have heard me talk about being maniacal about doing a great job with error handling … this is one the cornerstones of our architecture.

Managing dedicated Rooms

Managing dedicated Rooms

roualin ex-mgmt-shell1 Managing dedicated RoomsHere are some commands to use to manage Dedicated Room mailboxes.

Dedicated Rooms can also be scheduled by some restricted people.

Getting delegates list :

$GetDelegates=(Get-MailboxCalendarSettings “$Room”).ResourceDelegates

Setting Delegates :

$Mbx=Get-Mailbox “$Room”
$Mbx|Set-MailboxCalendarSettings -ResourceDelegate $Delegates
$Delegates is an Array value

Remove a delegate :

$Mbx=Get-Mailbox “$Room”
$delDelegate <- SAM of the delegate to remove
$NewDelegates=($Mbx|
Get-ADPermission |
Where-Object {-not $_.isinherited} |
Where-Object {$_.user -match “^DOMAIN”}|
ForEach-Object {
If(($_.User.ToString().split(“/”)[1]) –ne $delDelegate){
$_.User.ToString().split(“/”)[1]
}
}
)
$Mbx|Set-MailboxCalendarSettings -ResourceDelegate $NewDelegates

Add a delegate :

$Mbx=Get-Mailbox “$Room”
$DelegateToAdd <- SAM of the delegate to add
$NewDelegates=($Mbx|
Get-ADPermission |
Where-Object {-not $_.isinherited} |
Where-Object {$_.user -match “^DOMAIN”}|
ForEach-Object {
If(($_.User.ToString().split(“/”)[1]) –ne $delDelegate){
$_.User.ToString().split(“/”)[1]
}
}
)
$NewDelegates += $DelegateToAdd
$Mbx|Set-MailboxCalendarSettings -ResourceDelegate $NewDelegates

Get a manager of a dedicated room :

$Mbx=Get-Mailbox “$Room”
$Manager=(get-user $Mbx).Manager

 Modify a Manager :

Function Remove_Old_Mgr ([string]$Upn, [string]$Nom, [string]$Responsible ) {
$domainResponsible=$RespDomain + ” + $Responsible
Remove-MailboxPermission -Identity $UPN `
-AccessRights FullAccess `
-User $Responsible `
-DomainController $Controller
Remove-ADPermission -Identity “$($Nom)” `
-AccessRights ReadProperty `
-User $DOMAINResponsible `
-DomainController $Controller
Remove-ADPermission -Identity “$($Nom)” `
-AccessRights WriteProperty `
-User $DOMAINResponsible `
-DomainController $Controller
}

Function Set_New_Mgr ([string]$Upn, [string]$Nom, [string]$Responsible) {
$DOMAINResponsible=$RespDomain + ” + $Responsible
Add-MailboxPermission -Identity $UPN `
-AccessRights FullAccess `
-User $Responsible `
-DomainController $Controller
Add-ADPermission -Identity “$($Nom)” `
-AccessRights ReadProperty `
-User $DOMAINResponsible `
-DomainController $Controller
Add-ADPermission -Identity “$($Nom)” `
-AccessRights WriteProperty `
-User $DOMAINResponsible `
-DomainController $Controller
}

$Mbx=Get-Mailbox “$Room”
remove_old_mgr $Mbx.UserPrincipalName $Mbx.Name $Manager
$Mbx | Set-User -Manager $NewManager
set_new_mgr $Mbx.UserPrincipalName $Mbx.Name $NewManager
WMI PowerShell for Exchange 2003

WMI PowerShell for Exchange 2003

roualin banniere5 WMI PowerShell for Exchange 2003As a quick follow-up for the Exchange 2000/2003 PowerShell post here are a few additional references.

TechNet Script Center has a good article on WMI classes available:

Get a list of mobile devices in Exchange 2010 using PowerShell

Get a list of mobile devices in Exchange 2010 using PowerShell

roualin ex-mgmt-shell1 Get a list of mobile devices in Exchange 2010 using PowerShell

Hi there! Following my previous blog post about Exchange 2010 and consumerization of mobile devices, I decided to create a little script that might help you find out what mobile devices are actually connecting to your Exchange 2010 environment.

Enable Exchange ActiveSync on a Mailbox with PowerShell

Enable Exchange ActiveSync on a Mailbox with PowerShell

roualin ex-mgmt-shell1 Enable Exchange ActiveSync on a Mailbox with PowerShellExchange 2007 brought some changes to managing mailboxes, most notably, the removal of Exchange tabs from Active Directory. In Exchange 2003, to enable Exchange ActiveSync for a mailbox, you would simply open the ADUC properties for a user, click the Exchange Features tab, click Exchange ActiveSync, and then click Enable.

Exchange Full-Access and Send-As mailbox permissions with Powershell

Exchange Full-Access and Send-As mailbox permissions with Powershell

roualin ex-mgmt-shell1 Exchange Full-Access and Send-As mailbox permissions with PowershellAll tasks in Exchange Server 2007 or Exchange Server 2010 can be done in the Exchange Management Shell. So you are also able to give the Send-As permission and the Full-access permission via the Exchange Management Shell.

roualin trans Exchange Full-Access and Send-As mailbox permissions with Powershell

Send-As permissions

Disable/Enable a Mailbox – Change user account while saving mails

Disable/Enable a Mailbox – Change user account while saving mails

roualin ex-mgmt-shell1 Disable/Enable a Mailbox - Change user account while saving mailsSometimes you have to change a whole account but transfer the mailbox database.

There are two ways to do that :

1 – Creating the new account, creating an export of the mailbox using pst files, importing this pst file into the new mailbox

How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site