Windows server 2003 and Windows XP – How to reset scheduled check disk (CHKDSK)

Posted by aidas | Posted in Windows 2003, Windows XP | Posted on 23-06-2009

0

Two days ago i have encountered following situation.

I have scheduled check disk for C: drive via command line on my Windows server 2003 because it was spitting some strange errors in event log about inconsistency of logical drive.

To check C: drive i have opened command line and typed:

chkdsk C: /f /r

to check logical disk,  locate bad sectors and recover any readable information if needed

After this i was asked if i want to schedule this procedure run after next restart as it cant perform this on running system.

I confirmed that by typing Y.

One hour after i foung buggy software that was the source of errors in event log and CHKDSK i scheduled earlier bacame needless.

After some googling i have found the way you can reset scheduled CHKDSK task.

For that you must open registry by typing regedit in command line.

Navigate to: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager

Can you see BootExecute string in there. I bet you do!

Open it and clear all value data by leaving only autocheck autochk *

regedit chkdsk windows

Registry editor BootExecute string

And… press OK. After this registry editing your CHKDSK sheduled task will be canceled.

Thats it !

Windows server 2008 and Windows Vista – How to change your license key via command line

Posted by aidas | Posted in Command line, Windows 2008, Windows Vista | Posted on 22-06-2009

0

This post will show you quick way to change license key on your Windows server 2008 or Windows Vista using command line.

Lets say we want to change our license key to AAAAA-BBBBB-CCCCC-DDDDD-EEEEE (Note that this is not legal license key !!!) .

To change key open command line (Start>Run>cmd) and type:

slmgr -ipk AAAAA-BBBBB-CCCCC-DDDDD-EEEEE

key_change

Press “Enter” and You are done !

Windows – How to reset local user password to random one

Posted by Thomas | Posted in Command line, Windows 2003, Windows XP | Posted on 22-06-2009

0

This post will show you how to randomly reset local user password on you Windows machine using command line.

Lets say we have local user named “testuser” and we want randomly reset its password.

For this press Start>Run, type CMD and press “OK” .

In command line type:

net user testuser /random

random_password

Press “Enter”.

Password will be reseted and it will be shown to you after you pressed “Enter” button.

The output will be similar to:

random_password2

Good job!

Windows – How to move printer spool directory

Posted by Mark | Posted in Windows 2003 | Posted on 19-06-2009

0

This post will show you how to change print spooler directory path in your Windows system.

It is recommended to relocate print spooler directory to dedicated disk or disk array (Raid 0) in your Print server. This will increase printing performance considerably.

By default print spooler directory is located in %systemroot%\System32\Spool\Printers on your Windows computer.

To change path click Start>Settings>Printers and Faxes.

Press “File” in menu and select “Server Properties”.

Select “Advanced” tab.

print1

Type new path for spool folder in “Spool folder:” field.

Note that new path for spool folder cannot be root of disk (for example G:) and target path must exist before relocating spool folder.

Windows server 2003 – How to configure Terminal service session limits

Posted by Mark | Posted in Terminal services, Windows 2003 | Posted on 18-06-2009

0

This post will show you how to manage terminal server session limits.

If you have many disconnected sessions on your Windows server 2003  and other users are complaining about this mess it is time to make some terminal server configurations.

Login to Windows server 2003 and navigate to Administrative Tools > Terminal Services Configuration.

There click on “RDP-Tcp” and select Sessions tab.

Terminal services configuration

Terminal services sessions tab

Ok, here we can change session time outs and override user terminal session settings that are configured (or not) to each user manually in active directory.

In most cases i use following settings on my Windows servers:

End a disconnected session:  1 hour

Active session limit: Never

Idle session limit: 2 hours

When session limit is reached or connection is broken: Disconnect from session

Windows server 2008 – How to create computer account in Active Directory via command line

Posted by Thomas | Posted in Active directory, Command line, Windows 2008 | Posted on 18-06-2009

0

This post will show you how to create new computer account in active directory using command line.

Lets say, in our scenario,  we want to create  new computer account named “TestPC1″ in default Computers container. Also note that our domain is named “testdomain.com” in this case.

To do it open command line on your Windows server 2008 and type:

