54
EXPLORING VARIOUS IT ENVIRONMENTS & INTRO TO POWERSHELL PRESENTED FOR THE KENT STATE ASHTABULA AITP CHAPTER NOVEMBER 13, 2013 SARAH DUTKIEWICZ [email protected]

Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

Embed Size (px)

DESCRIPTION

Presented to the

Citation preview

Page 1: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

EXPLORING VARIOUS IT ENVIRONMENTS & INTRO TO

POWERSHELLPRESENTED FOR THE KENT STATE ASHTABULA AITP CHAPTER

NOVEMBER 13, 2013

SARAH DUTKIEWICZ

[email protected]

Page 2: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

AGENDA

• Quick Background

• Adventures in IT

• What is IT

• IT in Education

• IT in an ISP

• IT in Manufacturing

• IT elsewhere

• Intro to PowerShell

• What is it

• Why you should care about it

• What products can benefit from it

• PowerShell Basics

• Resources

Page 3: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

QUICK BACKGROUNDTHINGS TO KNOW BEFORE EMBARKING INTO IT ADVENTURES

Page 4: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

SARAH’S BACKGROUND

• First computer was a Compaq Presario 486, late start into computing

• Originally focused on software – VB3 app talking to an Access database

• Data junkie / UX junkie

• Programming language junkie

• Programming and data internship right out of high school

• Bachelor of Science in Computer Science & Engineering Technology, University of Toledo, May 2002

• Various IT positions and a developer position along the way

• Independent consultant since August 2011

• Married to an IT consultant with similar background

Page 5: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

COMPUTER SCIENCE & ENGINEERING TECHNOLOGY

• Some electrical courses – resistive & reactive circuits, electronics, digital logic design, field programmable logic devices (VHDL)

• Some hardware-related courses – VLSI, PC and industrial networks, small computers

• Some programming-related courses – Microcomputers (Assembly), Web Site Design (HTML, XML) , Java, JavaScript, programming language paradigms

• Admin-related courses – Web server administration

• Middle-tier courses – Client-Server computing

Page 6: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

ADVENTURES IN IT

Page 7: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

WHAT IS I.T.?

Page 8: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

INFORMATION TECHNOLOGY

The application of computers and telecommunications equipment to store,

retrieve, transmit and manipulate data, often in the context of business or other enterprise

Page 9: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

SOME ROLES IN IT - ADMINISTRATORS

System administration

Software

Hardware

Server administration

Web server administration

Mail server administration

Database server administration

Network administration

Page 10: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

OTHER ROLES IN IT

• Software developer

• Project manager

• Desktop or other client support

• Reports manager

• And many others

Page 11: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

INDUSTRIES FOR IT CAREERS

• Manufacturing

• Medical

• Financial

• Energy

• Education

• Insurance

• Libraries

• Government

• Military

• Anywhere technology is needed! (EVERYWHERE!)

Page 12: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

IT IN EDUCATION

Page 13: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

TYPES OF CLIENTS

• Faculty and Staff

• Lawyers

• Military (ROTC)

• Executives (President, VPs, chancellors, etc.)

• Labs

Page 14: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

ENVIRONMENT CONSIDERATIONS• Various platforms – Solaris, Linux, Windows, Mac; mobile, desktop, tablet

• Various backgrounds – technical and non-technical users

• Every client is different

• Sometimes you won’t know what you’re getting into until you’re there

Page 15: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

STORIES FROM EDUCATION• The First Few Weeks

• The Paranoid Grad Student

• ROTC

• Overall Adventures

Page 16: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

IT IN AN INTERNET SERVICE PROVIDER

(ISP)

Page 17: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

WHAT MAKES UP THE IT TEAM OF AN ISP• Systems Administrators

• Mail Administrators

• Webserver Administrators

• Network Administrators & Engineers

• Web Developers*

• Technical Support

Page 18: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

EXPERIENCE WITH TECH SUPPORT• First line of defense, sometimes the gateway to the other tech departments

• Mostly phone support, some onsite support

• Not scripted, as every call is different

• End user could be a personal or business account

• Customers are human, so add a personal touch

• Pay attention to others on the team and learn from them

• Don’t be afraid to talk to other departments to learn about their jobs so that you can do your job better in supporting them as well, since calls may come in for them

Page 19: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

STORIES FROM ISP I.T.• The “I Want to Talk to the Manager” Dilemma

• Becoming Familiar with Clients

Page 20: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

IT IN MANUFACTURING

Page 21: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

MOTTO OF MANUFACTURING

If it’s broken, fix it. If it’s working, don’t break it.

Page 22: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

ROLES OF IT IN MANUFACTURING

• Database Administrator

• ERP systems

• Timeclocks

• Financial reporting

• HR issues

• System Administrator

• Network Administrator

• Troubleshoot technical issues with machines

• Phone system (PBX) administration

• Desktop support

Page 23: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

STORIES FROM IT IN MANUFACTURING

• Sensitive Data

• Security Checks

• Small Team to Large Client Base

Page 24: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

IT ELSEWHERE

Page 25: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

GENERAL NOTES ON IT • IT roles may be siloed – where you can specialize in a part of IT and stay with it

• Smaller companies try for more jacks of all trades to watch their IT costs

• A lot of companies see IT as nothing more than an overhead department, despite the necessity

• Consultants are jacks of all trades

• Managers of IT departments may or may not have technical experience; some places put managers in place with business/team building skills rather than technical know-how

Page 26: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

INTRO TO POWERSHELL

Page 27: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

AGENDA• What is it

