This post will show you how to view existing domain trust relationships for your domain using command line. To do it open command line on your Windows server 2008 and type:
nltest /domain_trusts
Posted by aidas | Posted in Command line, Windows 2008 | Posted on 06-05-2009
0
This post will show you how to verify if your Windows server 2008 has a valid trust relationship with specified domain. If you want to test trust for server named “Testserver” with domain “Testdomain2.com” open command line and type:
nltest /server:Testserver /sc_query:Testdomain2.com
If you want to list all domain controllers for your domain using command line this how to is for you. To list all DC for domain testdomain.com open command line in your Windows server 2008 and type:
nltest /dclist:testdomain.com
This command will also show you which server holds PDC role.
This post will show you how to view Resultant Set of Policy information with gpresult command. To view policy information for user named “Testuser” open command line on your Windows server 2008 and type:
gpresult /user Testuser
If you want to see only computer related policy settings type:
gpresult /user Testuser /scope computer
If you want to list policy information on remote server named “Testserver” type:
gpresult /s Testserver /user Testuser /scope computer
More gpresult usage examples can be found here .
This post will show you how to find group in Active Directory using command line on your Windows server 2008.
Lets say you want to list all groups in your domain testdomain.com. To do it open command line and type:
dsquery group domainroot
If you want to find all groups those name starts with “test” type:
dsquery group domainroot -name test*
This post will show you how to create Organizational Unit in active directory using command line. Lets say we want to create OU named “TestUsers” in root of our Testdomain.com domain. To do it open command line on your Windows server 2008 and type:
dsadd OU cn=TestUsers,dc=testdomain,dc=com
Posted by aidas | Posted in Command line, Windows 2008 | Posted on 06-05-2009
0
If you have situation when you need to have list of all installed drivers on remote Windows server 2008 this how to is for you. Lets say we want to query server named “Testserver” and also we want to have output displayed in comma separated format. Open command line on your Windows server 2008 and type:
driverquery /s Testserver /fo csv
If you`ll need to change user to higher priviliged one type:
driverquery /s Testserver /fo csv /u testdomain\Admin /p Pa$$w0rd
Posted by aidas | Posted in Command line, Windows 2008 | Posted on 06-05-2009
0
This post will show how to check folder quota free space using command line on your Windows server 2008. Free space is difference between quota limit and amount of space used. Lets say we want to check free space of quota for E:\Temp folder. To perform this operation open command line and type:
dirquota quota freespace /path:E:\Temp
Posted by aidas | Posted in Command line, Windows 2008 | Posted on 06-05-2009
0
This post will show how to create folder quota using command line on your Windows server 2008. Lets say we want to create quota for E:\Temp folder and set it to 300MB. To perform this operation open command line and type:
dirquota quota add /path:E:\Temp /limit:300mb
This post will show you how to install domain controller role on your Windows server 2008 using answer file. Lets say you have answer file “NewDCInstall” which is readied for domain services install. Open command line and type:
dcpromo /answer:NewDCInstall
This post will show you how to use command line to export active directory data to CSV file. Lets say we want to export all objects from Organizational Unit named “FinanceUsers” to exportusr.csv file. Open command line on your Windows server 2008 and type:
csvde -d “ou=FinanceUsers,dc=testdomain,dc=com” -f exportusr.csv
If you want to export your network configuration to a file we will show how to do that. In our case we will export it to networkcfg.txt . Open command line on your Windows server 2008 and type:
netsh -c interface dump > networkcfg.txt
If you`ll need this configuration on this or other server you can import it with this command:
netsh -f networkcfg.txt