Presentation is loading. Please wait.

Presentation is loading. Please wait.

PowerShell Introduction Copyright © 2016 – Curt Hill.

Similar presentations


Presentation on theme: "PowerShell Introduction Copyright © 2016 – Curt Hill."— Presentation transcript:

1 PowerShell Introduction Copyright © 2016 – Curt Hill

2 Shells The notion of a shell dates back to early versions of UNIX or before A shell is a command interpreter It gave an interactive means for a user to use the system UNIX allowed anyone to create their own shell, while Windows was less forthcoming in this respect On most versions of Windows this is the DOS command prompt Copyright © 2016 – Curt Hill

3 Shell Scripts If the shell can accept commands from a file instead of the console this is called a shell script UNIX had a command redirection feature that enabled this The > and < on the prompt A shell script is a full but simple programming language with variables, flow of control and other features we expect in programming languages Copyright © 2016 – Curt Hill

4 Microsoft Batch Files The batch language of Windows (and previously DOS) is the script It allowed execution of programs and added the features of a programming language such as comments, variables, decision and looping statements Compared to UNIX/LINUX shell scripts these were unsatisfactorily weak You should have been exposed to batch files previously Copyright © 2016 – Curt Hill

5 PowerShell History The problems with batch files caused MS to develop a new shell named PowerShell that was released in 2006 This same project had previously been released as a beta under the name Monad as early as 2003 Several releases followed In 2016 MS made it open source and had ported it to other platforms such as LINUX and OS X Too soon to tell if it will be widely adopted outside of Windows Copyright © 2016 – Curt Hill

6 What is PowerShell? A task automation and configuration management tool It is a command-line shell and a language Designed to allow system administrators to perform tasks on both local and networked devices Based on the .NET framework This makes the portability easier Copyright © 2016 – Curt Hill

7 In Windows Windows 10, by default, has PowerShell
In previous versions it required a separate, but free, installation Copyright © 2016 – Curt Hill

8 Execution Two possibilities
A DOS like resizable window A script file There are four types of commands that may be executed: Executable files on the path Cmdlets (pronounced command-lets) PowerShell script files (.ps1 extension) PowerShell functions Further examination of these is in order Copyright © 2016 – Curt Hill

9 Window PowerShell is in the Windows 10 menu of all applications
Under Windows not Microsoft Clicking on it gives the possibility of the next two screens Copyright © 2016 – Curt Hill

10 Windows 10 Menu Copyright © 2016 – Curt Hill

11 In Action Copyright © 2016 – Curt Hill

12 Notice The prompt looks like a DOS prompt except that it is prefixed by a PS Default background is blue rather than black In this picture are two commands that are the same in either DOS or PowerShell D: to change default disk cd to change directory The prompt has the PS as well as disk and directory Copyright © 2016 – Curt Hill

13 From DOS Box You may also execute the PowerShell from the DOS box
But why? In that case PowerShell takes over the DOS box See next slide Copyright © 2016 – Curt Hill

14 PS from DOS Copyright © 2016 – Curt Hill

15 Commentary The exit command works in PowerShell similarly to DOS
The cd command changed PowerShell’s current directory, but not that of the enclosing DOS box Copyright © 2016 – Curt Hill

16 Finally for Now As you can see PowerShell has much in common with the DOS box We will consider the newer and better features in subsequent presentations Of course, we must have a PowerShell assignment! Copyright © 2016 – Curt Hill


Download ppt "PowerShell Introduction Copyright © 2016 – Curt Hill."

Similar presentations


Ads by Google