So you are in a hybrid environment and moved your Public Folders to o365 but suddenly 3rd party people can no longer send you emails?

Yeah… try this:

# For all Public Folders
Get-PublicFolder -Recurse | 
Add-PublicFolderClientPermission -User Anonymous -AccessRights CreateItems

# For a specific Public Folder
Get-PublicFolder -identity "\Folder" | 
Add-PublicFolderClientPermission -User Anonymous -AccessRights CreateItems

 


Trying to block zip files with O365 seems a little painful, as the default GUI does not really give you the option (anymore?) If you Google, you might find screenshots with options to select the attachment but when I checked our GUI, that was all that I saw:

Clearly, there is no option to look for attachments, other than what the attachments CONTAIN.

So, trying PowerShell, something interesting happened.

New-TransportRule -Name 'Rule - Block password protected zip' -Priority '0' -Enabled $true `
-AttachmentExtensionMatchesWords 'zip' -RejectMessageReasonText 'Sorry your mail was blocked because it contained a zip file.' `
-StopRuleProcessing $true -SetAuditSeverity Low -SenderAddressLocation HeaderorEnvelope

Executing this PowerShell command, it created a new rule, that now had more/different options than the rule you could create from the GUI!

Look at this:

And now you can block file extensions and stuff to your heart’s content.

Oddities ¯_(ツ)_/¯


We had a $user who deleted ALL emails from a shared mailbox and you might notice that the option to recover deleted items is grayed out and you cannot select it.

We need to set a registry key to turn that option on.

Key for 32-bit Outlook on a 32-bit version of Windows
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Client\Options
Key for 32-bit Outlook on a 64-bit version of Windows
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Exchange\Client\Options
Key for 64-bit Outlook on a 64-bit version of Windows
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Client\Options

Create a new DWORD value with the name ‘DumpsterAlwaysOn’ and a value of 1.

Easy via PowerShell:

if(!(test-path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Exchange\Client\Options")){
    New-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Exchange\Client" -Name 'Options'
    $props = @{
        # Pick the right path for your OS and Office Version
        path         = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Exchange\Client\Options"
        name         = 'DumpsterAlwaysOn'
        value        = '1'
        propertytype = 'DWORD'
        force        = $true
        verbose      = $true
    }
    
    New-ItemProperty @props
}else{
    $props = @{
            # Pick the right path for your OS and Office Version
            path         = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Exchange\Client\Options"
            name         = 'DumpsterAlwaysOn'
            value        = '1'
            propertytype = 'DWORD'
            force        = $true
            verbose      = $true
        }
        
        New-ItemProperty @props
}

You have to close Outlook and start it again and voila, you can restore items.

 


Want to use PowerShell on your CentOS box? Easier than ever!

# Change to root
sudo su 

# Register the Microsoft RedHat repository
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/microsoft.repo

# Exit root mode
exit

# Install PowerShell
sudo yum install -y powershell

# Start PowerShell
powershell

# Update PowerShell
sudo yum update powershell

 


Grr run into this before, you create a new folder, give it a new name and somehow your cluster thinks, nah we already have that in there. I double and triple checked ‘Share and Storage Management’, there was no shared folder like that for sure.

Well, good ‘ol regedit to the rescue.

HKLM\Cluster\Resources\<GUID>\Paramters\<ShareName>

And indeed, for some odd reason, there was a key with that name in there.

If you find a share that doesn’t belong, you can delete the key for the share on all nodes.