PowerShell

From Think Outside the Circle
Revision as of 18:42, 4 May 2021 by Dginter (talk | contribs) (create outline with references and notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  1. Windows PowerShell [01] Introduction: https://www.youtube.com/watch?v=TUNNmVeyjW0
    1. cd command with relative/absolute addressing
    2. cmd vs cmdlet
      1. cmdlet typically: Verb-Noun
      2. cd, dir, ls aliases of cmdlets. Run cmdlet get-alias
    3. Object-oriented
      1. get-childitem | select-object name OLD SCHOOL
      2. get-member to get object definition dump: get-childitem | select-object name | get-member
      3. (get-childitem | select -First 1).name NEW SCHOOL
    4. Get-Help object: get-help select-object (wild cards are useable)
  2. Windows PowerShell [02] Output & File Operations https://www.youtube.com/watch?v=vO0P3JuItcM
    1. pipe to format- get-childItem | Format-something (Table, Wide, list, volume,
    2. write-output (alias to echo)
    3. get-childitem | out-host or out-string or out-file (like > filename ) filename
    4. check out-gridview
    5. Work with created file
    6. move-item (mv)
    7. remove-item (del)
  3. Windows PowerShell [03] Profiles & Execution Policies: https://www.youtube.com/watch?v=gLCqSHbXgKI
    1. Profiles: stuff that runs when PowerShell starts up: typically scripts, find with $profile ($-Variable)
    2. How to deal with running scripts disabled
    3. get-execution policy
    4. set-execution policy
  4. Windows PowerShell [04] Variables, Types & PSDrives: https://www.youtube.com/watch?v=Mgn9uZtgEpo