Display all groups which is „Domain Users“ group member
dsquery group -name "domain users" | dsget group -memberof -expand | dsget group -samid
Display attribute rIDAvailablePool, this attribute specifies the space from which RID pools are allocated.
dsquery * "cn=rid manager$,cn=system,dc=domain,dc=com" -attr ridAvailablePool
Display list of users not logged since 1.11.2010
dsquery * "ou=users,dc=domain,dc=com" -filter "(&(objectCategory=user)(lastLogonTimestamp<=129330396000000000))" | dsget user -samid
Search a computer on the network by description - useful if description contain full user name
dsquery computer -desc *smith* | dsget computer -samid -desc
List groups a user is a member of
dsquery user -samid *userlogin* |dsget user -memberof -expand
dsquery user -samid *userlogin* |dsget user -memberof -expand |dsget group -samid
This command return the user accounts where is "Hide from Exchange address lists" parameter FALSE
dsquery * "ou=users,dc=myDomain,dc=cz" -limit 1000 -attr distinguishedName showInAddressBook | findstr /i "global"
Display all users atributes
dsquery * "ou=users,dc=myDomain,dc=cz" -attr *
netsh firewall set icmpsetting 8
netsh firewall set icmpsetting 8 disable
set servers=servers.txt
for /f "delims=" %%x in (%servers%) do (
psexec \\%%x -s -i -d netsh firewall set icmpsetting 8
)
source http://www.petri.co.il/enable-ping-windows-2008-server.htm
Change MaxPageSize value to 3000 (default 1000)
C:\Temp\x>type change.txt
dn: CN=Extended Timeout,CN=Query-Policies,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=X
changetype: add
instanceType: 4
lDAPAdminLimits: MaxPageSize=3000
objectClass: queryPolicy
C:\Temp\x>ldifde -i -f change.txt -v -c DC=X "DC=domena,DC=cz"
Connecting to "server1.domena.cz"
Logging in as current user using SSPI
Importing directory from file "change.txt"
Loading entries
1: CN=Extended Timeout,CN=Query-Policies,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=domena,DC=cz
Entry modified successfully.
1 entry modified successfully.
The command has completed successfully
http://support.microsoft.com/default.aspx?scid=kb;en-us;315071&sd=tech