Ravikanth C.

Slides:



Advertisements
Similar presentations
IF statement (i) Single statement. IF ( logical expression ) statement Example: read(*,*) a if (a. lt. 0) a = -a write(*,*) a Or read(*,*) a if (a < 0)
Advertisements

CIS 240 Introduction to UNIX Instructor: Sue Sampson.
Painless PowerShell for SharePoint Admins Rick Taylor.
Rick Toner MCSD, MCPD, MCITP Blog:
Introduction to Unix – CS 21 Lecture 11. Lecture Overview Shell Programming Variable Discussion Command line parameters Arithmetic Discussion Control.
$$ 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.
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.
James Boother Blog: AUTOMATING ADMIN TASKS WITH POWERSHELL.
CS Lecture 03 Outline Sed and awk from previous lecture Writing simple bash script Assignment 1 discussion 1CS 311 Operating SystemsLecture 03.
Fabrice Romelard [MVP] Intranet – Extranet CTO SGS.
Basic.  Powershell scripts are flat text files that end with “.ps1” (e.g. myscript.ps1)  Similar to other scripting languages, whatever you can do on.
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
SharePoint 2010 Administration using PowerShell Brian Caauwe Senior Consultant – SharePoint – MCTS March 20, 2010.
INTRODUCTION TO POWERSHELL Neil Iversen. Points of Interest  Introduction  Getting Around  Basic Syntax  Making yourself at ~  Not-So-Basic Syntax.
Managing Active Directory with PowerShell JOSEPH MOODY.
Further Shell Scripting Michael Griffiths Corporate Information and Computing Services The University of Sheffield
POWERSHELL Dr. Sarah Gothard CEG 233 Spring 2010.
Daniel Petri MVP, Microsoft Infrastructure Manager John Bryce Training November 2007.
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.
© 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.
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.
Mark E. Schill. Enter POWERSAT50 at checkout to save $50 on any training course. Learn PowerShell. 24/7, Anywhere.
Module 3 Administering and Automating SharePoint.
December, 21, 2010 Bartek Bielawski Sr IT Site Services Specialist Warsaw, Poland.
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!
CN1266 Network Scripting V1.2 Kemtis Kunanuraksapong MSIS with Distinction MCTS, MCDST, MCP, A+
Managing System Center 2012 Configuration Manager with Windows PowerShell MEMUG August 23 rd 2013.
PowerShell For SharePoint Developers Neil Iversen Inetium
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.
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.
Agenda Positional Parameters / Continued... Command Substitution Bourne Shell / Bash Shell / Korn Shell Mathematical Expressions Bourne Shell / Bash Shell.
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.
 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.
Automating SharePoint 2010 administration tasks with Power Shell Toni Frankola SharePoint MVP, Croatia
Shell script – part 2 CS 302. Special shell variable $0.. $9  Positional parameters or command line arguments  For example, a script myscript take 2.
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.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Blog PowerShell for Managing Active.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
 Version 1.0[edit]edit  Version 1.0 was released in 2006 for Windows XP SP2/SP3, Windows Server 2003,
Introduction to SQL Server Automation with Powershell by Chris Sommer.
PowerShell 5 & Windows 10. What are we covering today? What is PowerShell? Why is PowerShell important? Some simple demos on Windows 10.
PHP using MySQL Database for Web Development (part II)
Building Powerful Workflow Automation with Cherwell and PowerShell
PowerShell Introduction Copyright © 2016 – Curt Hill.
PowerShell 2.0 Remoting Ravikanth C.
Introduction to PowerShell
Getting Started with the Data ONTAP PowerShell Toolkit
© 2007 Asynchrony Solutions, Inc. 1 10/29/07 Introduction to PowerShell Brian Button VP Engineering Asynchrony Solutions, Inc
Introduction to PowerShell
PowerShell Best Practices for SQL DBA’s
PowerShell Flow of Control Copyright © 2016 – Curt Hill.
PHP an introduction.
INTRODUCTION to PERL PART 1.
Presentation transcript:

