Windows PowerShell Fundamentals

Similar documents
SUNGARD SUMMIT 2007 sungardsummit.com 1. Microsoft PowerShell. Presented by: Jeff Modzel. March 22, 2007 Course ID 453. A Community of Learning

WolfTech Active Directory: PowerShell

Acknowledgments Finding Your Way Around Windows PowerShell p. 1 Getting Started with Windows PowerShell p. 3 Installing Windows PowerShell p.

Microsoft. Jump Start. M3: Managing Windows Server 2012 by Using Windows PowerShell 3.0

Windows PowerShell. 3.0 Step by Step. Ed Wilson

Microsoft Windows PowerShell v2 For Administrators

Automating Microsoft

PowerShell for Dummies

POWERSHELL (& SHAREPOINT) This ain t your momma s command line!

Windows PowerShell Cookbook

Microsoft Visual Basic Scripting Edition and Microsoft Windows Script Host Essentials

WHITE PAPER POWERSHELL FOR DUMMIES HOW TO KEEP TRACK OF

Forefront Management Shell PowerShell Management of Forefront Server Products

Lab Answer Key for Module 1: Installing and Configuring Windows Server Table of Contents Lab 1: Configuring Windows Server

Using Windows PowerShell to Manage SharePoint 2010

Monitoring Windows Servers and Applications with GroundWork Monitor Enterprise 6.7. Product Application Guide October 8, 2012

126 SW 148 th Street Suite C-100, #105 Seattle, WA Tel: Fax:

Avatier Identity Management Suite

Click Studios. Passwordstate. Password Discovery, Reset and Validation. Requirements

OPAS Prerequisites. Prepared By: This document contains the prerequisites and requirements for setting up OPAS.

Exploring PowerShell. Using Windows PowerShell

Automating. Administration. Microsoft SharePoint with Windows. PowerShell 2.0. Gary Lapointe Shannon Bray. Wiley Publishing, Inc.

Avatier Identity Management Suite

PowerShell for Exchange Admins

Course Syllabus. Implementing and Managing Windows Server 2008 Hyper-V. Key Data. Audience. At Course Completion. Prerequisites

SPHOL205: Introduction to Backup & Restore in SharePoint Hands-On Lab. Lab Manual

Intel vpro Technology Module for Microsoft* Windows PowerShell*

Configuring and Troubleshooting Internet Information Services in Windows Server 2008

DottsConnected SHAREPOINT 2010 ADMIN TRAINING. Exercise 1: Create Dedicated Service Accounts in Active Directory

Windows Server 2008 R2: Server Management and PowerShell V2

Windows Server 2008 R2: What's New in Active Directory

Microsoft Office Outlook 2013: Part 1

Using Management Shell Reports and Tracking User Access in the NetVanta UC Server

Installation Guide. . All right reserved. For more information about Specops Inventory and other Specops products, visit

Specops Command. Installation Guide

Partie Serveur Lab : Implement Group Policy. Create, Edit and Link GPOs. Lab : Explore Group Policy Settings and Features

Outline SSS Microsoft Windows Server 2008 Hyper-V Virtualization

LT Auditor Windows Assessment SP1 Installation & Configuration Guide

Powershell Management for Defender

Jeffrey Snover Distinguished Engineer & Lead Architect Jason Helmick Senior Technologist, Concentrated Technology

Microsoft Windows Server 2008: Configuring and Troubleshooting Internet Information Services IIS

How to Prepare for the Upgrade to Microsoft Dynamics CRM 2013 (On-premises)

Microsoft Enterprise Search for IT Professionals Course 10802A; 3 Days, Instructor-led

MOC 20342B: Advanced Solutions of Microsoft Exchange Server 2013

SQL Server 2005 Express Installation guide

POWERSHELL FOR NEWBIES Getting started with PowerShell 4.0. Jeffery Hicks

Course Syllabus. Configuring and Troubleshooting Internet Information Services in Windows Server Key Data. Audience. At Course Completion

Workshop & Chalk n Talk Catalogue Services Premier Workshop & Chalk n Talk Catalogue

Publish Acrolinx Terminology Changes via RSS

PowerShell 3.0 Advanced Administration Handbook

Using the Citrix Service Provider License Reporting Tool

The Win32 Network Management APIs

Troubleshoot Using Event Log Mining

Things I wish I d known when I started using PowerShell

Managing Local Administrator Passwords with LAPS 10/14/2015 PENN STATE SECURITY CONFERENCE

ICT Professional Optional Programmes

FAQ. NetApp MAT4Shift. March 2015

Mobile Device Management in a BYOD World. Jay Cotton Microsoft PFE

ActiveRoles Management Shell for Active Directory

Authoring for System Center 2012 Operations Manager

Microsoft IT Camp Hands-On Lab

