Wednesday, August 31, 2016

CPU Cabinate and Mother Board Form Factor


Computer Cases

full-tower >30 inch (76CM) 6 to 10 Drive Bays
Mid Tower 18 to 24 inch (45 to 60 CM) 2 to 4 Drive Bays mostly used
Mini Tower 12 to 18 inch (30 to 45 CM) 2 or 3 Drive Bays
Slim line case Monitor can be kept on it
Small Form Factor variety of sizes or shapes including shoe boxes, cubes, and book-sized PCs.

Motherboard Form Factor
Size of motherboard is also called form factor. Form factor identifies the size of the circuit board,the location of the slots as well as the location of the faceplate that comes out the back of the computer. The form factor also identifies the location of the holes that are used to mount the motherboard into the system case
-----------------------------
ATX Form Factor (Full ATX) 12″ x 9.6″ (30cm x 24cm) most commonly used
Mini ATX 11.2″ x 8.2″ (28cm x 21cm) less number of buses and memory slots
Micro ATX 9.6″ x 9.6″ (24cm x 24cm)
Flex ATX         9” x 7.5” (22.9 cm x 19.1 cm)
Mini ITX         6.7″ x 6.7″ (17cm x 17cm) still match the ATX hole positions
Em ITX 17 cm x 12 cm
Nano ITX 4.7″ x 4.7″ (12 cm x 12 cm)
Pico ITX         3.9” x 2.8” (10 cm X 7.2 cm)
Mobile ITX 2.4” x 2.4” (6 cm x 6 cm)
DTX Form Factor 8” x 9.6” (20,3 cm x 24,4 cm) backward compatible with ATX form factor
Mini DTX 8” x 6.7” (20,3 cm x 170 cm)

SSI form factor
SSI form factors were developed by SSI (Server System Infrastructure) forum, and are intended for dual or multi processor motherboards used in servers and or even workstations. SSI form factors were derived from ATX specification, so they have the same rear panel, IO connector area, and mounting holes. But, SSI form factors are larger than ATX, so SSI motherboards will not fit in cases designed for standard ATX.

Three SSI form factors are CEB (Compact Electronics Bay), EEB (Enterprise Electronics Bay), and MEB (Midrange Electronics Bay).

The smallest of them is SSI CEB, and the size is 12” x 10.5” (30,5 cm x 26,7cm).
SSI EEB (also called Extended ATX or E-ATX) and dimensions are 12” x 13” (30,5 cm x 33 cm)
The SSI MEB size is 16.2” x 13” (41,1 cm x 33 cm). It is longer in order to provide space for two additional CPU sockets. (4 CPU Socket rest of having 2)

-------------------------
BTX Form Factor
There are a few main differences with the BTX form factor. Notice that the faceplate is on the opposite end. Another difference is that the hole positions are different. Also, the processor socket is slightly rotated so that it is at an angle to the system board.This rotation is to aid in the air㘀㄀ow across the processor to assist in cooling the processor. The BTX motherboard will only fit within a system case that is designed for a BTX motherboard.although there are system cases that are able to accommodate both the ATX and the BTX form factors.availability and variety of BTX-compatible components is limited.

-----------------------
NLX Form Factor
NLX is an older form factor used for slimline desktop-style computers. NLX is an improvement over an even earlier LPX form factor. Notice that this motherboard has no expansion slots for the PCI or ISA bus. The NLX form factor is used in slim line cases that are very short.In order to accommodate expansion cards we use a tab on the edge of the motherboard. We insert a Riser Card on the end of the motherboard. Riser Card is then used for expansion cards, so that now expansion cards lay 㘀㄀at rather than being perpendicular to the motherboard. The riser card does not have built-in ports for audio, joystick, USB, network or modem.

