Windows Command Prompt Flashcards
Get-LocalGroup
Get default local groups listed w descriptions
Get-LocalUser
gives the names of users, if they are enabled or not, with description
Get-LocalGroupMember
can see which users are in the group
cat etc/password
first field is username, password, UID (user ID),
How to reset password in GUI
computer management, local users and groups, select account, properties, then you can ask to reset PW or set it manually for them by selecting set PW
net user cindy ‘some_password’ OR * to then ask for PW for user
OR /logonpasswordchg:yes
to change a users password, set it hidden from sight, or for next login they will have to change it
passwd cindy
changing password for cindy in Linux, you need current PW, then entering a new one
new -localuser in windows
creates a new user in windows
net user cindy * /add
adds a new user called cindy and asks for the password/hidden in Windows
net user cindy /logonpasswordchg:yes
next login cindy will need to change her password in Windows
net user cindy /del
delete cindy command in Windows
Remove-LocalUser Cindy
removes a local user in Windows
sudo userdel cindy
deletes a user in Linux
icacls
which users have access to my desktop, letters represent each permission (OI) (CI) (F) read write execute files
icacls “C:\Vacation Pictures” /grant “Everyone: (OI)(CI)(R)”
it would be single quotes ‘ asdf’ in Windows Powershell Admin command prompt
grants everyone to see pics
icacls “C:\Vacation Pictures” /grant “Authenticated Users:(OI)(CI)(R)”
to grant only people with passwords access
using chocolatey is used for?
Install-Package -Name sysinternals
lets you install any package or software that exists in the public chocolatey repository
can create your own private repository if you need to package something like an internal company app
orca.exe
used to create MSI installer packages as a programmer
Diskpart
shows the disk and version used
list disk
select disk 1
clean
create partition primary
select partition 1
active
format FS=FTFS label=my-thumb-drive quick
lists the disks used, size, and available room
mounting
making something accessible to the computer, like a filesystem or hard drive
notepad.exe file_1_shortcut.lnk
mklink /H file_1_hardlink file_1.txt (can change the name)
makes a symbolic link aka shortcut that opens original
fsutil repair query C:
chkdsk /F D:
can enable general repair to a disk if not shut down properly
taskkill /pid 5856
process ID (PID) can task kill
tasklist
Get-Process (for powershell)
shows all the tasks running
Process Explorer is…
Process Explorer is a utility Microsoft created let IT support specialists, systems administrators, and other users look at running processes.
Get-Process (powershell)
Get-Process | Sort CPU -decending | Select -first 3 -property ID, ProcessName, CPU
gets processes,
gets detailed processes with the processes using most CPU with added details listed
cp *.jpg C:\Users\Drdoo\Desktop\
cp ‘bird pics’ C:\Users\Drdoo\Desktop\ -Recurse -Verbose
will copy all files of .jpg to this area
will copy the directory and any sub directories to copy contents and directory itself
mv .\blue_doc.txt yellow_doc.txt
it will move/rename the file, can also move files from a directory to another
rm -Force
removes with force for admin privilege’s
more myfile.txt
more myfile.txt -Head 10
goes into more program, a separate file,
top 10 lines of file
enter key to go line by line,
space for page by page,
q to quit
putty.exe -ssh drdoo@104.131.122.215
will remote connect using putty
pscp.exe C:\Users\drdoo\Desktop\myfile.txt cindy@104.131.112.215:
will copy a file from the path to the IP address
net share ShareMe=C:\Users\drdoo\Desktop\ShareMe /grant:everyone,full
share a folder called shareme showing the path, granted to certain users or everyone with what types of access
eventvwr.msc
event viewer to view why a computer is crashing or troubleshooting