Kill hanged service
From command line type :
sc queryex [servicename]
This command will return a pid, then you can type :
taskkill /F /PID [id]
to kill hanged service.
Map a network drive
To map \\network_drive\folder (network drive) to P:\\ , you can use this command:
net use P: "\\network_drive\folder" password /user:username /persistent:no
Writing outputs to a file
echo Hello Word
command will display “Hello Word” string in your console. If you want to write “Hello Word” string to a file you can use this syntax:
>C:\outputfile.txt( echo Hello Word )
You can also write this small code inside a .bat file and execute the bat file.
Leave a comment