 Version 1.0[edit]edit  Version 1.0 was released in 2006 for Windows XP SP2/SP3, Windows Server 2003,

Slides:



Advertisements
Similar presentations
Auditing Microsoft Active Directory
Advertisements

Remote Desktop Services
$$ Idea Updatable help system Method overload discovery HelpUri attribute support HelpFile property on FunctionInfo Simplified Where and.
Jason Himmelstein, MVP Senior Technical Director,
James Boother Blog: INTRODUCTION TO POWERSHELL.
James Boother Blog: AUTOMATING ADMIN TASKS WITH POWERSHELL.
10.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 9: Implementing and Using Group Policy.
Hands-On Microsoft Windows Server 2003 Administration Chapter 5 Administering File Resources.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 8: Implementing and Managing Printers.
Managing Active Directory with PowerShell JOSEPH MOODY.
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.
5.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 5: Working with File Systems.
Basic.  PS is a command line interpreter/scripting environment  Designed for.Net  Similar to C#  Easy to instantiate.Net classes  Standardized syntax.
Daniel Petri MVP, Microsoft Infrastructure Manager John Bryce Training November 2007.
Guide to MCSE , Enhanced 1 Activity 9-1: Creating a Group Policy Object Using the MMC Objective: To create a GPO using the Group Policy Object Editor.
WIN-B331 Get a consistent, personal Windows experience that matches your unique work style Easy for IT to deliver personal, user-defined experiences.
Connect with life L.Srividya Architect Advisor | Microsoft India.
© 2009 Autodesk Troubleshooting common installation problems TS AutoCAD (LT) Product Support By Tom Stoeckel.
Adding a Module The Import-Module cmdlet  Can be used to load any external module into PowerShell.  Uses the following syntax to add the ActiveDirectory.
Chapter 13: Sharing Printers on Windows Server 2008 R2 Networks BAI617.
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.
©Kwan Sai Kit, All Rights Reserved Windows Small Business Server 2003 Features.
| | Tel: | | Computer Training & Personal Development Microsoft Office PowerPoint 2007 Expert.
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.
Appendix A Starting Out with Windows PowerShell™ 2.0.
Section 1: Introducing Group Policy What Is Group Policy? Group Policy Scenarios New Group Policy Features Introduced with Windows Server 2008 and Windows.
June 6 th – 8 th 2005 Deployment Tool Set Synergy 2005.
Fall 2011 Nassau Community College ITE153 – Operating Systems Session 23 Shared Folders 1.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
DIT314 ~ Client Operating System & Administration CHAPTER 5 MANAGING USER ACCOUNTS AND GROUPS Prepared By : Suraya Alias.
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.
Learningcomputer.com SQL Server 2008 – Administration, Maintenance and Job Automation.
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!
POWERSHELL SHENANIGANS KIERAN JACOBSEN HP ENTERPRISE SERVICES.
Module 4 Planning for Group Policy. Module Overview Planning Group Policy Application Planning Group Policy Processing Planning the Management of Group.
Virtual techdays INDIA │ 9-11 February 2011 Monitoring and managing remote Windows 7 desktops with Windows PowerShell Ravikanth C │ Dell Inc.
Corey Hynes HynesITe, Inc Session Code: SRV317 Objectives Let you walk out of here, being able to run a script against an OU of computers, to make some.
Windows PowerShell Introduction 1 Morgan Simonsen Ementor.
 An alias is an alternative name assigned to a Cmdlet.  Aliases allow users to quickly interact with the shell.  The Cmdlet get-alias is.