dsadd computer cn=TestPC1,cn=Computers,dc=testdomain,dc=com

Windows server 2003 and Windows XP – How to delete files that are blocked by system or processes

Posted by aidas | Posted in Tools, Windows 2003, Windows XP | Posted on 17-06-2009

0

This quick post will show you how to delete files that are being used by system or running processes.

When you try to delete that kind of files on your Windows machine  you get error:

“Access denied”

or

“File/Folder is being used by applications. Please close the application and then try again”

To delete these “corrupted” files you can use  tool named “Unlocker”. It removes lock from file or folder and you can delete it afterwards.

You can download this tool from here .

Cheers!

Windows server 2003 – How to list all Organizational Units via command line

Posted by aidas | Posted in Active directory, Command line, Windows 2003 | Posted on 17-06-2009

0

This post will show how to list all Organizational Units in your domain using command line tool netdom. To list all OU in domain named “testdomain.com” type:

netdom query /d:testdomain.com OU

Note that netdom is part of Windows server 2003 support tools. They can be found on your OS CD (Support\Tools directory).

Windows server 2003/2008 – How to check Exchange 2007 health via powershell

Posted by Mark | Posted in Exchange 2007, Powershell, Windows 2003, Windows 2008 | Posted on 16-06-2009

0

This post will show you how to check basic Exchange server 2007 health using powershell commands.

To check if all required services are running open exchange powershell on you Windows server 2003/2008 and type:

Test-servicehealth

To perform MAPI connectivity check type:

Test-MAPIConnectivity

Windows server 2003 and Windows XP – How to add printer via script

Posted by aidas | Posted in Scripting, Windows 2003, Windows XP | Posted on 16-06-2009

0

In this post i`ll show one of many ways how to connect your users to shared printer. For that open notepad in Windows server 2003 or Windows XP and type:

REM Add Printers
RunDll32.EXE printui.dll,PrintUIEntry /in /n \\sever\printername1
RunDll32.EXE printui.dll,PrintUIEntry /in /n \\sever\printername2

REM Set Default Printer
RunDll32.EXE printui.dll,PrintUIEntry /y /n \\server\printername2
EXIT

For example i have two shared printers on server named “Fileserver” and these printers are shared as “HPLJ1″ and “HPLJ2″. Also i want “HPLJ1″ as default printer for all users. I will type :

REM Add Printers
RunDll32.EXE printui.dll,PrintUIEntry /in /n \\Fileserver\HPLJ1
RunDll32.EXE printui.dll,PrintUIEntry /in /n \\Fileserver\HPLH2

REM Set Default Printer
RunDll32.EXE printui.dll,PrintUIEntry /y /n \\Fileserver\HPLJ1
EXIT

Save this file as Addprinter.bat and place it as login script via group policy or you can deploy it to your users in any other way you prefer.

Windows XP – How to redirect all printer ports to terminal server

Posted by Erica | Posted in Terminal services, Windows 2003, Windows XP | Posted on 15-06-2009

0

Sometimes you can encounter situation when you try to connect to Terminal server using RDP with Printer redirection enabled but printer doesn`t show in Terminal session. This problem occurs with printer port names that do not begin with COM, USB or LPT.  How to deal with that? In that case you must add registry setting to redirect all printer ports. To do that open registry on your Windows XP machine and navigate to:

HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default\AddIns\RDPDR

On the Edit menu select New and then DWORD value. Type FilterQueueType and press Enter. On new value right click and select modify. Type FFFFFFFF and click OK. This will enable all ports to be redirected.

That all!

Windows server 2003 – How to add Additional Account Info tab in user properties

Posted by Mark | Posted in Active directory, Windows 2003 | Posted on 15-06-2009

0

Additional Account Info addon will help you gather some usefull information about your active directory users.

Active directory user

User properties in AD users and computers

In order to have this add on your Windows server 2003 based active directory download “Account Lockout and Management Tools” from here .
Extract contents of the package and copy “acctinfo.dll” file to %systemroot%/system32 directory.

Then press Start > Run and type:
regsvr32 acctinfo.dll

Press OK.

Thats it, now you have additional tab under user properties in your active directory.

Open Active directory users and computers snap in and check it.

Cheers !