PowerShell for IT Administrators Richard Siddaway Perot Systems.

Slides:



Advertisements
Similar presentations
Faith Allington Program Manager Microsoft Corporation WSV322.
Advertisements

MGT305 Windows PowerShell Next Generation Command Line Scripting Jeffrey Snover & Leonard Chung Windows Enterprise Management Division.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Windows Server “Longhorn” RDP Airlift. Managing AD with PowerShell; Creating custom administrative consoles Dmitry Sotnikov CTO, Windows Management Quest.
Automating SQL Buildouts With Hyper-V and SQL Server 2008 R2 Robert L Davis, Sr. DBA, Microsoft Corp.
James Boother Blog: INTRODUCTION TO POWERSHELL.
More Control and Flexibility Vitalis Konopelec Technology Solution Professional Microsoft Slovakia s.r.o.
27. to 28. March 2007 | Geneva, Switzerland. Fabrice Romelard ilem SA Level 200.
Monad: Microsoft’s Next Generation Command Shell Thomas Lee Chief Technologist QA plc.
Around the data centre in 80 scripts Richard Siddaway MVP Microsoft Practice Leader Centiq Ltd.
Introduction to SQL Server 2005 Reporting Services Peter Blackburn Boost Data Limited
Daniel Petri MVP, Microsoft Infrastructure Manager John Bryce Training November 2007.
Technical Overview. PLEASE READ (hidden slide) To deliver this presentation effectively, you need to be familiar with Windows Server 2008 R2 management.
Advanced SQL Server 2005 Reporting Services Melville Thomson IT Pro Evangelist
 Jeffrey Snover Partner Architect Microsoft Corporation.
PowerShell: Drink the Kool-Aid!. Who we are…..Who we are…..
Simple Web SQLite Manager/Form/Report
Connect with life L.Srividya Architect Advisor | Microsoft India.
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
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
Report Management and Creation using Microsoft SQL Server 2008 Reporting Services Chris Testa-O’Neill Database Product Planner Remarc Group.
Datacenter X Datacenter Y ….com Contoso.com Exchange Labs ACME.com Ops NK App user Finance HR Sales Purchase Fabrikam Enterprises.
TechNet Connection Krittiya Eamsiri Product Manager Microsoft Thailand.
Windows PowerShell Deep Dive 1 Morgan Simonsen Ementor.
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.
Managing Systems with PowerShell Jeffrey P. Snover Partner Architect.
Appendix A Starting Out with Windows PowerShell™ 2.0.
Microsoft Application Virtualization 5.0: Introduction Mohnish Chaturvedi & Ian Bartlett Premier Field Engineer WCL312.
Slide 2 The Microsoft Office Project 2003 Software Development Kit Jim Corbin Programmer Writer Office Developer Documentation Microsoft Corporation Uma.
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.
PowerShell for Dummies Kurt Callemin. WHO AM I ? Kurt Callemin Final year student at KHBO: Master of Science Electronics- ICT Microsoft Student Partner.
Introduction to Windows PowerShell DANIEL HIBBERT PRIMER FIELD ENGINEER DMVMUG User Conference 2013 – Reston, VA.
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!
Create Windows ® Applications with.NET Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft.
Managing Windows Servers with PowerShell V2 James O’Neill: Evangelist, Microsoft UK Richard Siddaway MVP.
Module 5: Creating and Configuring Group Policies.
Windows PowerShell Introduction 1 Morgan Simonsen Ementor.
MSG331 Exchange Server 2000/2003 Software Development Kit Susan Hill Lead Programmer Writer Microsoft Corporation.
POWERSHELL BASICS. BACKGROUND  Powershell is a task automation and scripting language based off the.NET framework  It provides the user full access.
Security Configuration Wizard Keith D Miller Microsoft European Support Readiness Manager.
 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.
Welcome. Welcome to this TechNet Event URL for on-line feedback is in your reminder No Planned Fire Drills Please turn your Mobile Phones off To.
Introduction to SQL Server 2005 Reporting Services Melville Thomson IT Pro Evangelist
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
Forefront Security “Drilling down...” Dr Gopal Kutwaroo UK Forefront Security.
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.
Group Policy in Windows Vista. Group Policy Administration Group Policy with Windows Vista QoS Policies What Will We Cover?
Rob Sewell Making PowerShell Useful Real-Life Examples of Powershell in Action Slides available here -
Building Complete Web Application Using ASP.NET 3.5 & Visual Studio 2008 Omar Khan Group Program Manager Visual Studio.
Mikael Deurell Senior Consultant Microsoft Mail: Blog: blogs.msdn.com/deurell.
PowerShell 5 & Windows 10. What are we covering today? What is PowerShell? Why is PowerShell important? Some simple demos on Windows 10.
XSLT ‘Extreme’ TLA327 Dave McMahon MCAD,MCDBA,MVP – Connected Systems Developer.
Start-SPPowerShell – Introduction to PowerShell for SharePoint Admins and Developers Paul BAker.
Microsoft Azure Deployment Planning Services
Forefront Security “Drilling down...”
TechEd /3/2018 4:18 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Visual Studio Tools for Office 2005
Automating AD Administration with Windows PowerShell
Microsoft Azure Deployment Planning Services
Microsoft Azure Deployment Planning Services
SharePoint Saturday Omaha April 2016
Making PowerShell Useful
Making PowerShell Useful
Introduction to ASP.NET Parts 1 & 2
Presentation transcript:

