=================================================Show disk Partition and storage Serial Numbers

Show disk Partition and storage Serial Numbers

datapath query device
========================================================Performance Counters WMI

Performance Counters Not Available through WMI
Fix:
   wmiadap /f
===================================================DC Diagnostic & Replication

DC Diagnostic & Replication command:

Repadmin /showrepl

repadmin /showrepl * /errorsonly


repadmin /showrepl * /csv


Verify the Roles have been moved over successfully:
netdom query fsmo

To perform diagnosis on DCs:
dcdiag /e /v > c:\dcdiag.txt


Run :to force sync.
repadmin /syncall 



========================Update Time

 found these steps to make the PDC the time server and configure the other DC, would this work?
PDC
net stop w32time
w32tm /unregister
w32tm /register
net start w32time
net time /setsntp:
Net stop w32time & net start w32time
W32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:manual /reliable:yes /update
W32tm /resync /rediscover
net stop w32time & net start w32time


=================Update PC Time on DC
To Syncronise time with DC:

W32TM /resync /rediscover 

====================Time Check

To configure a client computer for automatic domain time synchronization
w32tm /config /syncfromflags:domhier /update
net stop w32time
net start w32time
check
w32tm /monitor

w32tm /resync

Check last reboot Time:
net stats srv



====================show dc User is authenticated on

Echo %logonserver%



set logonserver ======Check which GC a server is connected to 



==================================================To change the Windows Time service configuration

To change the Windows Time service configuration on the previous PDC emulator
Open a Command Prompt on Previous PDC Emulator Domain controller.

Type the following command and then press ENTER:

w32tm /config /syncfromflags:domhier /reliable:no /update

Type the following command and then press ENTER:

net stop w32time

Type the following command and then press ENTER:

net start w32time

=================Check User Logon to server through DC Details

\\kfmdc13p\logondata$



========================================Check whether a domain controller is acting as a global


Check whether a domain controller is acting as a global catalog server by typing the following at a command prompt: 

dsquery server -domain DomainName | dsget server -isgc -dnsname 

E.G:
dsquery kfmdc22p -domain ud1.utility | dsget server -isgc -dnsname kfmdc22p.ud1.utility



To check whether a domain controller is acting as a bridgehead server by typing the following at a command prompt: 

repadmin /bridgeheads site:SiteName 

where SiteName is the name of the site.



repadmin /bridgeheads [DC_LIST] [/verbose] Parameters DC_LIST Specifies the host name of a domain controller, or a list of domain controllers separated by a space. See above for 


================================Command to Kill Services
http://community.spiceworks.com/how_to/show/312-stop-a-hung-service

If you ever have trouble with a service being stuck in a 'starting' or 'stopping' state, you can run a couple of simple commands to kill the service.
1.  Query the process
To kill the service you have to know its PID or Process ID. To find this just type the following in at a command prompt:

sc queryex servicename 
<Enter>

Replace 'servicename' with the services registry name. For example: Print Spooler is spooler. (See Picture)
   
2.  Identify the PID
After running the query you will by presented with a list of details. You will want to locate the PID. (Highlighted)
   
3.  Run the Taskkill command
Now that you have the PID, you can run the following command to kill the hung process:

taskkill /f /pid [PID] 
<Enter>

This will force kill the hung service. (See Picture)
 
=====================================Command to get target address
CSVDE -r "(&(objectClass=user))" -d "OU=Accounts,DC=ud1,DC=utility" -s NPMDC11P.ud1.utility -l displayname,mail,samaccountname,targetaddress,extensionattribute13,homeMDB -f c:\Mail_TargetAddress.csv

===============================Restart Server Remotely

Shutdown /m \\computername /r /c "Remote Restart" /t 45

===============================Blackberry



To : Effected user
Subject: <Confirm>

@echo off
net stop "BlackBerry Router"
net stop "BlackBerry Dispatcher"
net stop "BlackBerry Controller"
net stop "BlackBerry Synchronization Service"
net stop "BlackBerry Policy Service"
net stop "BlackBerry MDS Connection Service"
net stop "BlackBerry Mail Store Service"
net stop "BlackBerry Attachment Service"
net stop "BlackBerry Alert"
net stop "BlackBerry Administrative Service - Native Code Container"
net stop "BlackBerry Administrative Service - Application Server"
start /wait net start "BlackBerry Controller"
start /wait net start "BlackBerry Dispatcher"
start /wait net start "BlackBerry Router"
start /wait net start "BlackBerry Synchronization Service"
start /wait net start "BlackBerry Policy Service"
start /wait net start "BlackBerry MDS Connection Service"
start /wait net start "BlackBerry Mail Store Service"
start /wait net start "BlackBerry Administrative Service - Native Code Container"
start /wait net start "BlackBerry Administrative Service - Application Server"
start /wait net start "BlackBerry Attachment Service"
start /wait net start "BlackBerry Alert"




================================To Kill A Stuck Service.

Steps Print If you ever have trouble with a service being stuck in a 'starting' or 'stopping' state, you can run a couple of simple commands to kill the service.


1.  Query the process

To kill the service you have to know its PID or Process ID. To find this just type the following in at a command prompt:

sc queryex servicename 
<Enter>

Replace 'servicename' with the services registry name. For example: Print Spooler is spooler. (See Picture)
   
2.  Identify the PID
 
