To create a folder/directory using a DOS command, do the following :
Open up a command window i.e. Winkey + R and type cmd into the field and press Enter.
Type : md c:\Testfolder and press Enter
That's it, you will now have a folder called 'Testfolder' on your C drive !
Showing posts with label Dos. Show all posts
Showing posts with label Dos. Show all posts
Sunday, 27 September 2009
Add a user in Active Directory using command line
Access your domain contoller and type the following format to add your user :
dsadd user "cn=Joe Bloggs, ou=IT Admins, dc= Your Domain name , dc=com" -samid joebloggs -upn info@YourDomain.com -fn Joe -ln Bloggs -display "Joe Bloggs" -pwd Pa$$w0rd -desc "Systems Administrator"
*ou = is the name of Organisational Unit you will be adding the user to.
dsadd user "cn=Joe Bloggs, ou=IT Admins, dc= Your Domain name , dc=com" -samid joebloggs -upn info@YourDomain.com -fn Joe -ln Bloggs -display "Joe Bloggs" -pwd Pa$$w0rd -desc "Systems Administrator"
*ou = is the name of Organisational Unit you will be adding the user to.
How to find the size of your hard drive using a DOS command
There are other easier ways of finding the size of your hard drive but this tutorial will show you how to do it using only DOS command.
1. Open the 'run' window by going to the start menu>run (or Winkey + R).
2. Type 'cmd' and press enter and the black DOS window will open
3. Type the following to see the details for C: drive.
'fsutil volume diskfree C:'
4. You will be shown something similar to the following :
Total # of free bytes : 748716032
Total # of bytes : 69265047552
Total # of avail free bytes : 748716032
5. These numbers may be abit confusing so it is best to convert them to Gigabytes or Megabytes using a converter off the net. Here is a link to the converter i used which produced the following results :
Total # of free Mb : 714.03125
Total # of Gb : 64.5081
Total # of avail free Mb : 714.03125
1. Open the 'run' window by going to the start menu>run (or Winkey + R).
2. Type 'cmd' and press enter and the black DOS window will open
3. Type the following to see the details for C: drive.
'fsutil volume diskfree C:'
4. You will be shown something similar to the following :
Total # of free bytes : 748716032
Total # of bytes : 69265047552
Total # of avail free bytes : 748716032
5. These numbers may be abit confusing so it is best to convert them to Gigabytes or Megabytes using a converter off the net. Here is a link to the converter i used which produced the following results :
Total # of free Mb : 714.03125
Total # of Gb : 64.5081
Total # of avail free Mb : 714.03125
Saturday, 26 September 2009
How to restart/shutdown a PC remotely using command line
This question came about when I was on my test server trying to install some software remotely, on a client laptop. I wanted to apply some changes and needed to reboot so rather than rolling the two feet to my laptop I thought "hmmm, how can I do this from here". And here's the answer ...........
Open up a run window (Winkey + R)
Type 'cmd' to open a command prompt
Type :
shutdown m \\computername -s -t : 60 (This will shutdown the PC in question after 60 seconds).
shutdown m \\computername -r -t: 60 (This will restart the PC in question after 60 seconds).
shutdown m \\computername -r -t: 0 (This will shutdown the PC immediately).
shutdown m \\computername -a (This will abort the shutdown once it is counting down)
This code can also be added to a batch file to shutdown multiple PCs all at once !
Open up a run window (Winkey + R)
Type 'cmd' to open a command prompt
Type :
shutdown m \\computername -s -t : 60 (This will shutdown the PC in question after 60 seconds).
shutdown m \\computername -r -t: 60 (This will restart the PC in question after 60 seconds).
shutdown m \\computername -r -t: 0 (This will shutdown the PC immediately).
shutdown m \\computername -a (This will abort the shutdown once it is counting down)
This code can also be added to a batch file to shutdown multiple PCs all at once !
Subscribe to:
Posts (Atom)