Windows PowerShell Introduction 1 Morgan Simonsen Ementor.

Slides:



Advertisements
Similar presentations
Jeffrey Snover Partner Architect Microsoft Corporation ES24.
Advertisements

$$ Idea Updatable help system Method overload discovery HelpUri attribute support HelpFile property on FunctionInfo Simplified Where and.
Microsoft PowerShell Tom Roeder CS fa. Motivation.NET as a platform shell web server database access Native access to resources eaiser to manage.
MGT305 Windows PowerShell Next Generation Command Line Scripting Jeffrey Snover & Leonard Chung Windows Enterprise Management Division.
Windows Server “Longhorn” RDP Airlift. Managing AD with PowerShell; Creating custom administrative consoles Dmitry Sotnikov CTO, Windows Management Quest.
Jason Himmelstein, MVP Senior Technical Director,
James Boother Blog: INTRODUCTION TO POWERSHELL.
More Control and Flexibility Vitalis Konopelec Technology Solution Professional Microsoft Slovakia s.r.o.
Fabrice Romelard [MVP] Intranet – Extranet CTO SGS.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 8: Implementing and Managing Printers.
INTRODUCTION TO POWERSHELL Neil Iversen. Points of Interest  Introduction  Getting Around  Basic Syntax  Making yourself at ~  Not-So-Basic Syntax.
Module 6 Windows 2000 Professional 6.1 Installation 6.2 Administration/User Interface 6.3 User Accounts 6.4 Managing the File System 6.5 Services.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 8: Implementing and Managing Printers.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 8: Implementing and Managing Printers.
Basic.  PS is a command line interpreter/scripting environment  Designed for.Net  Similar to C#  Easy to instantiate.Net classes  Standardized syntax.
Monad: Microsoft’s Next Generation Command Shell Thomas Lee Chief Technologist QA plc.
Daniel Petri MVP, Microsoft Infrastructure Manager John Bryce Training November 2007.
 Jeffrey Snover Partner Architect Microsoft Corporation.
PowerShell: Drink the Kool-Aid!. Who we are…..Who we are…..
#BSidesCMH PowerShell Copyright (C) 2014 ColumbusBSides. PowerShell: Drink the Kool-Aid.
Connect with life L.Srividya Architect Advisor | Microsoft India.
PowerShell Lessons Learned from Building an Automated SQL Installation and Patch Management Implementation Presented by: Fany Carolina Vargas, Microsoft.
1 Monad – A New Command Shell Jeffrey Snover, Architect James Truher, Program Manager TLN303 Microsoft Corporation.
© 2007 Asynchrony Solutions, Inc. 1 10/29/07 Introduction to PowerShell Brian Button VP Engineering Asynchrony Solutions, Inc
Presenters: Winfred Wangeci Jignash Reddy.  It is Microsoft's new task-based command- line shell and scripting language designed especially for system.
MS WINDOWS POWER SHELL CSE 535 Operating Systems.
Session 1 - Introduction and Data Access Layer
CIM6400 CTNW (04/05) 1 CIM6400 CTNW Lesson 6 – More on Windows 2000.
Windows PowerShell Deep Dive 1 Morgan Simonsen Ementor.
Scripting Exchange: The Exchange Management Shell Jim McBee
Microsoft ® Official Course Module XA Using Windows PowerShell ®
PowerShell Basics. o PowerShell is a great way to manipulate server and/or workstation components o It’s geared toward system administrators by creating.
Appendix A Starting Out with Windows PowerShell™ 2.0.
Virtual techdays INDIA │ august 2010 INVENTORY YOUR NETWORK AND CLIENTS WITH POWERSHELL Govindaraj Rangan │ Technology Strategist, Microsoft Corporation.
Powershell Scripting on Vista and XP in AD. Examples (on local and remote PC’s) Show COM,ADSI,.NET, WMI techniques List drives List Software installed.
Monad The New Microsoft Command Shell Peter Provost
Section 6: Using Windows PowerShell to Manage Group Policy Introducing Windows PowerShell Windows PowerShell Library for Group Policy Windows PowerShell-Based.
December, 21, 2010 Bartek Bielawski Sr IT Site Services Specialist Warsaw, Poland.
Significance of Scripting Languages for Operating System Administration Vladimir Mateljan Željka Požgaj Krunoslav Peter INFuture2007.
Good Morning and Thank You!.  Have some Fun!  Learn at least one thing new!  Make myself available to you So please …  Ask questions and enjoy!
Reinsel Kuntz Lesher, LLP.  Outline Overview  netstat -an (-ano will give the PID)  ftp  bin  mget  mput  telnet  telnet bobm.us 25  helo  mail.
Chinmay Gokhale SE | Microsoft
Managing Windows Servers with PowerShell V2 James O’Neill: Evangelist, Microsoft UK Richard Siddaway MVP.
What’s New in SharePoint 2010 SharePoint 2010 Development Primer New Developer Tools for SharePoint 2010 SharePoint 2010 Integration with PowerShell.
Virtual techdays INDIA │ 9-11 February 2011 Monitoring and managing remote Windows 7 desktops with Windows PowerShell Ravikanth C │ Dell Inc.
PowerShell for IT Administrators Richard Siddaway Perot Systems.
CIS 1402: Intro to CIS Tom Gustafson. Facts About PowerShell PowerShell is Microsoft’s command-line interface that provides scripting and management capability.
POWERSHELL BASICS. BACKGROUND  Powershell is a task automation and scripting language based off the.NET framework  It provides the user full access.
1 Sneak Preview to Windows Key Areas of Focus of Windows 2008 Improvements in Server Security New Terminal Services capabilities Network Access.
 It is Microsoft's new task-based command- line shell and scripting language designed especially for system administration.  It helps Information Technology.
