KEMBAR78
SVCC 5 introduction to powershell | PPTX
Introduction To PowershellPaul H CassidyTest Automation LeadFront Porch – Sonora, CAhttp://www.twitter.com/qa_warrior
AgendaIntroduce PowerShellLearn to investigate and explore PowerShellDemo’s showing a bit of what is possible with PowerShell
Windows PowerShellA command line and scripting languageAs interactive and engaging as BASH/KSHAs programmatic as Perl/Python/Ruby
State of the Software - CommunityActive and useful Newsgroups and Forums
 Lots of active Codeplex projects
 Strong group of MVPs
 Strong community tools
Lots of books covering specific and general areasThe Difference is OBJECTS!Get-Process | Where { $_.handles –gt 500 } | Sort handles | Format-TableCommon Windows PowerShell ParserGet-ProcessCmdletSort CmdletFormatCmdletWhere CmdletWindows PowerShell Pipeline Processor
Productivity
Learn and LeverageIn the box documentsRelease NotesGetting Started, User’s Guide, Quick ReferenceHelpDiscovery utilitiesBooksCommunityPractice ad hoc development
Utilities - Discovery
Discovery UtilitiesWindows PowerShelldemo
Utilities – Object Manipulation
Object Manipulations UtilitiesWindows PowerShelldemo
Transformation and Output
Transformation and Output UtilitiesWindows PowerShelldemo
PowerShell provides native access to any .NET classCreate any object[reflection.assembly]::LoadWithPartialName("System.Windows.Forms")$d = New-Object System.DateTime 2006,12,25Access Properties/Invoke Methods$d.DayOfWeek$d.AddDays(-30)Access Statics[DateTime]::Now[DateTime]::IsLeapYear(2008) Scripting with .NETAllows admins to easily access and leverage a huge API set because of scriptability, utilities and formatting
.Net ScriptingWindows PowerShelldemo
Access existing instrumentationBind to COM objects$fso = New-Object -ComObjectScripting.FileSystemObject$m = [System.Runtime.InteropServices.Marshal]$word = $m::GetActiveObject("Word.Application") Invoke methods/access properties$fso.GetDrive(“C:”)$fso.VolumeName = “System Drive”Manipulate and format resultsDefine and import custom formatingUpdate-FormatData  Office.Word.Format.ps1xml$word.RecentFiles | Sort name | Format-Table Scripting with COMAllows more simpler/more powerful COM scripts because of utilities and formatting
PowerShell provides native WMI supportGet-WmiObjectAllows for inspection of WMI namespaceGet-WmiObject –list [-Namespace xx]Get-WmiObject –Class xx –Namespace xx –Property xxx – Filter xxx –ComputerName xxx –Credential xxxNative language support[WMI] “\\JPSDESK10\root\cimv2:Win32_Process.Handle="0“[WMICLASS] "ROOT\cimv2:WIN32_PROCESS"[WMISEARCHER]"select * from Win32_process WHERE Name = 'calc.exe'"Scripting with WMI
WMI ScriptingWindows PowerShelldemo
PowerShell provides native XML support[XML]”<root>
. </root>”Projects a “data-view” of XML Scripting with XML

