Lab‐ Scripting - connor0329/repository-1 GitHub Wiki

Lab- Scripting Sys Fund.docx

  • Windows Powershell uses Cmdlets which are named accord to a verb-noun naming standard
  • The Get-Command cmdlet gets all of the commands available on the system
  • Get-Command file finds anything related to files
  • Get-FileHash allows you to get the SHA256 hash of a file
  • test-path allows you to check if a certain file exists at a particular location -You can create a script by
    • opening notepad a entering a cmdlet (EX: get-date)
    • save the file as a .ps1, which is an extension used for PowerShell scripts
    • run your script by having entering correct path associated to your script
    • if your already in the directory of the script type, ./"the cmdlet" (Ex: ./getdate)
  • PowerShell can be used to scrape web pages