Windows PowerShell. What is Windows PowerShell? A command-line interface (CLI) A new way of developing Windows and other products to be more manageable.
PowerShell Richard Siddaway Perot Systems. Welcome to this TechNet Event “Pick your Own Collateral” URL for on-line feedback is in your reminder .
Automating SharePoint 2010 administration tasks with Power Shell Toni Frankola SharePoint MVP, Croatia
Get-Intro –Name PowerShell Jason Helmick Systems Instructor Interface Technical Training.
Module 14: Advanced Topics and Troubleshooting. Microsoft ® Windows ® Small Business Server (SBS) 2008 Management Console (Advanced Mode) Managing Windows.
POWERSHELL ABOVE AND BEYOND: GUIS, WORKFLOWS, AND MORE Dean Corcoran Partner Service Account Manager (Cloud) – MCT – MCITP:EA Microsoft Australia SESSION.
Automating Windows Server Borislav Varadinov Telerik Software Academy academy.telerik.com System Administrator
 Version 1.0[edit]edit  Version 1.0 was released in 2006 for Windows XP SP2/SP3, Windows Server 2003,
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
PowerShell for Cyber Warriors
Ravikanth C.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
PowerShell 5 & Windows 10. What are we covering today? What is PowerShell? Why is PowerShell important? Some simple demos on Windows 10.
Systems Administration (Windows) BIT3111 – Lecture 5 (Introduction to Windows OS)
PowerShell Introduction Copyright © 2016 – Curt Hill.
Introduction to .NET Framework Ch2 – Deitel’s Book
Getting Started with the Data ONTAP PowerShell Toolkit
PowerShell Best Practices for SQL DBA’s
Operating System Fundamentals
Presentation transcript:

Windows PowerShell Introduction 1 Morgan Simonsen Ementor

What Will We Cover? What is Windows PowerShell? How does Windows PowerShell work? How can I use Windows PowerShell? 2

Level 200 Helpful Experience Command line experience; cmd.exe, BASH etc. Command line experience; parameters, output etc. Scripting experience (PERL, VBScript, JScript) etc.) 3

Microsoft Products Providing Windows PowerShell Cmdlets Windows Vista Exchange Server 2007 Operations Manager 2007 Windows Server “Longhorn” Virtual Machine Manager Data Protection Manager “V2” 4

Why PowerShell? As companies scale-out; management becomes very hard Current technologies; VBScript, WMI, RDP PowerShell will provide a unified management experience 5

Admin Tools RoadmapScenarioTodayTomorrow PowerShell Benefits GUI Shell MMC MMC with snap-ins layered on PowerShell GUI-Cmd parity GUI-Cmd parity Auto script creation (V2) Auto script creation (V2) Command Shell CMDCMDPowerShell CMD and UNIX shell parity CMD and UNIX shell parity Command consistency Command consistency Namespaces as Drives (e.g. FS, Reg, WMI, AD, Certs, etc) Namespaces as Drives (e.g. FS, Reg, WMI, AD, Certs, etc) Command Scripting CMD scripting PowerShell Richer language Richer language Better text utilities Better text utilities COM Scripting WSH VBScript VBScript Jscript JscriptWSH VBScript VBScript Jscript Jscript Jscript (.net) PowerShell Richer language Richer language Object utilities Object utilities Common access to COM, XML,.NET, ADO, WMI, ADSI Common access to COM, XML,.NET, ADO, WMI, ADSI 6