Remember
When choosing a system case, other than considering the size of the computer that we want, the most important thing is to match the motherboard form factor with the form factor supported by the computer case. The most common system case type is the tower. Tower cases are: Full tower, Mid tower and Mini tower. Slim line cases are simply tower cases turned on their sideways. Small form factor or SFF cases are custom cases that are designed to minimize the spatial volume of a desktop
computer. The size of the motherboard is often called the Form Factor. The most common form factor for a motherboard is the ATX form factor. When considering the size of ATX we differentiate Full ATX, Mini ATX, Micro ATX, Flex ATX, Mini ITX, Em ITX, Nano ITX, Pico ITX, Mobile ITX. SSI CEB, SSI EEB, SSI MEB form factors are larger than ATX. When comparing with ATX, BTX form factor has the faceplate on the opposite side, hole positions are di漀椀erent and the processor socket is slightly rotated. The BTX motherboard will only  ㈀t within a computer case that is designed for a BTX motherboard. The NLX is an older style form factor that is not used very often anymore.

Hardware Kiddie.........

Tuesday, August 30, 2016

Start/Stop service with command

Command to stop a service
net stop service

Command to stop a service
net start service

To disable service
sc config servicename start= disable

To enable a service
sc config servicename start= demand

To make a service start automatically with system boot
sc config servicename start= auto

Note: space is mandatory after equal sign

To start Remote Procedure Call service with command
net start RpcSc

Printer related services:
net start browser
net start RpcSc
net start Workstation
net start rpclocator
net start spooler

Audio related services:
net start RpcSc                                                       Remote Procedure Call
net start AudioSrv                                                  Windows Audio
net start AudioEndpointBuilder                             Windows Audio Endpoint Builder
net start MMCSS                                                    Multimedia Class Scheduler

Monday, August 29, 2016

Internet Connection Troubleshooting

Open cmd
A) ipconfig /release                            // Release current dhcp assigned ip
B) ipconfig /renew                             // Assign new ip
C) ipconfig /flushdns                         // Clear dns cache
D) netsh int ip reset                           // Reset tcp/ip stack
netsh winsock reset <catalog>
E) netsh int ip set address "Local Area Connection" dhcp         // set to obtain ip from dhcp
F) run windows network diagnostic by right clicking on adapter
G) rollback network adapter driver from devmgmt.msc
H) disable tcp setting in command prompt
netsh int tcp set heuristics disabled
netsh int tcp set global autotuninglevel=disabled
netsh int tcp set global rss=enabled
I) to confirm tcp setting successfully disabled
netsh int tcp show global
J) turn off firewall
netsh advfirewall set allprofiles state off
to turn on firewall all profile
netsh advfirewall set allprofiles state on

How to disable or enable lan adapter with command

List all network adapters and connection with wmic

wmic nic get name,index

Enable lan adapter with wmic

wmic path win32_networkadapter where index=1 call enable
Disable lan adapter with wmic
wnuc path win32_networkadapter where index=2 call disable

To list all the network interface with command

netsh interface show interface

Enable lan adapter

netsh interface set interface name="Local Area connection" admin=enabled

Disable lan adapter

netsh interface set interface name="Local Area connection" admin=disabled
List Wifi profiles
netsh wlan show profiles

Connect to wifi profile

netsh wlan connect name="profile name"

How to run commands on multiple files with forfiles command

Forfiles is a useful windows command to select a set of files and then run a command on each of the files. It’s similar to the functionality of find command on Linux OS.
forfiles <Criteria to select files> /C "command to applied on each of files selected"
The criteria we can use to select files:
(Option /D) Modifies date or number of days it was last modified from
(Option /M) Search files based on names
(Option /S) Look for files in sub-directories also
(Option /P) Look for files in Specific directory

Find all excel files modified 10 days back in the current folder and subfolders

forfiles /D -10 /S /M *.xlsx /C "cmd /c echo @path"


In the above command @path is used to print the complete absolute path of the file. Similarly we can use below variables in the command part.
@file : Name of the file includes extension
@fname : Name of the file excludes extension
@relpath : Relative path of the file from the current folder
@ext : Extention of  the file
@fsize : Size of the file
@fdate : Last modified date of the file
@ftime : Last modified time of the file

delete all log files created in the last 1 month

forfiles /D +30 /S /M *.log /C "cmd /c del @file"

Copy/Backup files modified after 1st Jauary 2015

forfiles /D 01/01/2015 /M * /C "cmd /c copy @file D:\backupfolder\"

Get list of all picture files with their size

forfiles /S /M *.jpeg /C "cmd /c echo @path @fsize"

Get list of all exe’s and their last modified date

forfiles /M *.exe /C "cmd /c echo @path @fdate"