PowerShell for IT Administrators Richard Siddaway Perot Systems

Welcome to this TechNet Event “Pick your Own Collateral” URL for on-line feedback is in your reminder No Planned Fire Drills Please turn your Mobile Phones off To find out about future TechNet events:

The TechNet Programme A range of tools and resources for IT Professionals FREE TechNet Newsletter FREE Events and Webcasts FREE TechNet BETA Central ( FREE Quarterly TechNet Magazine FREE comprehensive technical website FREE TechNet Radio, Security Centre, Learning Paths and Virtual Labs TechNet Plus – Now available for Download!

What is TechNet Plus? The Toolkit for IT Professionals TechNet Plus is an annual subscription Access to TechNet Knowledge Base No-limits Evaluation software for Testing Beta software available immediately 2 Free Technical Support calls worth £320 20% off all further Support Calls Managed Newsgroups with guaranteed answers in 24hrs Now available by Download from only £230 / year (excl VAT) For all information on TechNet Plus Subscriptions visit:

Who am I? IT Architect and systems integrator Programming with.NET for several years Scripting with VBScript since NT 4 VERY interested in automation Using PowerShell since beta 2 (Monad) Run UK PowerShell User Group Think PowerShell is one of best pieces of technology EVER!

Agenda What is PowerShell? Learning PowerShell Administration of Windows systems Administration of Active Directory Administration of Exchange 2007 Administration of SQL Server 2005

Agenda What is PowerShell? Learning PowerShell Administration of Windows systems Administration of Active Directory Administration of Exchange 2007 Administration of SQL Server 2005

PowerShell Next generation shell that is: As interactive and composable as BASH/KSH As programmatic as Perl/Ruby As production oriented as AS400 CL/VMS DCL Access data stores as easily as accessing filesystems ExtensibleSnapinsProvidersScripts

Script Types Text.Net “interpretation” of the traditional Unix scripting model COM WSH/VBScript style scripting.NET Manipulate any native.Net object Commands Powershell cmdlets emitting objects

DataTypes Flat File – CSV etc.NETXMLWMIADSIADOADO.NETSQL

Accessing.NET Simple scripts need [STRING] and [MATH] Advanced scripts can use any.NET object Cmdlets provide the best admin and scripting experience.NET provides a safety net of coverage PowerShell provides access to the entirety of the.NET Framework

Windows Server System Security Infrastructure IT Operations Infrastructure Applications Infrastructure Collaboration Infrastructure

Agenda What is PowerShell? Learning PowerShell Administration of windows systems Administration of Active Directory Administration of Exchange 2007 Administration of SQL Server 2005

Learning and Leveraging In the Box Documents Getting Started, Users Guide, Quick Reference Guide HelpBooks Invest in your integrated lifetime earnings Community A wise man learns from mistakes… Practice ad hoc development

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 Ad Hoc Development

UtilitiesDiscovery Get-Help, Get-Member, Get-Command Object Manipulation Compare, Group, Measure, Select, Sort, Tee, Where Formatting Format-(Custom, List, Table, Wide) Out-(File, Host, Printer, String) Export/Import-(Clixml, CSV) ConvertTo-Html

Primary Concepts Cmdlets Verb-noun naming Specific functionality Pipeline.NET based objects NOT text Help is text based Syntax is similar to C# Data – CSV, XML, SQL WMI etc

Issues Default install mode won’t run scripts Set-ExecutionPolicy No file association Can’t automatically run scripts Can’t double click script to run it No remoting – yet Can use.NET and WMI Current working directory is NOT on PATH.\myscript.ps1 Does not load all.NET assemblies Use [Reflection.Assembly]::LoadWithPartialName(" Microsoft.SqlServer.Smo ")

Learning PowerShell Demo

Agenda What is PowerShell? Learning PowerShell Administration of Windows systems Administration of Active Directory Administration of Exchange 2007 Administration of SQL Server 2005

Administering Windows Some administrative cmdlets EventlogsServicesProcessesWMIScripting

Administering Windows Demo

Agenda What is PowerShell? Learning PowerShell Administration of Windows systems Administration of Active Directory Administration of Exchange 2007 Administration of SQL Server 2005

PowerShell and Active Directory NO AD support in PowerShell v1 Exchange 2007 has limited AD support Quest AD cmdlets Currently Beta Quest PowerGUI PowerShell Community Extensions Scripting

Active Directory Provider PowerShell Community Extensions Access AD as “filesystem” Navigation Use core commands Interactive or scripting Associated cmdlets Issues – “open source”

Administering Active Directory Demo

Agenda What is PowerShell? Learning PowerShell Administration of Windows systems Administration of Active Directory Administration of Exchange 2007 Administration of SQL Server 2005

Exchange Management Exchange Information no longer visible in Active Directory Users and Computers May need to rethink administrative tasks Exchange Management Console creates, uses and shows PowerShell scripts of actions Cannot perform all actions in GUI Administrative development model

Administrative Development Use the GUI Copy the script Modify Use cmdlets Create pipeline Put into script

Exchange Management Shell PowerShell is pre-requisite for Exchange 2007 install EMS = PowerShell + Exchange PowerShell snapin Both coexist EMS adds 300+ cmdlets

Administering Exchange 2007 Demo

Agenda What is PowerShell? Learning PowerShell Administration of Windows systems Administration of Active Directory Administration of Exchange 2007 Administration of SQL Server 2005

Administering non-PowerShell enabled applications Needs a.NET API SQL Server SharePoint SQL Server 2005 SMO = Server Management Objects Need to use.NET

SQL Server SMO Programmatic administration.NET object model Examples in C# Tasks View status Access data Perform backups

Administering SQL Server 2005 Demo

Summary/Call to Action PowerShell can be used to administer large and growing parts of your environment Now available at: Search for PowerShell Try it, Deploy it, Use it, Share

For More Information User group: My Blog Get-PSUGUK UK PowerShell User Group

Downloads Quest AD cmdlets: server/arms.aspx server/arms.aspx Quest PowerGUI PowerShell Community Extensions ojectName=PowerShellCX ojectName=PowerShellCX

Community Resources Newsgroup: Microsoft.Public.Windows.PowerShell Team blog: Channel 9 tag: Wiki: Wiki Script Center: Manning Press book by Bruce Payette: PowerShell in Action O’Reilly book – Monad: Introducing the MSH Command Shell and Language Sapien Press book by Don Jones: PowerShell MshAnalyzer tool

Resources Technical Chats and Webcasts Microsoft Learning and Certification MSDN & TechNet Virtual Labs Newsgroups communities/newsgroups/en-us/default.aspx Technical Community Sites User Groups

Any Questions?

Ihr Potenzial. Unser Antrieb. Thank you for attending this TechNet Event Find these slides at:

Reference Slides

Scripting with COM Access existing instrumentation Bind to COM objects $fso = New-Object -ComObject Scripting.FileSystemObject $m = [System.Runtime.InteropServices.Marshal] $word = $m::GetActiveObject("Word.Application") Invoke methods/access properties $fso.GetDrive(“C:”) $fso.VolumeName = “System Drive” Understand/extend instrumentation Extend and discover properties/methods Update-TypeData Office.Word.Types.ps1xml $fso | Get-Member Manipulate and format results Define and import custom formating Update-FormatData Office.Word.Format.ps1xml $word.RecentFiles | Sort name | Format-Table Allows more simpler/more powerful COM scripts because of utilities and formatting

Scripting with WMI PowerShell provides native WMI support Get-WmiObject Allows for inspection of WMI namespace Get-WmiObject –list [-Namespace xx] Get-WmiObject –Class xx –Namespace xx –Property xxx – Filter xxx –ComputerName xxx –Credential xxx Native language support [WMI] “\\JPSDESK10\root\cimv2:Win32_Process.Handle="0“ \\JPSDESK10\root\cimv2:Win32_Process.Handle="0 [WMICLASS] "ROOT\cimv2:WIN32_PROCESS" [WMISEARCHER]"select * from Win32_process WHERE Name = 'calc.exe'"

Scripting with.NET PowerShell provides native access to any.NET class Create any object [reflection.assembly]::LoadWithPartialName("System.Wind ows.Forms") $d = New-Object System.DateTime 2006,12,25 Access Properties/Invoke Methods $d.DayOfWeek$d.AddDays(-30) Access Statics [DateTime]::Now[DateTime]::IsLeapYear(2006) Allows admins to easily access and leverage a huge API set because of scriptability, utilities and formatting

Scripting with XML PowerShell provides native XML support Native datatype $x=[xml]"<a><b><c>TEST</c></b></a>“ $b =[xml](type c:\i386\mssecure.xml) Native syntax to access “data” view of properties $b.BulletinDataStore.Bulletins.Bulletin[0] Access to XML methods $b.BulletinDataStore.SelectNodes(“//Patch”) XML properties available through PSBase property $b.BulletinDataStore.PSBase.innerXml

Scripting with Text Invoke existing tools Existing command run directly after variables are expanded Harvest data from existing tools Parse output into variables using text utilities. Pipe data to SELECT and use –FIRST and –LAST Select-String Select-String Dir | Select-String Dir | Select-String [DateTime]”12/25/2006 7:00” ([DateTime]”12/25/2006 7:00”).AddDays(-30) Use functions/scripts to wrap the commands and convert output to objects or provide standard syntax Safely process text Use CLR types via Windows PowerShell to safely parse text [URI]” Allows admins to get 2-10x more power out of existing commands because of scriptability

Slide Guidelines Slides should emphasize key points Limit to 6 lines per slides Font, size, and color for text have been formatted for you in the Slide Master Colours: