Posts Tagged ‘Edit’

Hi Folks,

today’s challenge was to bulk set calendar rights in a multilingual environment (with powershell).
On the net you can find some articles that address similar problems, but no real solution.

Download the follwing scripts as txt here.

Here my quick an dirty script:

# Set default as LimitedDetails for all calendars.
# Will get the language forch each users calendar Folder
# TEST WITH ONE ORE MORE USERS
# foreach($mbx in Get-Mailbox -identity USER | where-object {$_.displayname -like "*test user*"})


foreach($mbx in Get-Mailbox -ResultSize Unlimited | where-object {$_.displayname -notmatch "discovery"})

{
$Calfolder = $Mbx.Name
$Calfolder += ':\'
$CalFolder += [string](Get-mailboxfolderstatistics $Mbx -folderscope calendar).Name
$mbx = $CalFolder
$test = Get-MailboxFolderPermission -Identity $mbx -erroraction silentlycontinue
if($test -ne $null)
{
Set-MailboxFolderPermission -Identity $mbx -User Default -AccessRights LimitedDetails | out-null
}
}

If you want to create all new mailboxes with special permissions you nee to configure the Cmdlet Extension Agent
To enable the agent this you have to the following steps:

  • Create an XML file named ScriptingAgentConfig.xml  and save it in your Exchange’s Default Directory on EVERY Exchange Server in your organization
    e.g. C:\Program Files\Microsoft\Exchange Server\V15\Bin\CmdletExtensionAgents

    <?xml version=”1.0″ encoding=”utf-8″ ?>
    <Configuration version=”1.0″>

    <Feature Name=”MailboxProvisioning” Cmdlets=”New-Mailbox”>
    <ApiCall Name=”OnComplete”>
    if($succeeded)
    {
    start-sleep -s 10
    $mbx =  (Get-User $provisioningHandler.UserSpecifiedParameters[“Name”]).distinguishedName
    Set-MailboxFolderPermission -Identity $mbx”:\Calendar” -User “Default” -AccessRights LimitedDetails
    }
    </ApiCall>
    </Feature>

    <Feature Name=”MailboxProvisioning” Cmdlets=”Enable-Mailbox”>
    <ApiCall Name=”OnComplete”>
    if($succeeded)
    {
    start-sleep -s 5
    $user = Get-User -Identity $provisioningHandler.UserSpecifiedParameters[“Identity”]
    $mbx = Get-Mailbox -Identity $user.DistinguishedName
    Set-MailboxFolderPermission -Identity $mbx”:\Calendar” -User “Default” -AccessRights LimitedDetails
    }
    </ApiCall>
    </Feature>

    </Configuration>

 

  • Use the Exchange Management Shell and run the following command on EVERY Exchange server in your organization:
    Enable-CmdletExtensionAgent “Scripting Agent”
  • Create new user

Cheers,

Chris

Recently it was necessary to change  the “From” display name of the sending notifications. This notifications appear e.g. when your mailbox size hits the quota or you get an internal NDR. It’s not possible to edit the sender email address in EMC or EMS but you can change the Display Name of this notification sender by using ADSIEdit.

  • Open ADSIEDIT – Configuration
  • Open the following path:
    Services -> Microsoft Exchange -> “Your Exchange Organization” -> Transport Settings
  • Right click properties on CN=MicrosoftExchange329e71ec88ae4615bbc36ab6ce41109e

In the properties navigate to “displayName” and edit the default value named “Microsoft Outlook” to the display name you want to have.

Click OK and close ADSI Edit.

That’s it.

Regards,

Chris

In some cases you are forced to hard-remove public folders from Exchange. You can use ADSI Edit to delete these folders.

Exchange 2010

Open ADSI-Edit and got to configuration

Navigate to this path:

CN=Configuration,DC=DOMAIN,DC=LOCAL
CN=Services
CN=Microsoft Exchange
CN=EXCHANGE_ORG
CN=Administrative Groups
CN=Exchange Administrative Group (FYDIBOHF23SPDLT)
CN=Databases
CN=PUBLIC_FOLDER_DATABASE

Now you can delete the PF-Database you want to get rid off.

Exchange 2007

Open ADSI-Edit and got to configuration

Navigate to this path:

CN=Configuration,DC=DOMAIN,DC=LOCAL
CN=Services
CN=Microsoft Exchange
CN=EXCHANGE_ORG
CN=Administrative Groups
CN=Exchange Administrative Group (FYDIBOHF23SPDLT)
CN=Servers
CN=SERVERNAME
CN=InformationStore
CN=STORAGE_GROUP
CN=PUBLIC_FOLDER_DATABASE

Now you can delete the PF-Database you want to get rid off.

Exchange 2003

Open ADSI-Edit and got to configuration

Navigate to this path:

CN=Configuration,DC=DOMAIN,DC=LOCAL
CN=Services
CN=Microsoft Exchange
CN=EXCHANGE_ORG
CN=Administrative Groups
CN=First administrative Group
CN=Servers
CN=SERVERNAME
CN=InformationStore
CN=STORAGE_GROUP
CN=PUBLIC_FOLDER_DATABASE

Now you can delete the PF-Database you want to get rid off.

Cheers,

Chris