IT automation involves replacing manual tasks with automated processes. This eliminates manual steps by employing software and applications to streamline existing tasks.
- Different programming languages are available.
- Creation of repeatable processes.
- Ensures consistent configuration and deployment.
- Scripts are built into most operating systems.
- Easier to learn compared to fully deployed automation platforms.
- Quick automation of smaller tasks.
- Automation of tasks not feasible within larger platforms.
- Time and effort saving, leading to increased infrastructure management productivity.
- Task Execution: A set of ordered instructions or commands for performing actions within an environment.
- Configuration Modifications: Modify configurations, such as Windows settings, using locally executed or login process-integrated scripts.
- Deployment: Applied to both on-premises and cloud services.
Yes:
- Ease of creation for scripting.
- Can automate less complex tasks.
- Utilizes powerful coding languages and commands for UI tasks.
No:
- Scripting can be slow and time-consuming.
- Maintenance of scripts can be challenging.
- Scripts are part of an overall IT automation strategy.
- Command Prompt and batch files.
- PowerShell and script files.
- Task Scheduler and tasks.
- Launching multiple applications.
- Starting applications as an administrator.
- Cleaning file storage.
- Restarting and shutting down the operating system.
- Backup of files and folders.
start 1337.exe
start chrome.exe
Start-Process "1337.exe"
Start-Process "chrome.exe"
Runas /user:COMPUTER\user "C:\1337.exe"
Start-Process "C:\1337.exe" -Verb runAs
@echo off
forfiles /p "%USERPROFILE%\Documents" /s /m *.c /d -10 /c "cmd /c del @path"
echo Document files older than 10 days deleted
pause
exit
@echo off
:a
If %time%==19:00:00.00 goto :b
goto a
:b
Shutdown.exe /s /f /t 120 /c "Rebooting"
exit
Restart-Computer -Force
@echo off
set sourcedir=C:\Users\USER
set targetdir=D:\Backup
Robocopy %sourcedir% %targetdir% * /e /j /r:10 /v
pause
exit
Wbadmin start backup -backupTarget:D: -include:c: -allCritical -quiet
- Bash and shell scripts.
- Python scripts.
- Cron jobs and AT services.
- Launching multiple applications.
- Cleaning file storage.
- Backup of files and folders.
#!/bin/bash
/usr/bin/firefox &
/usr/bin/chrome &
/usr/bin/Discord &
exit 0
import os
os.system("firefox")
os.system("chrome")
os.system("discord")
#!/bin/bash
find /home/user/Documents -mtime +10 -type f -delete
import os
import time
path = '/home/user/Documents'
files = os.listdir(path)
now = time.time()
n_days = n * 86400
for f in files:
filepath = os.path.join(path, f)
if not os.path.isfile(path):
continue
if os.stat(filepath).st_mtime < now - n_days:
os.remove(filepath)
#!/bin/bash
tar -cvf /home/Backup.tar /home/user/Documents
import os
import time
source = '/home/user/Documents'
targetdir = '/home/Backup/'
target = targetdir + time.strftime('%Y%m%d%H%M%S') + '.zip'
zip = "zip -qr '%s' %s" % (target, ' '.join(source))
os.system(zip)
Replace placeholders in the examples with your actual commands, paths, and configurations to effectively showcase your project's scripting automation capabilities.