MySQL Getting Started BCIS 3680 Enterprise Programming.
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.
Learningcomputer.com SQL Server 2008 – Management Studio.
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.
Summit 605D Configure, manage and monitor your desktop virtualization environment using PowerShell Jon Schaubhut, Pascal Bijnaar, Pedro Tramont Test Engineers.
Module 6 Creating and Configuring Group Policy. Module Overview Overview of Group Policy Configuring the Scope of Group Policy Objects Evaluating the.
Institute for the Protection and Security of the Citizen HAZAS – Hazard Assessment ECCAIRS Technical Course Provided by the Joint Research Centre - Ispra.
Module 14: Advanced Topics and Troubleshooting. Microsoft ® Windows ® Small Business Server (SBS) 2008 Management Console (Advanced Mode) Managing Windows.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
MySQL Getting Started BCIS 3680 Enterprise Programming.
Group Policy Preferences. Session Objectives And Agenda Group Policy Preferences High level Overview New Extensions details New Concepts Preferences Reporting.
Ravikanth C.
SSIS 2012: The Quiet Revolution Presented by Bryan Cafferky Business Intelligence Consultant BPC Global Solutions LLC
Start-SPPowerShell – Introduction to PowerShell for SharePoint Admins and Developers Paul BAker.
Preparing for the Windows 8.1 MCSA
Getting Started with the Data ONTAP PowerShell Toolkit
SharePoint Saturday Omaha April 2016
Windows PowerShell Remoting: Definitely NOT Just for Servers
Exploring the Power of EPDM Tasks - Working with and Developing Tasks in EPDM By: Marc Young XLM Solutions
PowerShell Best Practices for SQL DBA’s
Mass Hunting and exploitation with powershell
Introducing NTFS Reliability Security Long file names Efficiency
Presentation transcript:

 Version 1.0[edit]edit  Version 1.0 was released in 2006 for Windows XP SP2/SP3, Windows Server 2003, and Windows Vista. For Windows Server 2008, it is included as an optional featureWindows XPWindows Server 2003Windows VistaWindows Server 2008  Version 2.0[edit]edit  Windows PowerShell ISE, with multiple open PowerShell sessions (RunSpaces) in the Windows PowerShell 2.0.  Version 2.0 is integrated with Windows 7 and Windows Server 2008 R2 and is released for Windows XP with Service Pack 3, Windows Server 2003 with Service Pack 2, andWindows Vista with Service Pack 1. [40]Windows 7Windows Server 2008 R2Windows XPWindows Server 2003Windows Vista [40]  Microsoft released PowerShell 2.0 with Windows 7 and Windows 2008 R2. Windows PowerShell 2.0 is installed by default on Windows Server 2008 R2 (except on Core installations where it is optional) and Windows 7. [41] For older platforms it is available via the Windows Management Framework. [42] PowerShell V2 includes changes to the scripting language and hosting API, in addition to including more than 240 new cmdlets. [43][44]Windows Server 2008 R2Windows 7 [41] [42] [43][44]  Version 3.0[edit]edit  Version 3.0 is integrated with Windows 8 and with Windows Server Microsoft has also made PowerShell 3 available forWindows 7 with Service Pack 1, for Windows Server 2008 with Service Pack 1, and for Windows Server 2008 R2 with Service Pack 1. [51][52]Windows 8Windows Server 2012Windows 7Windows Server 2008Windows Server 2008 R2 [51][52]  Version 4.0[edit]edit  Version 4.0 is integrated with Windows 8.1 and with Windows Server 2012 R2. Microsoft has also made PowerShell 4 available forWindows 7 SP1, Windows Server 2008 R2 SP1 and Windows Server [55]Windows 8.1Windows Server 2012 R2Windows 7 SP1Windows Server 2008 R2Windows Server 2012 [55]

 Type powershell in the cmd line  Navigate through the start menu  Use Window-R and type "PowerShell ISE" to start the PowerShell ISE.  is-the-powershell-ise?forum=W8ITProPreRel is-the-powershell-ise?forum=W8ITProPreRel

 Get-ExecutionPolicy  Set-ExecutionPolicy Restricted  Nothing will run RemoteSigned  Runs stuff you create and stuff from the internet only if it’s signed from a trusted publisher AllSigned  Anything run must be signed by a trusted publisher Unrestricted  Runs everything like a real cowboy  Get-Help About_signing

 What’s a cmdlet? It’s a tiny tiny little command Instances of.NET Framework classes; not stand- alone executables.  Verb-Noun Get-Process Remove-Website Stop-Job  Noun is not plural

 Tab lets you scroll through items  F5 will execute like in SSMS but will execute everything not just the highlighted section  If the results don’t fit in the window, stretch it out or write to a file, or pipe it and format it

 Get-Help Get-Help Nameof-Cmdlet -full  Displays the entire help topic for a cmdlet, including parameter descriptions and attributes, examples, input and output object types, and additional notes. -detailed  Adds parameter descriptions and examples to the basic help display -example  Displays only the name, synopsis, and examples -online  Opens technet article which is where I stole the descriptions 

 How can I break things? Get-command shows you all of the easy out of the box ways you can destroy Get-process, Get-service, etc shows what you can easily destroy Stop-Process -ProcessName explorer -Force -whatif  Don’t just run things from the internet, and try to use whatif or confirm when you can.  Anything in your domain you have permissions to use, you can query, modify or delete WMI, Files, The Registry, Eventlog, SQL Server, Exchange, Active Directories, VMWare

 -ComputerName Get-EventLog system –ComputerName THENAME  Some cmdlets restrict you from directly calling -ComputerName, you can use Invoke- Command and bracket them Invoke-Command -ComputerName Server01 {Stop- Process Powershell}  Use a servers list in a variable

 Pass your data to another cmdlet for filtering or modification  Get-Service | Sort-Object Status | Format-Table  Get-EventLog application | Where- Object {$_.source -like "*SQL*"} | Format-Table EventID, MachineName, TimeWritten, Message

 $ Use this for most variables. Variables are automatically declared  = This is how you set variables You can also use the set-variable cmdlet if you like typing  There are special variables Get-Help about_automatic_variables  There are reserved words Get-Help about_Language_Keywords  There are operators and arrays  More info introduction/variables-arrays-hashes/ introduction/variables-arrays-hashes/

 Can make code succinct  Get-Alias lists all of the aliases that are built in, set/imported, or added to your profile

 Yes!  Import Get-Content c:\files\test.txt $f = Import-CSV c:\files\test.csv –delimiter '|' $f | Select-Object Column2,Column3,Column6 | Format-Table  Export Export-CSV c:\scripts\test.csv Export-Clixml c:\scripts\test.xml Out-DataTable | Write-DataTable 

 You can run Powershell from the ISE or cmd line manually powershell.exe -noexit &'c:\my scripts\test.ps1'  -noexit keeps the window open  Ampersand tick lets you pass files that have spaces in the filepath  But you can also Run as Windows schedule task Run as SQL Agent job Run as a GPO Logon script Nest in a.bat file Xp_cmdshell SSIS

 Why do I care about Profiles? Pre runs commands to help quickly configure your powershell environment. Quickly load modules, aliases, functions, change the file path of your working folder, ect.  Where is the profile? Run: $profile Will give you a result something like: C:\Users\USERNAME\Documents\WindowsPowerShell\Microsoft.PowerShell_ profile.ps1

 SQLPSX  Automatic Download it, install the msi and import the modules with import-module  Manual Download it, unzip file copy files to My Documents\WindowsPowerShell\Modules\ Type get-module –listAvailable Add the import-module cmdlets to your profile Has a bunch of built in admin functions  add a login? Run a query? Copy a SSIS package from File to DB? Run a backup? Change permissions?  Querying is as easy as get-isdata 'Z002\SQL2K8' pubs 'select * from authors'

 Built on.NET and all objects are available  Full access to COM and WMI  Access to WS-Management and CIM  Also contains an API so powershell runtime can be embedded in other applications

Running Windows PowerShell Scripts Hey Scripting Guy! Website/URL monitor SQL Agent Jobs excel report Drive space report Write datatable Technet script repository alue=PowerShell Forums Spiceworks Powershell.org SSC