Disclaimer: We hope that the information on these pages is valuable to you.
Your use of the information contained in these pages, however, is at your sole risk.
All information on these pages is provided "as -is", without any warranty, whether express or implied,
of its accuracy, completeness, fitness for a particular purpose, title or non-infringement,
and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by site owners or operators.
Further, the site owners and operators shall not be liable for any damages you may sustain by using this information,
whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.
Warning: main(/home/prosphot/public_html/smog/track/write_logs.php) [function.main]: failed to open stream: No such file or directory in /home/prosphot/public_html/blog/skins/leaf/footer.php on line 3
Warning: main(/home/prosphot/public_html/smog/track/write_logs.php) [function.main]: failed to open stream: No such file or directory in /home/prosphot/public_html/blog/skins/leaf/footer.php on line 3
Warning: main() [function.include]: Failed opening '/home/prosphot/public_html/smog/track/write_logs.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/prosphot/public_html/blog/skins/leaf/footer.php on line 3
Tue 07.29.08: Department Script
We needed a way to list all of the users in a mailstore and what department they belong to. We have our mail store membership based on department, so we need to audit it and verify mail store membership. (Just in case someone changes from one department to another department).Here is the script.
$a= get-mailboxdatabase -server ex01 | Sort-Object Name
foreach ($mailstore in $a) {
$b= get-mailbox -SortBy Name | where {$_.Database -eq $mailstore.Identity}
write-host $mailstore.Identity -foregroundcolor red -backgroundcolor green
write-host "**********************************"
foreach ($username in $b) {
$c = get-user $username.Name
write-host $c.WindowsEmailAddress -nonewline
write-host "," -nonewline
write-host $c.Department
}
}
Item Rating Information....