Thursday, August 14, 2008

Multi-Value attributes and Exchange 2007

Some notes, I am putting up . After search I some one guy delete with a lines and another one say you had to loop through everything.

To set a multi-value attribute with the Exchange Management Shell
Set-ContentFilterConfig -BypassedSenderDomains "",""

You will see both "" and "" listed.

to remove one item at a time:
$foo = Get-ContentFilterConfig
$foo.BypassedSenderDomains -=""
$foo | Set-ContentFilterConfig

To clear the entries:
Set-ContentFilterConfig -BypassedSenderDomains $Null

You can also add an value
$foo = Get-ContentFilterConfig
$foo.BypassedSenderDomains +=""
$foo | Set-ContentFilterConfig

Wednesday, August 13, 2008

Active Directory Last Logon

Good info and scripts on Last Logon time, seems like the Windows 2003 DC replicate some info if the logon date is less then 14 days old.

Tuesday, August 05, 2008

Perl Encode Decode strings

So I a file SetACL dump that I was trying to parse with Perl, found that the file encoding was UCS2-Little Endian. I was reading the file into perl and wanted to standardize the formatted output I would generate.

$line = decode('UCS-2LE',$oldline);

#answers found here
#also saw possible answers here
#perl -MEncode -le "print for Encode->encodings(':all')"