# Exchange Server 2007 / 2010 Registry Configuration Dump Script # Version 1.0 # Author: Andy Grogan # Copyright 2009 - http:///www.telnetport25.com # # Description: # # Finds all of the Exchange Services installed on the Exchange Server # The it is executed upon and dumps all of the settings in to a single # File for reference $Exch = Get-ChildItem -Path hklm:\system\currentcontrolset\services | where {$_.Name -like '*Exchange*'} $RegSeed = $Exch.Count $SeedIndex = 0 $DirectoryPath = "c:\ExchRegDirectory" if (!(Test-Path -path $DirectoryPath)) { New-Item $DirectoryPath -type directory }else{ Remove-Item $DirectoryPath -Recurse New-Item $DirectoryPath -type directory } While ($SeedIndex -ne $RegSeed){ $exe = "Regedit.exe" $Fname = "$DirectoryPath\ExchangeReg[$SeedIndex].txt" & $Exe /e $Fname $Exch[$SeedIndex].Name $SeedIndex ++ } $MergeApp = "cmd" $MergerFile = "ExchangeServices.dat" $ExchName = "ExchangeServices.txt" & $MergeApp /c "Copy $DirectoryPath\*.txt $DirectoryPath\$MergerFile" & $MergeApp /c "Del $DirectoryPath\*.txt" & $MergeApp /c "Ren $DirectoryPath\$MergerFile $ExchName" Write-Host "Script Has Completed"