Admin Development Model Try things out in an interactive shell Stitch things together with utilities Put the results in a script file –Realize that the tools are unsuitable and restart with a new set of tools Generalize (e.g., parameterize) Clean it up  production-quality Integrate into your environment Share with the community 7

Introducing Windows PowerShell New Windows command-line shell designed for system administrators Interactive prompt and scripting environment Built on.NET Common Language Runtime (CLR) and.NET Framework 8

PowerShell Design Goals Ease of use Consisency of syntax Ease of learning curve 9

How is PowerShell different? PS processes objects, not text Large set (>100) of built in commands with cosistent interface Common command parser Can run all existing utilities, tools Multiple commands without batch files (;) 10

Getting and installing PowerShell Microsoft Download site x86/x64 versions available Installation requirements: –Windows XP SP2, Windows Server 2003 SP1 or later versions of Windows –.NET Framework

Getting and installing PowerShell Continued WinXP, W2K3 Srv: Update.exe install Vista/W2K8 Srv:.msu (component based install) Install locations: –X86: %systemroot%\system32\WindowsPowerShell\V1.0 –X64: %systemroot%\system32\WindowsPowerShell\V1.0 %systemroot%\Syswow64\WindowsPowerShell\V1.0 12

Starting PowerShell Powershell.exe –powershell -psconsolefile sqlsnapin.psc1 –powershell -version 1.0 -nologo -inputformat text - outputformat XML –powershell -command {get-eventlog -logname security} –powershell -command "& {get-eventlog -logname security}” Start Menu 13

Cmdlets (Command-lets) Built-in, single-feature commands that manipulate objects in PS Small and simple, designed to be used together with other cmdlets (pipelining) Comes with built-in help (Get-Help) Use a Verb-Noun names (Get-Service, Set-Service) 14

MSH> get-mailbox –server “smbex01” VerbNoun Name Argument String CommandParameter Cmdlets (Command-lets) Structure Property Names Property Values Name Alias Server StorageQuota Bob Kelly bobk smbex01 unlimited Kim Akers kima smbex01 unlimited 15

Cmdlet parameters Always identified by -, never /, -- or \ Supports concatenation: get-help -det Names can be omitted: get-help –name get-alias = get-help get-alias 16

Getting help in PS Get-Help cmdlet Get-Help eg. Get-Help Get-Command eg. Get-Help Get-Command –detailed eg. Get-Help Get-Command –full eg. Get-Help Get-Command -examples Get-Help about_signing 17

Getting help: The 4 Pillars of Discoverability 1.Get-Command 2.Get-Help and -? 3.Get-PSDrive 4.Get-Members 18

Processing Objects PS works with.NET Objects.NET Objects contain: –Data –Properties –Methods 19

Learning about objects Get-Member: displays information about.NET objects a cmdlet returns get-service | get-member 20

Formatting Output PS cmdlets never format data Format cmdlets format data –Format-List –Format-Table –Format-Custom –Format-Wide Every cmdlet has default formatting based on the format cmdlets, which you can override 21

Aliases PS has several aliases by default (dir, ls, cls, del etc) Display aliases: get-alias Create alias: set-alias gh Get-Help Delete alias: remove-item alias:gh 22

Some useful cmdlets Get-Command Get-Childitem Get-ChildItemProperty Get-Service Get-WMIObject Invoke-Item 23

Using Windows Programs PS can run all Windows programs Must be in path statement ($env:path) List: Get-Command *.exe Aliases do not support its namesake’s paramteres 24

Tab Completion PS support Tab completions for: –Cmdlet names –Registry paths –Filesystem paths –Certificate paths 25

Pipelining Cmdlets can be ”piped” together to form complex commands Output from one cmdlet move along the pipe to another cmdlet PS pipeline operator is | (pipe) 26

For More Information Windows PowerShell Team blog at: Windows PowerShell ScriptCenter at: nter/hubs/msh.mspx nter/hubs/msh.mspx 27

Books about PS 28