Setup Guide for AD FS 3.0 on the Apprenda Platform

Managing Your Microsoft Windows Server Fleet with AWS Directory Service. May 2015

Release Notes: SANsymphony-V System Center Operations Manager (SCOM) Management Pack 1.3

Network device management solution

Administration Guide. . All right reserved. For more information about Specops Gpupdate and other Specops products, visit

50331D Windows 7, Enterprise Desktop Support Technician (Windows 10 Curriculum)

Who DIT It? Detecting and Mitigating Privilege Escalation Attacks on the Active Directory Data Store

6422: Implementing and Managing Windows Server 2008 Hyper-V (3 Days)

Track User Password Expiration using Active Directory

Core Solutions of Microsoft Lync Server 2013

A layman s guide to PowerShell 2.0 remoting. Ravikanth Chaganti

Step-By-Step Guide to Deploying Lync Server 2010 Enterprise Edition

Core Solutions of Microsoft Lync Server 2013

STEALTHbits Technologies, Inc. StealthAUDIT v5.1 System Requirements and Installation Notes

HIPAA Compliance Use Case

New Features in Neuron ESB 2.6

Virtualization Hyper-V host scale and scale-up workload support

Sy Computing Services, Inc. TOP REASONS TO MOVE TO MICROSOFT EXCHANGE Prepared By:

Windows Server R2 Hyper-V. Microsoft's Hypervisor. Insiders Guide to. Wiley Publishing, Inc. John Kelbley. Mike Sterling WILEY

MS MCITP: Windows 7 Enterprise Desktop Support Technician Boot Camp

1 (11) Paperiton DMS Document Management System System Requirements Release: 2012/

DATA AND LOG FILES FOR CENTRAL MANAGEMENT STORE

Masterclass: Internet Information Services Management (IIS 8.5 / 8 / 7.5)

intertrax Suite resource MGR Web

SharePoint 2013 Syllabus

Advanced Event Viewer Manual

5/13/2009. Dejan Foro Speaker

NEXT GENERATION ARCHIVE MIGRATION TOOLS

LANDPARK NETWORK IP Landpark, comprehensive IT Asset Tracking and ITIL Help Desk solutions October 2016

Deploying System Center 2012 R2 Configuration Manager

Deploying, Configuring, and Administering Microsoft Lync Server 2010

MONITORING WINDOWS WITH NETCRUNCH 7 P A G E 1

ENTERPRISE VAULT 9.0 FEATURE BRIEFING

Server Manager Performance Monitor. Server Manager Diagnostics Page. . Information. . Audit Success. . Audit Failure

Transcription:

Windows PowerShell Fundamentals Steven Murawski Senior Windows Systems Engineer Microsoft MVP This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

Who I am Name Steven Murawski Occupation Senior Windows System Engineer Blog UsePowerShell.com Twitter - @StevenMurawski Microsoft MVP - PowerShell

Agenda What is PowerShell? Terminology The Big 4 Working from the Shell Workstations and Servers Active Directory Exchange Q & A (time permitting)

Agenda What is PowerShell? Terminology The Big 4 Working from the Shell Workstations and Servers Active Directory Exchange Q & A (time permitting)

Command Line What is PowerShell?

What is PowerShell? Scripting Language

What is PowerShell? Most importantly though it is an Automation Tool. PowerShell offers a unifying management surface in which to manage your Windows (and other) environment.

Agenda What is PowerShell? Terminology The Big 4 Working from the Shell Workstations and Servers Active Directory Exchange PowerShell V3 Sneak Peak Q & A (time permitting)

Terminology Cmdlet Functions Objects Pipeline

Terminology Cmdlets The basic unit of work in PowerShell. These are PowerShell s native commands. They are called cmdlets (small commands) because they embrace the Unix philosophy of small tools which can be used compose new solutions

Terminology Functions Functions are a series of PowerShell statements (or commands) that are given a name and saved in memory for a particular session. There are several types of functions: V1 style function Filter Advanced function

Terminology Objects PowerShell is an object-based shell. Objects are a binding of data and actions. What this really means is that when you execute a command, you can more easily ask questions of the result. Being object based also gives PowerShell the ability to provide generalized format, display, and export capabilities.

Terminology Pipeline The pipeline is a central concept in PowerShell which allows you to take the output from one command and make it the input for the next command. It has long been the case that shell commands can take input from other commands (or files, or other sources). The pipeline in PowerShell can leverage the object based and utilize some components of the runtime to make transitions between commands more effective.

Agenda What is PowerShell? Terminology The Big 4 Working from the Shell Workstations and Servers Active Directory Exchange PowerShell V3 Sneak Peak Q & A (time permitting)

The Big Four Navigational And Discovery Commands Get-Command Get-Help Get-Member Get-PSDrive