Get list of files which is less than given size

forfiles /S /M *.txt /C "cmd /c if @fsize LSS 1000 echo @file"

List all sub-directories in a given folder

forfiles /M * /C "cmd /c if @isdir==TRUE echo @file"

Recursively rename file extentions

If you want to rename files from one extension to another, recursively in all sub folders, then you can use the below command.
forfiles /S /M *.ext1 /C "cmd /c rename @file @fname.ext2"

Recursively remove file extentions

forfiles /S /M *.ext /C "cmd /c rename @file @fname"

Recursively add prefix in filenames

forfiles /S /M *.jpg /C "cmd /c rename @file photo@file"

How to user Systeminfo Command by filter its information

By Systeminfo command you can get following information.

Computer name, OS version, OS configuration, OS type, Install Date, System uptime data, BIOS version, Available physical memory, Processor model, Hotfixes installed, Network cards information, Domain name of the computer, System Locale, Time Zone and many other details.
if we want to get any particular information we can use findstr command to filter out unwanted details--------------------------
To get system’s physical memory information
systeminfo | findstr /C:”Total Physical Memory”
To get System type from windows
systeminfo | findstr /C:”System type”
To find System locale
systeminfo | findstr /C:”System Locale”
To find system manufacturer
systeminfo | findstr /C:”System Manufacturer”
To find OS install date
systeminfo | findstr /C:”Install Date”
To find System uptime

systeminfo | findstr /C:”Up Time”



Systeminfo Syntax :
systeminfo[.exe] [/s Computer [/u Domain\User [/p Password]]] [/fo {TABLE|LIST|CSV}] [/nh]

Parameters

