Powershell Flashcards
Redirect the output of a file
dir c:\file1 > file2
File1»_space; file2
Display a directory
Get-childitem-directory
dir
Ls
Display history
Get-history
H
ghy
Create a new file
New-item
Note pad file1
Leafpad file1
What command displays only directorys
Get-childitem -directory
Copy commands
Copy-item file1.txt ./dir1/
Copy file1.txt ./dir1/file1.txt
Cp file1 ./dir1/
Add and remove a permission
attrib +h file1
attrib -h file1
What are the permissions switches
N deny all access F allow full access M modify access RX read/ execute access R read only W wright only D remove user or group for no access
Display command in GUI
Show-command
Change a file property
Set-itemproperty file1.txt -name isReasOnly -value $false
Set-itemproperty file1.txt -name isReasOnly -value $true
Stride threat model
Spoofing Tampering with data Repudiation Information disclosure Denial of service Elevation of services
Authentication vs Authorization
Authentication is (who you are) verifying the identity of the user and authorization is (what you can do) determining users access privileges
Get help
Get-help *
Get-help get-acl
Help command
Execute your profile
Set-executionPolicy remoteSigned Or Get execution Set execution RemoteSigned
Get a list of all the commands
Get-command | more