i am unable to format my sd card through cmd

Solution
Are you running a command prompt with admin rights?

http://www.pcadvisor.co.uk/how-to/storage/how-erase-write-protected-usb-drive-or-sd-card-summary-3633096/