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