Find Email Forwards

To find Forward Rules:
foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.ForwardTo} | fl MailboxOwnerID,Name,ForwardTo >> d:\Forward_Rule.txt }

To find Redirect Rules:
foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.ReDirectTo} | fl MailboxOwnerID,Name,RedirectTo >> d:\Redirect_Rule.txt }

Here’s what I ended up using to find rules that wholesale forward or redirect…
foreach ($i in (Get-Mailbox -ResultSize unlimited)) { Get-InboxRule -Mailbox $i.DistinguishedName | where {$_.RedirectTo -or $_.ForwardTo -and -not ($_.description -match "If the message") } | fl MailboxOwnerId,Description >> rules.txt }

Centrify NIS Maps Auto Deploy

Use the File Copy GPO from Centrify to copy the script below to the directory /usr/share/centrifydc/mappers/machine (assure the execute bit is on).


#!/bin/sh
# the next line restarts using tclsh \
exec adedit "$0" "$@"
bind -machine [adinfo domain]
slz [adinfo zone]
foreach map [get_nis_maps] {
    if ([regexp "auto*" $map]) {
                puts "Map is $map"
                slnm $map
                set output [open /etc/$map w 0644]
                foreach line [gnm] {
                    set entry [regsub -all "\{|\}" $line ""]
                    puts $output [regsub ":1|{|}" $entry ""]
                }
    close $output
    }
}

Source http://community.centrify.com/t5/Centrify-Server-Suite/NIS-Maps/m-p/20250#M223

Harden SSH

Add the following 2 lines to your /etc/ssh/ssh_config and the /etc/ssh/sshd_config file:

Ciphers aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-cbc
MACs hmac-sha1

Restart services. Boom. FIPS compliant.