SMTP Port 25

Anything and Everything Related to Messaging and Collaboration, Active Directory and Scripting. It’s My Life!!!

Archive for August, 2009

Powershell to Gets the members for the Nested Distributed List

Posted by Krishna - MVP on August 28, 2009

Powershell to get the members of DL and Sub DL and find the unique members

http://www.peetersonline.nl/index.php/powershell/listing-ad-group-members-recursively-with-powershell

Posted in Exchange 2007, Powershell | Tagged: , , , , | Leave a Comment »

Powershell to get list of users who’s Dial in option is enabled in Active Directory

Posted by Krishna - MVP on August 26, 2009

Powershell to get the list of users who has Dial in option is enabled in Active directory.  This has to be executed in Quest Active Roles management console. This will query all the active directory users and get the details if the user object has Dialin option is enabled

Get-QADUser -IncludeAllProperties | ?{$_.msNPAllowDialin -eq $true} |Select Displayname,mailnickname

Below powershell helps you to enable export dial in enabled users to CSV format file

Get-QADUser -IncludeAllProperties | ?{$_.msNPAllowDialin -eq $true} |Select Displayname,mailnickname | Export-Csv C:\Dialinusers.csv

Posted in Active Directory, Powershell | Tagged: , , , , | Leave a Comment »

Powershell to pull Application Event logs with Event Id 1221

Posted by Krishna - MVP on August 25, 2009

Application Event ID 1221 gives the details of the white space on the Exchange Database.  With the amount of white space we can determine if we wanted to do a defrag on the store or not. Below powershell helps you to pull all the application events with id 1221 from last 2 days

$2DaysAgo = [DateTime]::Now.AddDays(-2)
$Events = Get-Eventlog Application | Where {($2DaysAgo -le $_.TimeWritten)} | ?{$_.eventid -eq “1221″}
$Events

Posted in Exchange 2007, Powershell | Tagged: , , , , , | Leave a Comment »

Powershell to get the Home Directory Path

Posted by Krishna - MVP on August 25, 2009

If we wanted to find Home Directory Path of the users in the Orginization then below commands helps you to pull the data

Get-QADUser | select DisplayName,Email,HomeDirectory | Export-Csv c:\HomeDirectory.csv

Command to get the Home Directory for the given list of users and export the result to CSV

get-content C:\users.txt | select DisplayName,Email,HomeDirectory | Export-Csv c:\HomeDirectory.csv

 

 

Posted in Exchange 2007, Powershell | Tagged: , , | Leave a Comment »

Powershell to Manager ManagedFolderpolicy on user accounts

Posted by Krishna - MVP on August 24, 2009

Powershell to manage Managedfolderpolicy on user accounts

Below powershell to apply -Managedfolderpolicy new user mailbox at the time of new mailbox creation

New-Mailbox -Name $DName -Database $Database -UserPrincipalName $PrincipalName -FirstName $FName -LastName $LName -Alias $Aliasname -Password $passwd -ResetPasswordOnNextLogon $true -SamAccountName $Aliasname -ManagedFolderMailboxPolicy $MPolicy

Below  powershell to apply folderpolicy to set to all the mailbox in the orginization

$Folderpolicy = “Policyname”
get-mailbox -ResultSize unlimited |Set-Mailbox -Identity -ManagedFolderMailboxPolicy $Folderpolicy

Powershell to remove folderpolicy to specific users in the DL

Get-DistributionGroupMember $group | Set-Mailbox -Identity -ManagedFolderMailboxPolicy $null

Posted in Powershell | Tagged: , , , | Leave a Comment »

Powershell to find the list of user accounts which is configured as forwards to specific account

Posted by Krishna - MVP on August 24, 2009

Powershell to find the list of user accounts which is configured as forwards to specific account

 Get-Mailbox -ResultSize unlimited | ?{ $_.ForwardingAddress -like “Display name”} | Select DisplayName,PrimarySmtpAddress

Posted in Powershell | Leave a Comment »

Powershell to get the number of mails in the Inbox and number of unread emails in Inbox

Posted by Krishna - MVP on August 24, 2009

Powershell using Outlook.Application to pull out the mailbox details

$outlook = new-object -com Outlook.Application
$session = $outlook.Session
$session.Logon()
$inbox = $outlook.session.GetDefaultFolder(6)
$unreadCount = (%{$inbox.Items | where {$_.UnRead}}).Count
Write-Host $unreadCount
$ItemCount = (%{$inbox.Items }).Count
Write-Host $ItemCount

 

Posted in Powershell | Tagged: , , , | 2 Comments »

Powershell to set AD user password to never Expire

Posted by Krishna - MVP on August 18, 2009

 Below powershell command to set AD user to password never expires

 Set-QADUser -Identity “domain\account” -ObjectAttributes @{useraccountcontrol=65536}

If you have list of users then you can put the file into the txt file and use powershell to set all the required user to password never expires

 get-content “c:\users.txt” | Set-QADUser -ObjectAttributes @{useraccountcontrol=65536}

Posted in Exchange 2007 | Tagged: , , | 3 Comments »

BITPro User Group Meet on 22-Aug-2009

Posted by Krishna - MVP on August 17, 2009

 

There is a small presentation on Exchange 2007 HA and DR by myself (Krishna kumar) and Windows 2008 R2 VDI Over view by MR Ravikanth at Bangalore Microsoft Co-orporation , Signature Building

http://bitpro-fbevent.eventbrite.com/

BangaloreITpro

 

 Kindly register yourself and please attend the same

Posted in Exchange 2007 | Tagged: , , , , | 2 Comments »

Microsoft Exchange Server User Monitor

Posted by Krishna - MVP on August 10, 2009

Microsoft Exchange Server User Monitor is a tool which helps administrator to analyse REAL TIME Individual users utilization and details like outlook version, IP address, CPU Time, Average Latency, Bytes in and Bytes out etc from the perticular Exchange Server.

This tool supports Versions of Exchange link Exchange 2000, Exchange 2003 and Exchange 2007

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=9a49c22e-e0c7-4b7c-acef-729d48af7bc9

ExchUserMon

Posted in Exchange 2007 | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 49 other followers