SVCC 5 introduction to powershell

  • 1.
    Introduction To PowershellPaulH CassidyTest Automation LeadFront Porch – Sonora, CAhttp://www.twitter.com/qa_warrior
  • 2.
    AgendaIntroduce PowerShellLearn toinvestigate and explore PowerShellDemo’s showing a bit of what is possible with PowerShell
  • 3.
    Windows PowerShellA commandline and scripting languageAs interactive and engaging as BASH/KSHAs programmatic as Perl/Python/Ruby
  • 4.
    State of theSoftware - CommunityActive and useful Newsgroups and Forums
  • 5.
    Lots ofactive Codeplex projects
  • 6.
  • 7.
  • 8.
    Lots of bookscovering specific and general areasThe Difference is OBJECTS!Get-Process | Where { $_.handles –gt 500 } | Sort handles | Format-TableCommon Windows PowerShell ParserGet-ProcessCmdletSort CmdletFormatCmdletWhere CmdletWindows PowerShell Pipeline Processor
  • 9.
  • 10.
    Learn and LeverageInthe box documentsRelease NotesGetting Started, User’s Guide, Quick ReferenceHelpDiscovery utilitiesBooksCommunityPractice ad hoc development
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
    Transformation and OutputUtilitiesWindows PowerShelldemo
  • 17.
    PowerShell provides nativeaccess to any .NET classCreate any object[reflection.assembly]::LoadWithPartialName("System.Windows.Forms")$d = New-Object System.DateTime 2006,12,25Access Properties/Invoke Methods$d.DayOfWeek$d.AddDays(-30)Access Statics[DateTime]::Now[DateTime]::IsLeapYear(2008) Scripting with .NETAllows admins to easily access and leverage a huge API set because of scriptability, utilities and formatting
  • 18.
  • 19.
    Access existing instrumentationBindto COM objects$fso = New-Object -ComObjectScripting.FileSystemObject$m = [System.Runtime.InteropServices.Marshal]$word = $m::GetActiveObject("Word.Application") Invoke methods/access properties$fso.GetDrive(“C:”)$fso.VolumeName = “System Drive”Manipulate and format resultsDefine and import custom formatingUpdate-FormatData Office.Word.Format.ps1xml$word.RecentFiles | Sort name | Format-Table Scripting with COMAllows more simpler/more powerful COM scripts because of utilities and formatting
  • 20.
    PowerShell provides nativeWMI supportGet-WmiObjectAllows for inspection of WMI namespaceGet-WmiObject –list [-Namespace xx]Get-WmiObject –Class xx –Namespace xx –Property xxx – Filter xxx –ComputerName xxx –Credential xxxNative language support[WMI] “\\JPSDESK10\root\cimv2:Win32_Process.Handle="0“[WMICLASS] "ROOT\cimv2:WIN32_PROCESS"[WMISEARCHER]"select * from Win32_process WHERE Name = 'calc.exe'"Scripting with WMI
  • 21.
  • 22.
    PowerShell provides nativeXML support[XML]”<root>
. </root>”Projects a “data-view” of XML Scripting with XML
  • 23.
  • 24.
    Community ResourcesNewsgroup: Microsoft.Public.Windows.PowerShellTeam blog: http://blogs.msdn.com/PowerShell/PowerShell Community: http://www.PowershellCommunity.OrgCommunity Script Repo http://www.poshcode.orgChannel 9 http://channel9.msdn.com/tags/PowerShellWikihttp://channel9.msdn.com/wiki/default.aspx/Channel9.WindowsPowerShellWikiScript Center: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspxCodePlex:http://codeplex.com/Project/ProjectDirectory.aspx?TagName=powershellMany excellent booksManning Press book by PowerShell Dev Lead Bruce Payette: PowerShell in Action http://manning.com/powershell/O’Reilly book by PowerShell Dev Lee Holmes – Windows PowerShell Cookbookhttp://www.oreilly.com/catalog/9780596528492/index.htmlSession Demos for Introduction To Powershell
  • 25.

Editor's Notes

  • #2 This template can be used as a starter file for presenting training materials in a group setting.SectionsRight-click on a slide to add sections. Sections can help to organize your slides or facilitate collaboration between multiple authors.NotesUse the Notes section for delivery notes or to provide additional details for the audience. View these notes in Presentation View during your presentation. Keep in mind the font size (important for accessibility, visibility, videotaping, and online production)Coordinated colors Pay particular attention to the graphs, charts, and text boxes.Consider that attendees will print in black and white or grayscale. Run a test print to make sure your colors work when printed in pure black and white and grayscale.Graphics, tables, and graphsKeep it simple: If possible, use consistent, non-distracting styles and colors.Label all graphs and tables.