Windows server 2003 and Windows XP – How to change power management options via command line

Posted by aidas | Posted in Command line, Windows 2003, Windows XP | Posted on 12-05-2009

0

This post will show you how to use command line tool powercfg to change power management options. Lets say we need one power-scheme policy for all our portable computers. In this case we will use command line tool powercfg and create bat script which will be distributed to all portable computers users as logon script. Requirements are:

* power-scheme must be set to “Portable/Laptop”
* plugged in monitor turn off – Never
* on battery monitor turn off – 15 min
* plugged in system standby – Never
* on battery system standby – 25 min
* plugged in hard disks turn off – Never
* on battery hard disks turn off – 45 min

To create script open notepad and type:

REM Set power-scheme to Portable/Laptop
powercfg /setactive “portable/laptop”
REM Set plugged in monitor timeout to Never
powercfg /change “portable/laptop” /monitor-timeout-ac 0
REM Set on battery monitor timeout to 15 minutes
powercfg /change “portable/laptop” /monitor-timeout-dc 15
REM Set plugged in system standby to Never
powercfg /change “portable/laptop” /standby-timeout-ac 0
REM Set on battery system standby to 25 minutes
powercfg /change “portable/laptop” /standby-timeout-dc 25
REM Set plugged in hard disks timeout to Never
powercfg /change “portable/laptop” /disk-timeout-ac 0
REM Set on battery hard disks timeout to 45 minutes
powercfg /change “portable/laptop” /disk-timeout-dc 45

Save file as power.bat and distribute to your notebook users as logon script manually or through group policy

Note that you can type powercfg /? in command line for more power management examples

Windows server 2003 – How to change default locations for new user or computer accounts in AD

Posted by aidas | Posted in Active directory, Windows 2003 | Posted on 12-05-2009

0

This post will show you how to change default organizational units for newly created user or computer objects in Active Directory. By default all new computer accounts are being created in OU=computers,dc=mydomain,dc=com and all new user accounts in OU=users,dc=mydomain,dc=com .  In order to change default locations make sure that:

* new default OU exist in AD
* your domain functional level is “Windows server 2003″
* your PDC is online (check FSMO)

Now we will use command line tools redircmp and redirusr to perform change. Lets say you created new OU for computers named “newCmp” and OU for users named “newUsr”.

To change default location for user accounts open command line and type:

redirusr ou=newUsr,dc=yourdomain,dc=com

To change default location for computer accounts open command line and type:

redircmp ou=newCmp,dc=yourdomain,dc=com

Windows – How to troubleshoot microsoft errors

Posted by aidas | Posted in Tools | Posted on 12-05-2009

0

This post will show you how to troubleshoot various errors of Windows server and other products. Microsoft provides you with command line tool which will guide you through errors and will help to understand their meanings.

This tool is named err.exe and can be downloaded from here .

Enjoy

Windows server 2003 – How to add security tab in Active directory users and computers

Posted by aidas | Posted in Active directory, Windows 2003 | Posted on 12-05-2009

0

This post will show you how to access security tab under active directory users and computers snap in. To access it open active directory users and computers snap in (Start>Run, dsa.msc) on your Windows server 2003 or Windows XP computer with admin tools installed. Then click View and select Advanced Features.

Now you`ll be able to see Security tab when you open user account properties.

Windows – How to calculate in advanced way

Posted by aidas | Posted in Tools, Windows 2003, Windows XP | Posted on 11-05-2009

0

This how to will provide you with link to download Microsoft advanced calculator. It is equiped with advanced mathematical and conversion functions.

Tool can be downloaded from this site .

Windows server 2003 – How to backup IIS metabase via command line

Posted by aidas | Posted in Command line, Scripting, Windows 2003 | Posted on 11-05-2009

0

This article will explain how to backup IIS metabase using command line. To perform backup open command line on your Windows server 2003 and type:

cscript iisback.vbs /backup /b <backupname>

Windows server 2003 – How to change default computer account quota in AD schema

Posted by aidas | Posted in Active directory, Windows 2003 | Posted on 11-05-2009

0

This post will show you how to edit Active Directory schema to change default computer account quota. This quota controls how many computers can domain user join to AD. Lets say we want to change quota in testdomain.com domain. To change quota:

1. Open ADSI Edit in microsoft management console

2. Right click, press “Connect to…” and OK

3. Right click on “DC=testdomain,DC=com” and choose properties

4. Browse to “ms-ds-MachineAccountQuota” attribute and modify it to your desired value

Windows Vista – How to fix file association

Posted by aidas | Posted in Windows Vista | Posted on 11-05-2009

0

This post will show you how to fix file associations for Windows Vista OS if they became corrupted. To perform fix follow this article and download appropriate fix for your case.

Windows server 2003 and Windows XP – How to view SID of service

Posted by aidas | Posted in Command line, Windows 2003, Windows XP | Posted on 10-05-2009

0

This post will show you how to use command line to get SID of specific service. To get SID for “workstation” service open command line on your Windows server 2003 and type:

sc showsid workstation

Windows server 2003 and Windows XP – How to delete service via command line

Posted by aidas | Posted in Command line, Windows 2003, Windows XP | Posted on 10-05-2009

0

This post will show you quick way how to ged rid of service using command line. To delete service open command line on your Windows server 2003 and type:

sc delete <service name>

Windows server 2003 – How to clear arp cache via command line

Posted by aidas | Posted in Command line, Networking, Windows 2003 | Posted on 08-05-2009

1

This post will show you how to clear arp cache on your Windows server 2003 using command line. To do it open command line and type:

netsh interface ip delete arpcache

Windows server 2003/2008 – How to delay services start

Posted by aidas | Posted in Registry, Windows 2003, Windows 2008 | Posted on 08-05-2009

0

This post will show you how to delay services start by editing registry. This is usefull when you need to delay some services start in order your server initialize various protocols in right way. This can be done by creating service dependency. To perform it open registry editor on your Windows server 2003 (Start>Run, regedit) and navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

Select service you want to create dependency for and create new Multi-String value named “DependOnService”. Open newly created value and type the name of the service or services you wish to start before this service. The name of the services is exactly as it is under “services” registry key.