Exchange 2010 – Find version

2 August, 2011 (10:33) | Windows | By: anakha

Open EMS and type the following command to find the current Exchange version level :

GCM exsetup |%{$_.Fileversioninfo}

Example result:

ProductVersion   FileVersion      FileName
————–   ———–      ——–
14.00.0689.000   14.00.0689.000   D:\Program Files\Microsoft\Exchange Server\V14\bin\ExSetup.exe

Exchange 2010 – Find last mailbox login time

2 August, 2011 (10:31) | Windows | By: anakha

From EMS enter the following command:

Get-MailboxStatistics –Identity ‘Domain\Username’

 

VBScript – Shutdown

1 May, 2011 (16:05) | Programming | By: anakha

Option Explicit

Dim TurnItOff, TurnItOffObj

Set TurnItOffObj = GetObject(“winmgmts:{(Shutdown)}//./root/cimv2″).ExecQuery _
(“select * from Win32_OperatingSystem where Primary=true”)

for each TurnItOff in TurnItOffObj
TurnItOff.ShutDown()
next

Join Ubuntu Server to Windows Domain

1 May, 2011 (15:48) | Linux | By: anakha

Likewise Open simplifies the configuration needed to authenticate a
Linux machine to an Active Directory domain. The package is based on winbind
and integrates Ubuntu authentication into an existing Windows network.

NB. The below commands should be run as root or with sudo commands. To
get root, type:

sudo bash

Then enter the root account password.

To install the package, type:

apt-get install likewise-open

After the install has completed, it’s time to join the domain. To
successfully join, the following is required:

1. Access to an AD user with rights to join the domain.

2. The Fully Qualified Domain Name (FQDN) of the domain you want to join.

3. DNS must be set up correctly on the domain.

Type the following command to join the domain:

domainjoin-cli join example.com Administrator

Where example.com is your domain name and Administrator is the user name
of the account with the rights to join the domain.

After joining the domain, you must reboot before trying to authenticate
with a domain user. Type:

reboot

** If you receive the error:

The configuration stage ‘open ports to DC’ cannot be completed
automatically.

Please manually perform the following steps and rerun the domain join:

Some required ports on the domain controller could not be contacted.
Please update your firewall settings to ensure that the following ports are open :

88  UDP
389 UDP
464 UDP
123 UDP

Make sure the Windows Time service is running on the domain controller.

After successfully joining to the Active Directory domain you can
authenticate using any valid AD user. To login you will need to enter the user
name as ‘domain\username’. For example to SSH to a server joined to the domain
enter:

ssh ‘example\username’@hostname

To leave the domain, type:

domainjoin-cli leave

For more info on this package, search – Likewise Open. The homepage has
the changelog and more up to date instructions and troubleshooting tips.

Exchange 2003 SP versions

1 May, 2011 (15:46) | Windows | By: anakha

6.5.6944 : Microsoft Exchange Server 2003 RTM – Released October 2003
6.5.7226 : Microsoft Exchange Server 2003 SP1  – Released May 2004
6.5.7638 : Microsoft Exchange Server 2003 SP2  – Released October 2005

JTR Pipe to Aircrack-ng

1 May, 2011 (15:45) | Linux | By: anakha

You can Use John The Ripper to create all possible password combinations
and feed them into aircrack-ng. Here is the command to use:

root@linux:~# /path/to/jtr –stdout –incremental:all | aircrack-ng -b wireless
AP mac -w – /tmp/capturefile*.cap
More usage examples can be found at:

www.openwall.com/john/doc/EXAMPLES.shtml

NB. default install directory is :

/usr/share/doc/john

Run an exe from VB Script

1 May, 2011 (15:43) | Programming | By: anakha

Try the following code to run an exe from inside a vb script:

Set WshShell = WScript.CreateObject(”WScript.Shell”)
WshShell.Run “””C:\Program Files\PathToExe\MyApp.exe”””
Set WshShell = Nothing

Windows 7 DNS problems

1 May, 2011 (15:37) | Windows | By: anakha

To correct a windows 7 dns problem, open a command prompt as an
Administrator and type:

ipconfig /flushdns

Then type: ipconfig /registerdns

To make sure, type:

netsh int ip reset

Then reboot the machine, type: shutdown -r -t 0

NB. Have you checked the firewall and antivirus?

MadWifi Driver – Return to managed mode

1 May, 2011 (15:35) | Linux | By: anakha

To return to managed mode  – ath0 from root:

wlanconfig ath create wlandev wifi0 wlanmode sta

Change Ubuntu hostname

1 May, 2011 (15:31) | Linux | By: anakha

To change the hostname from the command prompt, type:

sudo bash

Enter account password, then type:

/bin/hostname newhostname