0
0
PowerShellscripting~5 mins

PowerShell console and ISE

Choose your learning style9 modes available
Introduction
PowerShell console and ISE let you run commands and write scripts easily to automate tasks on your computer.
When you want to quickly run a command to check system info.
When you need to write and test a script to automate repetitive work.
When you want to explore and learn PowerShell commands interactively.
When you want to debug a script with helpful tools.
When you want to save your commands and scripts for later use.
Syntax
PowerShell
PowerShell Console: Open by typing 'powershell' in your Start menu.
PowerShell ISE: Open by typing 'powershell_ise' in your Start menu.
PowerShell Console is a simple window to type and run commands one by one.
PowerShell ISE (Integrated Scripting Environment) is a friendly editor to write, run, and debug scripts.
Examples
In PowerShell Console, this command shows all running processes.
PowerShell
Get-Process
In PowerShell ISE, this script prints a message to the screen.
PowerShell
Write-Host "Hello, PowerShell!"
You can write scripts in ISE and save them as .ps1 files to run later.
PowerShell
# Save this script as Hello.ps1
Write-Host "Hello from script!"
Sample Program
This script prints a welcome message and then shows the current date and time.
PowerShell
Write-Host "Welcome to PowerShell!"
Get-Date
OutputSuccess
Important Notes
PowerShell ISE is great for beginners because it colors your code and helps find mistakes.
You can run commands directly in the console or test scripts in ISE before running them in the console.
Remember to run scripts with proper permissions; sometimes you need to change the execution policy.
Summary
PowerShell Console is for quick command running.
PowerShell ISE is for writing, testing, and debugging scripts.
Both help automate tasks and save time on your computer.