How do you automate routine administrative tasks, such as patch deployment or log analysis, using scripting languages like PowerShell or Bash?