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 "faker1.com","faker2.com"
Get-ContentFilterConfig

You will see both "faker1.com" and "faker2.com" listed.

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


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


**************************************************
You can also add an value
$foo = Get-ContentFilterConfig
$foo.BypassedSenderDomains +="faker4.com"
$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.


http://www.rlmueller.net/Last%20Logon.htm

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
#http://perldoc.perl.org/Encode.html
#and
#http://coderepos.org/share/browser/lang/perl/Encode/trunk/t/Unicode.t
#also saw possible answers here
#perl -MEncode -le "print for Encode->encodings(':all')"