• Why you should care about it

• What products can benefit from it

• System requirements

• Resources

Page 28: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

WHAT IS POWERSHELL?• .NET Scripting Language from Microsoft used for task automation

and configuration management

• Available for Windows XP and later

• Comes with newer Windows operating systems

• Can be used to replace batch files and VBScript files

• Extensible automation engine

Page 29: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

WHO CAN BENEFIT FROM POWERSHELL?• Developers

• System Administrators

• Mail Administrators

• Database Administrators

• SharePoint Administrators

• Anyone who has tasks using the .NET Framework that can be automated

Page 30: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

SIMPLE POWERSHELL EXAMPLE

Page 31: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

OBJECT-ORIENTED NATURE OF POWERSHELL

Page 32: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

WHY YOU SHOULD CARE ABOUT POWERSHELL• Managing one user in a GUI = easy; managing hundreds of users in a GUI = time-consuming

• Many click-click-click processes can be automated

• Automating processes with a script makes processing quicker, giving you more time to tackle other issues or projects

• VBScript is a thing of the past; a lot more products are using PowerShell for administration

Page 33: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

WHAT CAN IT AUTOMATE?• List all computers on a network, with their operating system and service pack level

• Start a service on multiple computers

• Manage Active Directory users

• Scrape all the event logs on your network for a particular error

• IIS website setup

• And many more!

Page 34: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

PRODUCTS THAT BENEFIT FROM POWERSHELL ADMINISTRATION• Active Directory

• Exchange

• Office 365

• SharePoint

• SQL Server

• Windows Server

• IIS

• Network Administration

• VPN

• BitLocker

• IBM Websphere MQ

• System Center

• Windows Compute Cluster Server

• VMWare vShere

Page 35: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

TWO ENVIRONMENTS• Console

• Integrated Scripting Environment

Page 36: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

SOME OF THE SUPPORTED OPERATING SYSTEMS• Windows Server 2012

• Windows 8

• Windows Server 2008 R2

• Windows Server 2008 R2 Server Core

• Windows Server 2008 SP1 – SP3

• Windows 7

• Windows Vista SP1 – SP2

• Windows XP SP3 & Windows 7 XP Mode

• Windows Embedded POSReady 2009

• Windows Embedded for Point of Service 1.1

Page 37: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

MINIMUM INSTALLATION REQUIREMENTS

• Microsoft .NET Framework 2.0 with Service Pack 1

• Windows Management Framework Core

Page 38: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

COMPONENTS

• Variables• Aliases• Cmdlets• Functions• Providers• Modules

Page 39: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

VARIABLES• Store results in a variable to use later

• Some variables are built-in

• Special variables

• args – collection of arguments passed to a script

• $_ - the pipeline variable

• $Host – information about the current PowerShell environment

• ~ - user’s home directory

• List current variables:

dir Variable:\

Page 40: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

ALIASES• Shortcuts for commands

• Set-Alias for setting aliases

• Get-Alias for getting aliases

• No alias alias:

Set-Alias alias Set-Alias

Page 41: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

CMDLETS

• Pronounced “command-let”

• Verb-Noun Structure

• Most Helpful Ones When Learning;

• Get-Help / Update-Help

• Get-Command

• Get-Member

• Specific Approved Verbs – see Get-Verb

Page 42: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

GET-HELP / UPDATE-HELP• Newer versions of PowerShell aren’t shipping with the help files so Update-Help should be run first

• At any point, you can type Get-Help for help

• Syntax:

Get-Help topic –type

Get-Help cmdlet – type

• Topics typically start with about_

• Types of help include:

• Examples

• Detailed

• Full

• Online

Page 43: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

GET-HELP EXAMPLES

Page 44: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

GET-COMMAND• Gets a list of available commands

• Can do wildcard searches

• Can filter results with options – including Verb, Module, Noun, CommandType

Page 45: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

GET-COMMAND EXAMPLE

Page 46: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

GET-MEMBER• Shows attributes, properties, and methods of an object

• Shows the .NET type of an object

• Syntax:

Object | Get-Member

• Object can be a command, cmdlet, variable, or other .NET object

Page 47: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

GET-MEMBER EXAMPLES

Page 48: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

PROVIDERS• Make it easier to access certain data stores

• Includes :

• Registry

• Certificates

• Environment Variables

• FileSystem

• Function

• Alias

• Variable

• WSMAN

Page 49: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

MODULES• Package of goodies

• Cmdlets

• Aliases

• Functions

• Providers

• Other PowerShell Goodies

Page 50: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

SCRIPT MODULE• Written in PowerShell

• PSM1 file

Page 51: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

BINARY MODULE• Written in C#

• DLL file

Page 52: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

MANIFEST MODULE• PSD1 File

• New-ModuleManifest

Page 53: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

POWERSHELL RESOURCES

• Hey Scripting Guy! Blog: http://blogs.technet.com/b/heyscriptingguy/

• PowerScripting Podcast: http://powerscripting.wordpress.com/

• Automating Microsoft Windows Server 2008 R2 Administration with Windows PowerShell 2.0: http://qtlil.me/psbook

• PowerShell.org: http://powershell.org

• PowerShell.com

• On Twitter: #PowerShell

Page 54: Kent State Ashtabula AITP - Exploring IT and Intro to PowerShell

SARAH DUTKIEWICZ

TWITTER: @SADUKIE

BLOG: HTTP://CODINGGEEKETTE.COM

EMAIL: [email protected]

LINKEDIN: MY LINKEDIN PROFILE