Upgrade to Pro — share decks privately, control downloads, hide ads and more …

VMworld 2018 - Documenting Your Virtual Infrastructure with PowerShell & PowerCLI

VMworld 2018 - Documenting Your Virtual Infrastructure with PowerShell & PowerCLI

Do you often find yourself writing "as built" documentation for various solutions, or simply looking for an automated way to keep your datacenter environment documentation up to date? Learn how to easily automate the creation of professional, styled, environment configuration documents by using basic PowerShell knowledge. The framework being demonstrated in this session makes it simple to use and contribute reports for various VMware components and partner solutions.

Tim Carman

August 30, 2018
Tweet

More Decks by Tim Carman

Other Decks in Programming

Transcript

  1. Documenting Your Virtual Infrastructure with PowerShell & PowerCLI Tim Carman

    | @tpcarman Matt Allford | @mattallford #VMworld #VIN3327BU VIN3327BU
  2. 3 Confidential │ ©2018 VMware, Inc. Introductions Who Are We?

    Tim Carman Thomas Duryea Logicalis Senior Consulting Engineer VMware vExpert Twitter@tpcarman Blog timcarman.net GitHubgithub.com/tpcarman
  3. 4 Confidential │ ©2018 VMware, Inc. Introductions Who Are We?

    Matt Allford Parallo Platform Practice Lead VMware vExpert Twitter@mattallford Blog virtualtassie.com GitHubgithub.com/mattallford
  4. Agenda 5 Confidential │ ©2018 VMware, Inc. Problem & Project

    Statements What, Why & Challenges Project Concepts & Toolsets Inspiration, Concepts & Toolsets Project Announcement As Built Report Demo Live! Contributing How You Can Help Q&A
  5. 6 Confidential │ ©2018 VMware, Inc. Problem Statement The constant

    need to deliver detailed, consistent up to date as built documentation for multiple technologies
  6. 7 Confidential │ ©2018 VMware, Inc. Problem Statement Common Challenges

    • Missing, incomplete or out dated documentation • Lack of comprehensive reporting tools • Reporting tools are inconsistent in output, style and formatting • Manually generating documentation is time consuming and error prone • Every environment is different
  7. 8 Confidential │ ©2018 VMware, Inc. Project Statement Easily produce

    as built reports which are clear and consistent, across multiple vendors & technologies
  8. 9 Confidential │ ©2018 VMware, Inc. Project Statement Project Objectives

    Simple Build, Maintain, Deploy & Use Consistent Design, Toolset, Styles, Formats Modular One to Many Vendors, Technologies Granular Summarised to Comprehensive Repeatable Automated, Support Multiple Systems
  9. 11 Confidential │ ©2018 VMware, Inc. Advantages • Simple to

    use • Comprehensive level of detail Advantages • Comprehensive set of health checks • Modular design (plug-ins) • Supports multiple styles Advantages • Comprehensive configuration report • 3 levels of detail granularity • Supports multiple output formats (DOC, HTML) Project Concepts Inspiration & Concepts RV Tools vCheck Jake Rutski’s vCenter Inventory Script Disadvantages • Only exports to Excel • Requires installation of 3rd party application • Only supports vCenter Server Disadvantages • Only exports to HTML • Does not provide detailed configuration information • Does not support multiple environments Disadvantages • Requires MS Word to be installed • Only supports vCenter Server • Script complexity
  10. 13 Confidential │ ©2018 VMware, Inc. Project Toolsets Toolset Requirements

    • Widely available & adopted by IT professionals • Widely available, adopted & supported by IT vendors • Simple to install, update & use • Skill levels from Beginner to Expert • Support for multiple Operating Systems (Windows, MacOS, Linux)
  11. 16 Confidential │ ©2018 VMware, Inc. Project Toolsets PScribo PowerShell

    Module PScribo (pronounced 'skree-bo') is an open source project for Windows PowerShell, which can be used to create a document in a standardised format. The document can be exported into various formats by "plugins", for example, Text, HTML, XML and/or Microsoft Word format.
  12. 17 Confidential │ ©2018 VMware, Inc. Project Toolsets PScribo PowerShell

    Module Twitter @iainbrighton PowerShell Gallery Install-Module PScribo GitHub github.com/iainbrighton/PScribo YouTube Demo youtu.be/pNIC70bjBZE
  13. 20 Confidential │ ©2018 VMware, Inc. As Built Report Features

    Multiple Formats DOC, HTML, XML, Text Styles Support Custom Styling Health Checks Highlight Configuration Issues Timestamps Append Date & Time Email Reports Deliver Reports via Email
  14. 21 Confidential │ ©2018 VMware, Inc. As Built Report Folders

    & Files • AsBuiltConfig.json (Default Configuration) • Created on first run if configuration is not specified • Option to save & use individual configuration files • Configuration for New-AsBuiltReport.ps1 • New-AsBuiltReport.ps1 • Pulls information from AsBuiltConfig.json • Calls .ps1 scripts from Reports sub-folder • Calls .ps1 scripts from Styles folder • Reports Folder • Each sub-folder represents a report type • Each sub-folder contains .json configuration file • Each sub-folder contains .ps1 script file • Styles Folder • By default, each report uses a style specific to each vendor • Create custom styles to align with your own branding
  15. 24 Confidential │ ©2018 VMware, Inc. vSphere Report Features Multiple

    Targets Multi vCenter & ESXi Host Support Multiple Sections vCenter, Resource Pools, Clusters, Hosts, Network, vSAN, Datastores, Datastore Clusters, VMs, Update Manager, NSX, SRM* (future release) 6 Detail Levels Detail configurable by section Disabled, Summary, Informative, Detailed, Adv Detailed, Comprehensive Health Checks Toggle health checks on/off individually
  16. 25 Confidential │ ©2018 VMware, Inc. Setting InfoLevel Description 0

    Disabled Does not collect or display any information. 1 Summary Provides summarised information for a collection of objects 2 Informative Provides condensed, detailed information for a collection of objects 3 Detailed Provides detailed information for individual objects 4 Adv Detailed Provides detailed information for individual objects, as well as information for associated objects (Hosts, Clusters, Datastores, VMs etc) 5 Comprehensive Provides comprehensive information for individual objects, such as advanced configuration settings vSphere Report InfoLevels
  17. 30 Confidential │ ©2018 VMware, Inc. As Built Report Custom

    Styling • Use existing style sheets as templates • Set document defaults such as page orientation, fonts & colours • Insert a cover page and personalise it with headings • Insert additional sections, such as company & document information • Customise table formatting with borders, colours, highlight cells/rows
  18. 32 Confidential │ ©2018 VMware, Inc. Contributing How You Can

    Help Run Run the reports Raise Raise issues or provide feedback via Slack Resolve Resolve issues Request Request new features or report Create Create new features or report Share Share with colleagues, VMUG, Social Media #AsBuiltReport
  19. 34 Confidential │ ©2018 VMware, Inc. Summary Links & Information

    Blog timcarman.net/As-Built-Report GitHub github.com/tpcarman/As-Built-Report Slack VMware {code} & PowerShell