SMTP Port 25

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

Archive for February, 2010

Powershell to find version of Transport.exe on all Exchange Transport servers

Posted by Krishna - MVP on February 25, 2010

Powershell to find version of Transport.exe on all Exchange Hub Transport server

$TsServer = Get-TransportServer
foreach($server in $TsServer){
$name = $server.name
$storever = [System.Diagnostics.FileVersionInfo]::GetVersionInfo(“\\$name\c$\Program Files\Microsoft\Exchange Server\Bin\EdgeTransport.exe”).Fileversion
$res = $server.name  + ” = ” + $storever
$res
}

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

Powershell to Find Store.exe Version on All Exchange Mailbox Servers

Posted by Krishna - MVP on February 25, 2010

Powershell to Find Store.exe Version on All Exchange Mailbox Servers. We need to make sure that Store.exe is constant on all the servers.  Below script helps you to get same

$MBXServer = Get-mailboxServer
foreach($server in $MBXServer){
$name = $server.name
$storever = [System.Diagnostics.FileVersionInfo]::GetVersionInfo(“\\$name\c$\program files\microsoft\exchange server\bin\store.exe”).Fileversion
$res = $server.name  + ” = ” + $storever
$res
}

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

VBScript to Add users Security Group to local computer if Computer object is under specific OU

Posted by Krishna - MVP on February 25, 2010

VBScript to Add users Security Group to local computer if Computer object is under specific OU. For Security reason we always need to make sure that only specific security groups are administrators of specific computers. This will always be the business requirement. With below script you can obtain this. Include this script in in the GPO and Add in to user logon script.


DIM objNetwork
DIM computerName
DIM ou
set objNetwork = createobject(“Wscript.Network”)
computerName = objNetwork.ComputerName
ou = getOUByComputerName(computerName)

on error resume next
Select Case ou

Case “OU=Computers,DC=domain,DC=com”
set group = GetObject(“WinNT://”& computerName &”/Administrators”)
group.Add “WinNT://domain/Group”
err.clear

Case “OU=Computers1,DC=domain,DC=com”
set group = GetObject(“WinNT://”& computerName &”/Administrators”)
group.Add “WinNT://domain/Group1″
err.clear

End Select

function getOUByComputerName(byval computerName)
DIM namingContext, ldapFilter, ou
DIM cn, cmd, rs
DIM objRootDSE
set objRootDSE = getobject(“LDAP://RootDSE”)
namingContext = objRootDSE.Get(“defaultNamingContext”)
set objRootDSE = nothing
ldapFilter = “<LDAP://” & namingContext & _
“>;(&(objectCategory=Computer)(name=” & computerName & “))” & _
“;distinguishedName;subtree”
Set cn = createobject(“ADODB.Connection”)
set cmd = createobject(“ADODB.Command”)
cn.open “Provider=ADsDSOObject;”
cmd.activeconnection = cn
cmd.commandtext = ldapFilter
set rs = cmd.execute
if rs.eof <> true and rs.bof <> true then
ou = rs(0)
ou = mid(ou,instr(ou,”,”)+1,len(ou)-instr(ou,”,”))
getOUByComputerName = ou

end if
rs.close
cn.close

end function

You can always find the copy from the below link

http://powershell.com/cs/cfs-filesystemfile.ashx/__key/CommunityServer.Components.UserFiles/00.00.00.30.62/AddAdminfinal.txt

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

Windows Powershell Scripting – Presentation

Posted by Krishna - MVP on February 16, 2010

 

Please find my Presentation file on Windows Powershell scripting presented Community Tech Days 2010

CDT-Powershell Feb 2010

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

Microsoft – Community Tech Days – Windows Powershell Scripting and Exchange 2010 HA Demo

Posted by Krishna - MVP on February 16, 2010

 

I will be presenting Windows Powershell Scripting and new features of Powershell 2.0 and Exchange 2010 HA Demo

Register at http://Bitpro.in

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

Exchange Database – Dirty Shutdown

Posted by Krishna - MVP on February 10, 2010

As Exchange Administrator it would be bad day if you have exchagne database in Dirty Shutdown State and you dont have required log files to perform soft recovery. Below link has a steps on how to perform soft recovery if you have al the require log file.

http://smtpport25.wordpress.com/2009/07/13/disaster-recovery-of-exchange-2007-mailbox-server/

If you dont have the required log files then you have to follow below steps to recover the database

1. Run ESEUTIL /P database_filename.edb (from the BIN folder and repair the edb files)
2. Delete the log and chk files.
3. Run eseutil /d database_filename.edb (Defrag the Database)
4. Run isinteg (isinteg -s servername -fix -test alltests) from the bin folder.
5. Mount the stores

Eseutil and Isinteg would be really long time , depending on the size of the database. Microsoft always recommends to keep the database size less then 100 GB. If you are using CCR environment then it can grow more then 100 GB as you will be multipe copies of the log files for recovery purpose

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

Recover deleted Active Directory objects with the AD Recycle Bin PowerPack – Windows 2008 R2

Posted by Krishna - MVP on February 4, 2010

Here is the Cool video on Recovering Deleted Active Objects with AD Recycle Bin PowerPack on Windows 2008 R2..

Windows 2008 R2 Rocks..

http://poshoholic.com/2009/08/18/recover-deleted-active-directory-objects-with-the-ad-recycle-bin-powerpack/

Posted in Exchange 2007, Windows 2008 R2 | Tagged: , , | Leave a Comment »

Diagnostic Logging to find Deletion of Public folder in Exchange 2007 and Exchange 2010

Posted by Krishna - MVP on February 4, 2010

 

Many users will have access to the Public Folder and Many are the owner of Public folder and have full access to it. Chances are that use accidently deletes the folder or some times intentional. To identify this we have to Enable logging on Public folder.  Below has the steps to enabled the same

1. Open Exchagne Management Console
2. Expand and select Server Configuration
3. On the right you will find all the servers
4. Select the Exchange Server where public Folder Database is residing
5. Right click on the Server and select Manage Diagnostic Logging
5. Expand to reach MSexchangeIS-> 9001 public and click on General and  
6. Select Medium and configure to enable this settings

7. When a Public Folder is deleted Event ID 9682 is logged in the Application log. You can search for the evet Id in the application logs.

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

 
Follow

Get every new post delivered to your Inbox.

Join 50 other followers