13 December 2012

Find exchange servers in domain

If you need to find exchange servers in a domain you can use one of these options:

1. an active directory  user with mailbox will have 2 attributes (msExchHomeServerName and homemdb) that will contain the name of the mailbox server that has his mailbox - once conected to one server you can use exchange console to find the rest of them;

Get-ADUser samaccountname -Properties msExchHomeServerName, homemdb |Select-Object msExchHomeServerName, homemdb |Format-List


2. active directory computer type objects contain "exchange" word in servicePrincipalName attribute; you can use only your organizational unit that contain your servers if you have one to narrow your search:

Get-ADComputer -Filter * -SearchBase 'OU= SERVERS, DC=domain_name,DC=net' -Properties * | Where-Object {$_.serviceprincipalname -like '*exchange*'} |select-object  name


3. active directory configuration partition contain information about exchange servers in domain; you can search for objects of class msExchExchangeServer:

Get-ADObject -LDAPFilter "(objectClass=msExchExchangeServer)" –SearchBase "CN=Configuration,DC=domainname,DC=net" | Select-Object  name


or you can list all objects from "CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=INTERNAL,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domainname,DC=net" using powershell or ADSI Edit console;

Get-ADObject -Filter * -SearchBase "CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=INTERNAL,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=domainname,DC=net" -SearchScope onelevel

04 December 2012

Error code 0x80041002

Error code 0x80041002 is WMI related and in my case was solved by running the script below; the affected operating system was a Windows 2003 Enterprise Edition SP2 64bits with terminal server role installed;

The problem that i encountered was the server coud not be added to NLB (network load balancer) and the error code in NLB console was 0x80041002;
On the server system log the error was an Event ID: 1020 with the message "TermService clustering failed to update the session directory, hresult=0x80004005."

the script that fix the problem in my case (must be saved with the *.bat extension):


net stop winmgmt
c: 
cd %systemroot%\system32\wbem 
rd /S /Q repository
 
regsvr32 /s %systemroot%\system32\scecli.dll 
regsvr32 /s %systemroot%\system32\userenv.dll
 
mofcomp cimwin32.mof 
mofcomp cimwin32.mfl 
mofcomp rsop.mof 
mofcomp rsop.mfl 
for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s 
for /f %%s in ('dir /b *.mof') do mofcomp %%s 
for /f %%s in ('dir /b *.mfl') do mofcomp %%s 
echo DONE reboot 
pause 

03 December 2012

Tutorial applications

Soo far the best free applications that i found for using at tutorial creations was Jing and Wink;

Jing is very simple and with just a few functions it makes a great tool for taking screenshots or a screencast limited to 5 minutes;
Can identify and autoselect a screen region (an application windows, task bar ...etc ) or use the rectangular selection; Can add arrow, text, frame or highlight;
The downside (for some but not for me) is that in order to use the application you need to register on screencast.com;


Wink is much more complex and you can do lots of things with it but giving the large number of options you need to get familiar with it before using it; one big advantage - it creates high compressed flash presentations; can capture periodically at the specified time interval and or on mouse and keyboard input;