To back up IAS Server, RDP to the IAS server, open command prompt and type netsh aaaa show config > path\backupfilename.txt

Copy the file you created to the new IAS server.

On the new server open command prompt and type netsh exec path\backupfilename.txt

A message appears indicating whether the update was successful or not.

Notes:
There is no need to stop the IAS on either of the server.

  • Share/Save/Bookmark

This is an improved command.

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=”TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount

  • Share/Save/Bookmark
What Command
Set DNS IP Netsh int ipv4 set dns “local area connection” static 192.168.1.120 primary
Disable firewall Netsh firewall set opmode mode=disable
add Credential cmdkey /add:IP_ADDRESS /user:administrator /pass:password
Changing password Net user administrator*
Set time and date Control timedate.cpl
Show interfaces Netsh interface ipv4 interfaces
Set interface IP Netsh interface ipv4 set address name=”2” source=static address=172.16.11.162 mask=255.255.255.0 gateway=172.16.11.1
View hostname Hostname
Change hostname Netdome renamecomputer %computername% /newname:NAME
Restart server Shutdown /r t 0
Join server to domain Netdom join servername /domain:DOMAINNAME /userd:administrator /password:*
Server activation C:\windows\system32>cscript slmgr.vbs /?
Check expiration date Cscript slmgr.vbs -xpr
Activate server Cscript slmgr.vbs -ato
Automatic updates Cscript Scregedit.wsf
Check automatic update status Cscript scregedit.wsf /au /v
Enable automatic updates Cscript scregedti.wsf /au 4
View Roles install on server Oclist
Install Role Ocsetup role_name   (use oclist to check role names)
View services started Net start
Uninstall role Ocsetup role_name /uninstall
View logs Wevutil qe system
Enable remote desktop Cscript scregedit.wsf /ar 0
Disable remote desktop Cscript scredit.wsf /ar 1
view remote desktop settings Cscript scredit.wsf /ar v
Allow pre windows vista RDP connection Cscript scredit.wsf /cs 0
   
Log off from server logoff
Start command prompt cmd.exe   — (start from taskmgr if you close existing windows)
Start virtual disk service to manage disks Net start vbs
Check for windows updates immediately Wuauclt /detectnow
   
   
   
   
  • Share/Save/Bookmark

How to monitor Monitor Exchange 2007 AntiSpam

Use the build in scripts in Exchange 2007 to monitor Exchange’s AntiSpam.
The scripts located at: C:\Program Files\Microsoft\Exchange Server\Scripts

View AntiSpam log:
Get-AgentLog -StartDate “20/06/2009″ | group action | ft name,count –Autosize

View mail queue:
Get-queue

 Top blocked senders
./Get-AntispamTopBlockedSenders.ps1 P1 -top 20 -StartDate “12/06/2009″ -EndDate “20/06/2009″

Top spammed Recipients
./Get-AntispamTopRecipients.ps1 – top 20

Check AntiSpam updates
Get-AntispamUpdates

Other scripts:
Get-AntispamTopBlockedSenderDomains.ps1
Get-AntispamTopBlockedSenderIPs.ps1
Get-AntispamSCLHistogram.ps1
Get-AntispamFilteringReport.ps1
Get-AntispamTopBlockedSenders.ps1
Get-AntispamTopRBLProviders.ps1
Get-AntispamTopRecipients.ps1

  • Share/Save/Bookmark

The following command will enable ssh on your cisco router.

router#crypto key generate rsa

Please note, your router or switch image needs to support 3DES.
(the image name needs to have K9 in it)

  • Share/Save/Bookmark

slmgr.vbs –rearm    — This will give you extra 60 days
slmgr.vbs -dli          — Check status

  • Share/Save/Bookmark

Login to Console
MSTSC /console   – this is for windows 2003 server
MSTSC /admin    – this for windows 2008 server

  • Share/Save/Bookmark

To prepare a windows 2003 domain for windows 08 Domain controller  we need to run adprep

Insert windows 2008 CD and go to the following path:
 D:\sources\adprep\adprep.exe /forestprep (or copy this folder from the windows 2008 CD and copy it to the C drive)

Run the following commands:

adprep /forestprep
adprep /domainprep
adprep /rodcprep

  • Share/Save/Bookmark

This is a known issue for a lot of IT department where multiple administrators logging to servers remotely and forget to log off.

Remote desktop also known as Terminal services can be controlled from Group Policy.

This KB will show you how to control session on a server using Group Policy.

To set automatic logoff of remote sessions on a server we need to edit the following entries on Group Policy:
 If in a domain or in a local server create or modify the following:

Go to -> Local Computer Policy\Computer Configuration\Administrative Templates\Windows Components\Terminal Services\Sessions folder,

the following settings can be modified for your need:

Set time limit for disconnected sessions
Set time limit for active sessions
Set time limit for idle sessions
Terminate session when time limits are reached

  • Share/Save/Bookmark

After installing MySql server on a Linux machine (Debian 5) I got this error message when trying to connect to the Mysql server using Mysql administrator.

When trying to fix the problem and searching the Internet I found out that the problem is easy then what it looked.

By default Mysql server only allows the local host to access the Mysql server.

To fix the problem all we need to edit the mysql config file and add the mysql external ip address to accept connection from (not the localhost)
We add another bind-address entry to the config file.

Follow the steps below to fix the problem:

vi /etc/mysql/my.cnf   – edit the my.cnf file
bind-address            =192.168.100.22         — this is the Mysql server ip address.

Save the file and restart the mysql service:
/etc/init.d/mysql restart.

  • Share/Save/Bookmark