Ipt1 Mod4 FT
Ipt1 Mod4 FT
• By 2002, Microsoft started developing a new way of managing the command lines. It also included the development
of a new Shell which was named Monad. A white paper published in the year of 2002 by Jeffrey Snover, called
Monad Manifesto. It contained the concept of this shell and the ideas to create a standardized platform that used
the .NET framework through automation tasks.
• The first display of Monad was made in Los Angeles at the Professional Developers Conference in 2003.
• Microsoft released the three beta versions of Monad on the 17th of June 2005, the 11th of September 2005, and
on 10th of January 2006. Microsoft renamed Monad to a Windows PowerShell in April of the same year (April
2006) and made it as a core part of the Windows operating system.
• Powershell
➢ a cross-platform task automation solution made up of a command-line shell, a scripting language, and a
configuration management framework.
➢ is a modern command shell that includes the best features of other popular shells.
➢ commonly used for automating the management of systems.
Note:
• PowerShell
➢ is a tool you can use to manage and automate tasks on computers. Think of it as a powerful, flexible command
center that lets you give your computer instructions directly.
It’s made up of three parts:
1) Command-Line Shell
- This is where you type commands (like a conversation with your computer) to make things happen, such
as organizing files or controlling settings.
2) Scripting Language
- You can create scripts, which are like sets of instructions, to perform a series of tasks automatically. This
saves you time, especially for repetitive tasks.
3) Configuration Management
- It helps you set up and keep track of how things should be arranged or configured on computers, making
sure everything runs smoothly.
Unlike most shells that only accept and return text, PowerShell accepts and returns .NET objects.
1
Note:
• PowerShell is different from most command tools because it doesn’t just work with plain text; it works with .NET
objects—think of these like "data packages" that hold more complex information. This feature makes PowerShell
extra powerful when handling tasks and organizing data.
• These features make PowerShell a very efficient and smart tool for managing tasks and data on computers.
1. Command-line History: PowerShell remembers the commands you’ve recently used, so you can scroll back and
re-run them easily.
2. Tab Completion and Command Prediction: As you start typing a command, PowerShell can guess what you’re
trying to type and fill in the rest. It’s like an autocomplete for commands.
3. Aliases for Commands and Parameters: PowerShell allows you to use shortcuts (aliases) for commands, so you
don’t have to type out long names.
4. Pipeline for Chaining Commands: You can connect commands together, so one command’s result becomes the
input for the next. This allows you to perform complex tasks step-by-step, in a single line.
5. In-Console Help System: PowerShell has built-in help similar to Unix's man pages, where you can look up
detailed information about commands right from the command line.
Video Summary
• PowerShell
➢ It is an application already installed on your computer called powershell.exe.
➢ When you call this application, you get a console similar to the “cmd” console.
➢ Example Command: Get-Process, it gets all the processes currently running.
➢ PowerShell modules are provided by the most popular technology vendors in the world
➢ Microsoft has built such PowerShell modules for all of their products. This means that you can use PowerShell
to manage all version of Windows from Windows Server 2008 and later with PowerShell. Furthermore, you
can simultaneously administer all Windows applications such as Active Directory, DNS. Exchange, Hyper-V,
file servers, etc.
As a scripting language, PowerShell is commonly used for automating the management of systems. It is also used to
build, test, and deploy solutions, often in CI/CD environments.
Note:
• PowerShell is often used to automate tasks on computers, which means you can set up instructions for PowerShell
to follow, and it will do them for you automatically. This is really helpful for managing large groups of computers
or doing repetitive work.
2
4.1 | FEATURES OF A POWERSHELL
1. Background Job
2. Scheduled Job
3. PowerShell Remoting
4. Tab Separation
5. Steppable Pipeline
6. Windows PowerShell Integrated Scripting Environment
1) Background Job
➢ runs a command without interacting with the current session.
➢ When you start a background job, a job object returns immediately, even if the job takes an extended time to
finish. You can continue to work in the session without interruption while the job runs.
2) Scheduled Job
➢ A scheduled job is a Windows PowerShell background job that can be started automatically on a one-time or
recurring schedule.
➢ Scheduled jobs are stored on disk and registered in Task Scheduler. The jobs can be managed in Task
Scheduler or by using the Scheduled Job cmdlets in Windows PowerShell.
3) PowerShell Remoting
➢ Using the WS-Management protocol, Windows PowerShell remoting lets you run any Windows PowerShell
command on one or more remote computers.
➢ You can establish persistent connections, start interactive sessions, and run scripts on remote computers.
4) Tab Expansion
➢ PowerShell provides completions on input to provide hints, enable discovery, and speed up input entry.
➢ Command names, parameter names, argument values and file paths can all be completed by pressing the Tab
key. The Tab key is the default key binding on Windows.
5) Steppable Pipeline
➢ This is a concrete form of metaprogramming, where one script has precise control over the sequence of
operations in another.
➢ it gives the option to call the begin(), process(), and end() methods of script block to control the execution
sequence.