Ravikanth C

 A lead engineer at Dell  SharePoint professional by day and PowerShell scripter at night  Blog at  Developer of ◦ PSCodePlex ◦ PSRemoteFileExplorer ◦ Remote File Explorer PowerPack ◦ BITS File Transfer PowerPack  Author of ◦ Free eBook - Layman’s guide to PowerShell 2.0 remoting (Coming soon)

 What is PowerShell?  Getting started  Using PowerShell  Getting Help  Tools for the job  Learning resources  Q & A

 Remote file explorer -> 698 lines of PowerShell  This is just one example..!

 The best shell scripting environment for Windows ◦ A new scripting language ◦ Replacement for a weak Windows command-line  Default management / automation platform for all Microsoft products going forward  Object based ◦ Built on top of.NET type system ◦ Everything is an object DOS off setLocal EnableDelayedExpansion set /a value=0 set /a sum=0 FOR /R %1 %I IN (*) DO ( set /a value=%~zI/1024 set /a sum=!sum!+!value! Size is: !sum! k $size=0;Get-ChildItem C:\Scripts | % { $Size+=$_.Length}

 PowerShell is in version 2.0  Default on Windows 7 and Windows Server 2008  Part of Windows management framework download for Windows Server 2008, Vista, XP and Windows 2003 ◦  Requires.NET 2.0 SP1 or later

 Console history, Intellisense for cmdlets, variables and parameters

 Pronounced as command-let  A lightweight command  an instance of.NET framework classes  Use verb-noun pairs ◦ Get-Verb to list all approved verbs

 Not case-sensitive  Default value is $null  Cmdlets to manage variables ◦ Clear-Variable ◦ Get-Variable ◦ New-Variable ◦ Remove-Variable ◦ Set-Variable

 Types ◦ User created variables ◦ Automatic variables  Created by PowerShell to maintain its state  Cannot be modified  Examples: $PSHome, $$, $^, $?, etc ◦ Preference variables  Created by PowerShell to store user preferences  Can be modified  Examples: $MaximumHistoryCount, etc

 Alternate names for cmdlets  Cmdlets to manage aliases ◦ Export-Alias ◦ Get-Alias ◦ Import-Alias ◦ New-Alias ◦ Set-Alias  Cannot take parameters ◦ Workaround: put the statement in a script and alias to that  Example: Dir, ls, gcm, gci, etc

 Conditional statements ◦ If ◦ Switch  l.ooping ◦ For  For ($i=0;$i –le 10;$i++) {Write-Host $i} ◦ Foreach  Used on a collection of items  Foreach ($name in $namesArray) { Write-Host $name } ◦ Do  Do { Write-Host $i; $i++ } while ($i –le 10)  Do { Write-Host $i;$i++} Until ($i –lt 10) ◦ While  While ($i –le 10) { Write-Host $i;$i++ }

 Comparison operators ◦ -ne, -eq, -lt, -gt, -ge, -le, -like, -notlike, -contains, - notcontains, -match, -notmatch  Logical operators ◦ -or, -and, -xor, -not, !  Arithmetic operators  Assignment operators

 Arrays ◦ Collection of objects of the same type ◦ $a ) ◦ $a = “PowerShell”,”VBScript”  Hash Tables ◦ Collection of key value pairs ◦ $ hash } ◦ $a = {“Name”=“PowerShell”; “IsHot”=$true}

 Get-Command ◦ Gets a list of all commands  Get-Help ◦ Shows help for a given cmdlet  Get-Member ◦ Gets members of an object  Get-PSDrive ◦ Shows information stores in PowerShell  About_Topics ◦ Get-Help about*

 In PowerShell, there will be more than one way to do the same thing. For example ◦ [System.Diagnostics.Process]::GetProcesses() ◦ Get-Process  Understand execution policies  Use PowerShell profiles

 PowerShell Console  PowerShell ISE  PowerGUI AdminConsole  PowerGUI ScriptEditor  PowerWF  PowerShell Plus

 Getting started guide Getting started guide  PowerShell Learning center PowerShell Learning center  Free PowerShell eBook Free PowerShell eBook  The scripting Guys blog The scripting Guys blog  PowerScripting Podcast PowerScripting Podcast on on Twitter