The Big Four Get-Command Get-Command will list any valid command (executables, functions, cmdlets, aliases). It can also provide some additional metadata about PowerShell commands and scripts.

The Big Four Get-Help This is the man equivalent for PowerShell. Get-Help offers several levels of help Basic Detailed Full Examples Individual Parameters

The Big Four Get-Member Since PowerShell is an object-based shell, Get- Member allows you to examine the objects output from different commands. This is probably the most important discovery command.

The Big Four Get-PSDrive PowerShell offers the capability to expose various information sources (providers) like a file system. Get-PSDrive lists the mapped providers and where or how they are mounted.

Agenda What is PowerShell? Terminology The Big 4 Working from the Shell Workstations and Servers Active Directory Exchange PowerShell V3 Sneak Peak Q & A (time permitting)

Working From the Shell Navigating Providers Providers offer a way to navigate different data sources via the same commands. Providers File System Registry Others

Working From the Shell Navigating the File System Items and Containers Item Properties

Working From the Shell Digging in the Registry PowerShell provides access to the registry via a provider. This allows the registry to be navigated like the file system. Keys and subkeys are represented as items (like files and directories. Registry values and data are represented as properties of the items.

Working From the Shell Other Providers Built in Alias Certificate File System Function Registry Variable WSMan Others SQL Server Active Directory

Working From the Shell Dealing with Objects Formatting Output Filtering Output Using the Pipeline

Working From the Shell Formatting Output Format-Table Format-List Format-Custom ConvertTo-XML ConvertTo-HTML ConvertTo-CSV Export-CliXML Export-CSV

Working From the Shell Filtering output Native Filtering in Commands Usually preferred, but can vary based on the command and data type. If the target of the command is remote, filtering could be done at the source. Where-Object Uses a scriptblock (PowerShell statements surrounded by braces) Works on any object in the PowerShell Pipeline Works locally in the current PowerShell session

Working From the Shell Using the Pipeline PowerShell pipes objects. Cmdlets, scripts, and functions can take full objects as arguments. Properties of objects can be automatically mapped to parameters of cmdlets, scripts, or functions. Scriptblocks can be used to transform input.

Agenda What is PowerShell? Terminology The Big 4 Working from the Shell Workstations and Servers Active Directory Exchange PowerShell V3 Sneak Peak Q & A (time permitting)

Working with Workstations and Working with WMI Servers Get-WMIObject is the key command when working with WMI. Get-WMIObject List What s stored in WMI? Just about everything! Hardware information System Configuration Application Data And more..

Working with Workstations and Servers Editing the Registry Via the Provider Can use it locally Can use it remotely if PowerShell Remoting is enabled. Using.NET More familiar to.net developers. Using WMI More familiar to those with VBScript experience

Working with Workstations and Servers Working with Text Select-String Operators Match Replace Split Regular Expressions

Working with Workstations and Servers Working with Remote Machines WMI Available on most machines. Requires a knowledge of WMI (which is not very consistent) PowerShell Remoting Requires Windows XP SP3/Server 2003 SP2 or higher and WinRM

Agenda What is PowerShell? Terminology The Big 4 Working from the Shell Workstations and Servers Active Directory Exchange PowerShell V3 Sneak Peak Q & A (time permitting)

Working with Active Directory ADSI Available on any machine Obscure Quest s AD Cmdlets Task based Excellent Coverage Server 2003 Domains or above 3 rd Party Microsoft s AD Module Only available on Windows 7 or Server 2008 R2 Server 2003 Domains or above. If DC s are not 2008 R2, AD Web Services are required.

Working with Active Directory Common Tasks Resetting Passwords Finding Disabled Users Finding Expired Computer Accounts

Agenda What is PowerShell? Terminology The Big 4 Working from the Shell Workstations and Servers Active Directory Exchange PowerShell V3 Sneak Peak Q & A (time permitting)

Working with Exchange Common Tasks Monitor Message Queues (Exchange 2003) Monitor Message Queues (Exchange 2007/2010) Identify all ActiveSync Devices Connected (Exchange 2010)

Agenda What is PowerShell? Terminology The Big 4 Working from the Shell Workstations and Servers Active Directory Exchange PowerShell V3 Sneak Peak Q & A (time permitting)

V3 Sneak Peak PowerShell V3 Windows 8 Workflows Resilient Sessions Disconnected Sessions Autoloading of Modules And more

Agenda What is PowerShell? Terminology The Big 4 Working from the Shell Workstations and Servers Active Directory Exchange PowerShell V3 Sneak Peak Q & A (time permitting)

Q and A I m sure no one has any questions, so we can just hang out.. But on the off chance that some has any questions, where can we get some answers? PowerShell.Org ServerFault.com UsePowerShell.Com