Tuesday, 2 October 2012

Useful Command Lines on Window System

1.    System File Checker:
cmd > Run as admin > scf /scannow

2.    Flush DNS
ipconfig /flushdns

3.    Resume Paused BitLocker
cmd > Run as admin> cscript manage-bde.wsf –resume c:

4.    Check Bitlocker Encryption Status
Cmd > Run as admin > cscript manage-bde.wsf -status

5.    Reset Winsock
Run as Admin > netsh winsock reset

6.    GPUPDATE
Cmd > gpupdate /force

7.    Convert FAT32 to NTFS
Cmd > convert e: /fs:ntfs (where e: refer to external thumb drive)

8.    Reset Outlook Application
Cmd > outlook.exe /resetnavpane

9.    Get serial number from hostname
Host machine must connect to LAN network (ping L11123456)
Run as Admin > wmic /node:L11123456 bios get serialnumber


10.    Get username from hostname
Hostname machine must connect to LAN network (ping L11123456)

Run as Admin > wmic /node:L11123456 computersystem get username


11.    Redirect IPCONFIG Results to External Drive
Useful command line to copy out the log details from DOS, recreate into text file and transfer to external thumbdrive.
To make a copy of ipconfig /all details, convert into text file and redirect it directly into your external thumbdrive(e:\)
Run Admin command prompt.
Type in:
ipconfig /all >e:\ipdetails.txt
where e:\ is refer to your external thumbdrive


12. Redirect System File Checker Results to External Drive
After performing the System File Checker (sfc /scannow),a CBS.LOG will be created.
To make a copy of the log details (CBS.LOG)and redirect it your external thumbdrive (e:\)
Open the Admin command prompt.

Type in:
findstr /c:"[SR]" %windir%\logs\cbs\cbs.log >e:\sfcdetails.txt
where e:\ is refer to your external thumbdrive
 and press "Enter". This will place a sfcdetails.txt file on your desktop with the SFC scan details from the CBS.LOG.
Open the sfcdetails.txt and look for the unfixable entries.

13.    Group Policy Results to generate report as Html
Run as Administrator
gpresult /h GPReport.html

14.    Group Policy Results to text
gpresult /z >policy.txt

15.    Copy ipconfig to text file
Run as Admin > ipconfig /all > c:\test.txt

16.   Check Hardisk for Bad Sector
Run as Admin > chkdsk c: /f

17. Reset Outlook
Run > outlook.exe /resetnavpane

18. Winsock Reset
Run as Admin > netsh winsock reset

19. Check BIOS version
Cmd > systeminfo
Run > msinfo32

20. Check VGA Driver
Run > dxdiag

21. Check Service Pack on Windows
Run > winver

22. Get Computer Serial Number
Cmd > wmic bios get serialnumber

23. Get Computer Model Number
Cmd > wmic csproduct get name

24. Get Computer name / Hostname
Cmd > hostname