PowerShell
Jump to navigation
Jump to search
- Windows PowerShell [01] Introduction: https://www.youtube.com/watch?v=TUNNmVeyjW0
- cd command with relative/absolute addressing
- cmd vs cmdlet
- cmdlet typically: Verb-Noun
- cd, dir, ls aliases of cmdlets. Run cmdlet get-alias
- Object-oriented
- get-childitem | select-object name OLD SCHOOL
- get-member to get object definition dump: get-childitem | select-object name | get-member
- (get-childitem | select -First 1).name NEW SCHOOL
- Get-Help object: get-help select-object (wild cards are useable)
- Windows PowerShell [02] Output & File Operations https://www.youtube.com/watch?v=vO0P3JuItcM
- pipe to format- get-childItem | Format-something (Table, Wide, list, volume,
- write-output (alias to echo)
- get-childitem | out-host or out-string or out-file (like > filename ) filename
- check out-gridview
- Work with created file
- move-item (mv)
- remove-item (del)
- Windows PowerShell [03] Profiles & Execution Policies: https://www.youtube.com/watch?v=gLCqSHbXgKI
- Profiles: stuff that runs when PowerShell starts up: typically scripts, find with $profile ($-Variable)
- How to deal with running scripts disabled
- get-execution policy
- set-execution policy
- Windows PowerShell [04] Variables, Types & PSDrives: https://www.youtube.com/watch?v=Mgn9uZtgEpo