Category Archives: Windows

Export Exchange 2007/2010 tracking log

To export Exchange 2007/2010 tracking log to a Excel, just run this command.
get-messagetrackinglog -Start “31-08-2010 00:00:00” -End “01-09-2010 12:16:00″ -resultsize Unlimited | select-object Timestamp,ClientIp,ClientHostname,ServerIp,ServerHostname,SourceContext,ConnectorId,Source,EventId,InternalMessageId,MessageId,TotalBytes,RecipientCount,MessageSubject,Sender,ReturnPath,@{Name=”Recipients”;Expression={$_.recipients}},MessageInfo | Export-Csv
It will export all mails from 31/8-2010 to 1/9-2010, with the selected fiels.

Network Policy Server problems

I have a network policy server that din’t work. There was nothing standing in the Event viewer. I have install Wireshack and could se the packets was incoming and a reject was coming back to the Radius Client.

I was search around to see howthis error was occurring, but i could fine nothing.

I then found the program IAS Log Viewer, and its told me that is what the Connection Request Policy that was the error, as i Delete that and created a new standard one everything was working fine.

The program can be downloaded here: http://www.deepsoftware.com/iasviewer/index.html

Exchange 2007 – Ahsay restore to a recovery group

Ahsay have no support for native restore to Exchange recovery group, but here is a workaround of that problems.

First create a recovery storagegroup
new-storagegroup -LogFolderPath F:\Backup\Restore\Logs -Name ExchangeRestore -SystemFolderPath F:\Backup\Restore\Data -Recovery

Then create a empty database
new-mailboxdatabase -mailboxdatabasetorecover “Mailbox Database” -storagegroup ExchangeRestore -edbfilepath “F:\Backup\Restore\Data\Mailbox Database.edb”

Restore the Exchange 2007 database to a alternative location in ahsay. With both logfiles and the database files, restore it to “F:\Backup\Restore\Data\Mailbox Database.edb” or where you location is.

Then run repair of the restored database.
Eseutil /p “F:\Backup\Restore\Data\Mailbox Database.edb”

Then mount the database
Mount-Database -Identity ‘ExchangeRestore\Mailbox Database’

Example restore a mailbox to a Restore mailbox in the real database.
Restore-Mailbox -RSGMailbox ‘mailbox_to_restore’ -RSGDatabase ‘ExchangeRestore\Mailbox Database’ -id ‘Restore’ -TargetFolder ‘Restore’

Dismount the database
Dismount-database -Identity ‘ExchangeRestore\Mailbox Database’

Remove the database
Remove-MailboxDatabase -Identity ‘ExchangeRestore\Mailbox Database’

Remove the recovery group
Remove-StorageGroup -Identity ‘ExchangeRestore’

Vmware ESX 3.5 and Dell openmanage

First you need to install:
http://www.vmware.com/download/download.do?downloadGroup=VI-RCLI-U2

This is a vmware Remote CLI tools. Install it on a windows machine.
After you install remember to log out and the log in, else you will get some error about libxml.dll cannot be found.

Then download Dell Openmanage  to the same machine that you install Vmware Remote CLI:

http://support.dell.com/support/downloads/format.aspx?c=us&cs=04&l=en&s=bsd&deviceid=2331&libid=36&releaseid=R251021&vercnt=3&formatcnt=0&SystemID=PWE_R710&servicetag=&os=LIN4&osl=en&catid=-1&dateid=-1&typeid=-1&formatid=-1&impid=-1&checkFormat=true

Put the Vmware ESX into maintaince mode.

Put tar.gz file  onto the ESX Host, and the untar the file, and then install the Dell Openmanage

tar zxfv OM_6.2.0_ManNode_A00.tar.gz
cd openmanage
sh setup.sh

Make sure that the Dell openmanage is install on the ESX.

Check if the Dell openmanage is started

/opt/dell/srvadmin/dataeng/bin/dataeng status if not then start it: /opt/dell/srvadmin/dataeng/bin/dataeng start (This commands should be run at the ESX host)

Enable SNMP in the firewall:

esxcfg-firewall -e snmpd
esxcfg-firewall –openPort 1311,tcp,in,OpenManageRequest

On the windows machine where you have install Remote CLI goto folder: C:\Programmer\VMware\VMware VI Remote CLI\bin

vicfg-snmp.pl –server <ESX Host> –username root -c appmanager -p 5567 -t 10.105.2.129/appmanager

vicfg-snmp.pl –server <ESX Host> –username root -E

If you need to test the SNMP traps you can run this command