/s   Computer   Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/u   Domain \ User   Runs the command with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command.
/p   Password   Specifies the password of the user account that is specified in the /u parameter.
/fo { TABLE | LIST | CSV Specifies the format to use for the output. Valid values are TABLELIST, and CSV. The default format for output is LIST.

/nh   Suppresses column headers in the output. Valid when the /fo parameter is set to TABLE or CSV.
The following examples show how you can use the systeminfo command:
systeminfo.exe /s srvmain
systeminfo.exe /s srvmain /u maindom\hiropln
systeminfo /s srvmain /u maindom\hiropln /p p@ssW23 /fo table

Thursday, August 18, 2016

How to disable file sharing in windows

In Windows, one can share files to other users in the same network using SMB protocol. We can disable sharing of a folder/drive from command prompt using net share command.

Open elevated windows command prompt and run the below command to see shares
c:\>net share
To disable sharing C$, run the below command
c:\>net share C$ /DELETE
To disable file sharing on the computer
c:\>net stop lanmanserver
Note: Stopping this service also stops Computer Browser Service

Happy Sharing...

How to set default printer for local or remote user

Set Default Printer Via Command Line

to get the printer name
wmic printer get name

for local user

cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -t -p <printer name>


RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "printer"

rundll32 printui.dll,PrintUIEntry /y /q /n “Printer name”

set a user's default printer for remote user
RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n"\\JSI001.JSIINC.COM\HP Business Inkjet 2250 (PCL5C)"

wmic to set default printer

get the list of printers installed on the computer

wmic printer get name,default
on remote pc:
cscript prnmngr.vbs -l [-s RemoteComputer] [-u UserName -w Password]

get the default printer name
On local pc

wmic printer where default='TRUE' get name
On remote pc
cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -g -s <hostname>

set the default printer

wmic printer where name='printername' call setdefaultprinter
on remote:
cscript prnmngr.vbs -t -p PrinterName -s <hostname>

To delete the printer named ColorPrinter_2 from the remote computer named HRServer, type:
cscript prnmngr.vbs -d -s HRServer -p ColorPrinter_2
To delete all of the printers from a computer
cscript prnmngr.vbs -x [-s RemoteComputer] [-u UserName] [-w Password]
cscript prnmngr.vbs -d -p PrinterName [-u UserName -w Password] [-s RemoteComputer]
To add a printer named ColorPrinter_2 that is connected to LPT1 on the local computer and requires a printer driver called Color Printer Driver1, type:
cscript prnmngr.vbs -a -p ColorPrinter_2 -m "Color Printer Driver1" -r lpt1:
To add a printer connection

Syntax

cscript prnmngr.vbs -ac -p PrinterName 
-ac   Required. Specifies that you want to add a printer connection.
To add a local printer

Syntax

cscript prnmngr.vbs -a -p PrinterName [-s RemoteComputer-m DriverName -r PortName [-u UserName -w Password]
https://technet.microsoft.com/en-in/library/bb490973.aspx


Wednesday, August 17, 2016

Handling print jobs

To delete printjobs of specific printer

wmic printer where name="HP LaserJet" call cancelalljobs

To see the list of jobs we have in the queues
wmic printjobs get

To delete printjob

wmic printjob where jobid=<jobnumber> delete
Pause a print job

wmic printjob where jobid=<jobnumber> pause

prints lot of details about each printer job
wmic printjob get jobid, document, jobstatus

Resuming a print job


wmic printjob where jobid=<jobnumber> resume

Handling print jobs

To delete printjobs of specific printer

wmic printer where name="HP LaserJet" call cancelalljobs

To see the list of jobs we have in the queues
wmic printjobs get

To delete printjob

wmic printjob where jobid=<jobnumber> delete
Pause a print job

wmic printjob where jobid=<jobnumber> pause

prints lot of details about each printer job
wmic printjob get jobid, document, jobstatus

Resuming a print job


wmic printjob where jobid=<jobnumber> resume

uninstall a program with command

To know the name of already installed software in your computer

wmic product get name

and to uninstall software by their name

wmic product where name="windows live writer" call uninstall

To terminate a running program without asking for save

wmic process where name="iexplore.exe" call terminate
wmic process where name="notepad.exe" call setpriority 64
wmic /node:steve-pc service list brief

Share printer with commnad on own or remote pc

We can use pstools to connect to remote pc command prompt,, download it from

https://download.sysinternals.com/files/PSTools.zip

extract pstools folder --> hold the shift key --> right click in the folder --> select command prompt
Start a CMD session on the remote machine using psexec by typing below commnad

psexec \\remote-pc cmd

After connecting, list the printers available on the machine:
c:\pstools\>wmic printer get name
printer1

  1. If you want to make printer1above shared:
    > rundll32 printui.dll,PrintUIEntry /Xs /n "printer1" Sharename "Printer1"
    > rundll32 printui.dll,PrintUIEntry /q /Xs /n "printer1" Attributes Shared
  2. Confirm the printer is available by going to \\remote-machine in Windows Explorer; you should see the printer available now.
To get printer shared or not or to know the sharename of the printer with command type the following : 

wmic /node:remote-pc printer get shared,sharename,caption,name,portname

To delete printer 
wmic printer where name='printer1' delete
wmic printer where local='false' delete

To list printer in brief

wmic printer list brief

wmic /node:steve-pc service list brief
wmic process where name="notepad.exe" call setpriority 64



Examples
WMIC OS 

WMIC OS LIST BRIEF

WMIC OS GET csname, locale, bootdevice

WMIC OS GET osarchitecture /value

WMIC OS GET localdatetime

WMIC LOGICALDISK where drivetype!=4 get deviceid, description

WMIC LOGICALDISK where description='Local Fixed Disk' get deviceid, volumename

WMIC NTEVENT where LogFile='system'

WMIC NTEVENT where "LogFile='system' and Type>'0'" 

WMIC SERVICE where (state=”running”) GET caption, name, state > services.tsv

WMIC SERVICE where caption='TELNET' CALL STARTSERVICE

WMIC PRINTER LIST STATUS

WMIC PRINTER where PortName="LPT1:" GET PortName, Name, ShareName
 
WMIC /INTERACTIVE:ON PRINTER where PortName="LPT1:" DELETE

WMIC PROCESS where name='evil.exe' delete

WMIC /output:"%computername%.txt" MEMORYCHIP where "memorytype=17" get Capacity

WMIC /node:remote_computer PROCESS call create "netstat.exe -ano > C:\output.txt"

WMIC /node:@workstns.txt /failfast:on PROCESS call create "\\server\share\installer.cmd"

Interactive mode:
C:> WMIC
wmic:root\cli> OS get csname
wmic:root\cli> quit