Lecture 1: Getting Started
Video 1: starts with getting PowerShell all setup. I changed the background to black and the font to neon green, just like the a400 hack days. Font 24 size
Part 1: Getting Started
1. Always start out with command
Start-Transcript
*allows script to be saved
2. get-command
*everything available in PS
3. get-
(verb)(command)(noun)
*everything in PowerShell must be in this format
**noun= parameter
4. Other examples
get-command-Noun service
*returned 8 objects about service
5. get-help get-service
* this is the help section
6. get-help get-service -examples -online
* good command to show examples
7. cls
*(alias) clears screen
**translate alias get-alias cls
***returns -> Clear-Host
****this is: (verb)(command)(noun)
8. get-process
*this is similar to task manager
9. pipe over command (|)
*| denotes pipe
10. get-member
*denotes all the properties and methods of that object
**properties: example car: color, type, brand
***methods: open door, start car, break car
11. | select-object *
(pipe)(verb)(command)(noun)(all)
Part 2: Variables
1. $zebra = get-process MicrosftEdge
*(variable) = (verb)(command)(noun) (object)
2.$zebra
*check to see if variable was set
3. $zebra.name
*(variable).(property)
4. $zebra.kill()
*(variable).(Method)
5. get-history
*what we did
6. transcripts located in documents folder
No comments:
Post a Comment