vicfg-snmp.pl –server <ESX Host> –username root -T

Outlook crash on opening a shared calendar

I have a problems today with an Outlook that keeps crash sometimes when a user is opening a share calendar. I tested it on my test machine and when the user opening the shared calendar at my test machine my own outlook crash also.

I then try to give the user full permission to the mailbox and that resolve the issues.

The error code in the event viewer was:

Faulting application outlook.exe, version 12.0.6514.5000, stamp 4a89dc70, faulting module mso.dll, version 12.0.6425.1000, stamp 49d65443, debug? 0, fault address 0x000057ba.

This is not the best solution but is a workaround for now. It seams to be a bug in the way Exchange 2010 and Outlook 2007 is running.

See also: http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/43469ef9-2274-403c-9a15-44460540f9e4

Delegates (Stedfortræder) problems in outlook

The error messages in Danish:
Indstillingerne for stedfortrædere blev ikke gemt korrekt. send på vegne af-liste kunne ikke aktiveres. Du har ikke den nødvendige tilladelse til at udføre denne handling på objektet.

The error messages in English:
The Delegates settings were not saved correctly.
Unable to activate send-on-behalf-of list.
You do not have sufficient permission to perform this operation on this object.

Solution:
In order to resolve this you need to give Write Personal Information permission to the SELF account on the user who is trying to add the delegate. To do this, follow these steps:-

Connect to your mail server.
Open Active Directory Users and Computers, and then click Advanced Features if it is not already selected on the View menu.
Expand your domain, and then locate the user’s Organisational Unit (OU).
In the right pane, right-click the user who is experiencing the delegate issue, and then click Properties.
Click the Security tab, locate the SELF account, and then click “Write Personal Information” and “Read Personal Information”.
Click OK

Vmware ESXi (ESX) 4.0 and Dell Openmanage SNMP Traps

First you need to install:
http://www.vmware.com/downloads/download.do?downloadGroup=VCLI40U1

This is a vmware CLI tools. Install it on a windows machine.
After you install remember to log out and the log in, else you will get this error:

Can’t load ‘C:/Program Files/VMware/VMware VI Remote CLI/Perl/site/lib/auto/XML/LibXML/Common/Common.dll’ for module XML::LibXML::Common: load_file:The specified module could not be found at C:/Program Files/VMware/VMware VI Remote CLI/Perl/lib/DynaLoader.pm line 230.

Then download Dell Openmanage  offline bundle to the same machine that you install Vmware vsphere CLI:

http://support.dell.com/support/downloads/download.aspx?c=us&cs=04&l=en&s=bsd&releaseid=R250294&SystemID=pwe_r710&servicetag=GWT2J4J&os=EIx4&osl=en&deviceid=21859&devlib=0&typecnt=0&vercnt=1&catid=-1&impid=-1&formatcnt=0&libid=36&typeid=-1&dateid=-1&formatid=-1&source=-1&fileid=365571

Put the Vmware ESXI into maintaince mode.

Start a dos prompt, and go to:

c:\program fileres\vmware\VMware vSphere CLI\bin

Type

vihostupdate.pl –server <IP address of ESXi 4 Host> -i -b <path to Dell OpenManage file>   (On the windows machine)

Reboot the Vmware ESXi machine.

vicfg-advcfg.pl –server <IP address of ESXi 4 Host> –set 1 UserVars.CIMoemProviderEnabled

Reboot the Vmware ESXi machine once again.

Make sure that the Dell openmanage is install on the ESXi.
/usr/lib/ext/dell/dataeng status if not then start it: /usr/lib/ext/dell/dataeng start (This commands should be run at the ESXi host)

vicfg-snmp.pl –server <IP address of ESXi 4 Host> -t <IP address of SNMP Traps destination>/<SNMP community> (On the windows machine)

And this command for enable SNMP Traps
vicfg-snmp.pl –server <IP address of ESXi 4 Host> -E (On the windows machine)

And then this to make Dell Openmanage happy about the SNMP traps configuration.
vicfg-snmp.pl –server <IP address of ESXi 4 Host> -c appmanager

Exit the maintenance mode.

If you need to test the SNMP traps you can run this command

vicfg-snmp.pl –server <IP address of ESXi 4 Host> -T  (On the windows machine)

And if you need to access the openmanage web interface, start Dell openmanage on a windows machine, and then logout (Right corner), and then on the login screen click on “Manage Remote Node”.

Type the ESXi hostname the username is root and the password is the password for root and tick the Ignore Certificate Warnings. Then click login.