Useful commands for windows admin

To query ntp server of a server
Net Time /querysntp

To sync time of member servers with domain controller
w32tm /resync /nowait

To query FSMO roles in an environment
netdom query fsmo

To query the details of currently logged in users
qwinsta -server servername

To log off a currently logged in user using his session id
rwinsta -server servername sessionid

To query the membership details of a domain user
DSQUERY USER -samid loginname | DSGET USER -memberof -expand

To query the sharing & security details of a folder
showacls

To check whether an account is locked out
NET USER loginname /DOMAIN | FIND /I "Account active"

To unlock a domain user
NET USER loginname /DOMAIN /ACTIVE:YES

To query members in a domain
net view

To query the member DCs of a domain
NETDOM QUERY DC

To collect network statistics
pathping ipaddress

To query the current running tasks
tasklist -svc

To kill a currently running task using its pid number

taskkill -pid pidnumber

Comments

Popular posts from this blog

VMware and Windows Interview Questions: Part 2

VMware and Windows Interview Questions: Part 3

VMware vMotion error at 14%