.bat scripts can contain logic and can create loops
Can be ran in the windows command line
.ps1
Powershell.ps1 allows for the automation and management of the windows OS, as well as cloud-related services such as Microsoft Azure and Office 365.
Was built upon the .NET framework.
Used by System Administrators for system administration and active domain control
Introduced the concept of cmdlets.
cmdlets is simply a verb and noun separated by a dash.
Ex. get-item - gets an item such as a directory listing, environment variable, or registry key just to name a few
Powershell also has a great way to create scripts in what is called an ISE (Integrated Scripting Environment).
ISE allows you to write a script and test it without having to switch back and forth.
Powershell scripts are blocked by default, you’ll have to turn them on through the command
.vbs
Visual Basic Scripts .vbs are scripts based on Microsoft’s Visual Basic Language.
It’s slowly being replaced by PowerShell.
.vbs scripts only run in windows OS and use the COM (Component Object Model)to allow interaction with the operating system.
.vbs scripts cannot access programming languages that were written for .NET.
.vbs scripts are still extremely useful when it comes to a structured language for creating login scripts and doing some back-end web server scripting.
.vbs scripts can be ran in Microsoft office applications
.vbs scripts are edited in notepad.
.sh
Shell .sh scripts are used for Unix/Linux
starts with a #! (shebang or hashbang)
Can be edited in any text editor
.py
Python .py is a general purpose scripting language first released in 1991.
Broad Appeal and Support
Was created to be a very easy scripting language to learn.
You won’t be able to build login scripts and flexibility is limited when you try to integrate a python script into an enterprise process.
.js
Javascript .js a scripting language inside of your browser that is mainly used inside of web browsers to allow for interactive web pages.
Used on almost every website
Can also be ran outside of the web browser use node.js
Environment Variables (Constants)
Variables that are already there in the scripting environment and are waiting for you to use them. These variables are created before the program is even thought of and acts a microservice.
Ex. PATH: is a list of directory paths.
Ex. MAIL: used to indicate where a user’s mail is found
Ex. PWD: points to the current directory that you are working in
System Variable
Defined for use by the system, or any user or program
Defined for use by a specific user, or any program executing under that specific user
User Variable
Defined for use by a specific user, or any program executing under that specific user
Program Variable
Defined for use inside of a script or application and can only be accessed from inside of the script or application
Comment Syntax
Basic Script Constructs
Basic Loops
A loop in scripting that runs over and over until a condition is met.
Variables
Basic Data Types
Integers
Numbers
Strings
Names, words, and phrases
Floating Point
Numbers with decimal points; Ex. 3.14342091765435
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (