<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Managing Your Scripts - Directory Structure in VMware PowerCLI Documents</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/Managing-Your-Scripts-Directory-Structure/ta-p/2775468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Script management can be a daunting task after some time, even for a small environment.&amp;nbsp; One of my initial responsibilities in my new role is to assist in automation and scripting in one of the largest environments I'm likely to ever encounter.&amp;nbsp; We're talking 1000+ hosts and thousands of VMs.&amp;nbsp; An environment of that size demands some serious scripting and I'm extremely excited about the opportunity to both flex my PowerCLI muscles as well as strengthen my chops tremendously.&amp;nbsp; On top of that I was going to be working with a very talented guy who already had his previous work.&amp;nbsp; This might pose some headache.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;To the Expert!&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;I was fortunate enough to have a conversation with Hal Rottenberg recently about our challenges and he provided quite a few suggestions that we're looking to implement.&amp;nbsp; I will only elaborate on the things as we implement but here are the tips he gave me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Tips from Hal Rottenberg&lt;/P&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Common Naming - Name using&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PowerShell Verb-Noun nomenclature&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Centralize Functions and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Snippets - Keep functions in files on central location so you can quickly&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reference them from your scripts without having to include them in the&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script itself.&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Get-Help aware - make&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; functions so that you can access help from the Get-Help command.&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="a"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;&lt;A href="http://blogs.technet.com/b/heyscriptingguy/archive/2010/01/07/hey-scripting-guy-january-7-2010.aspx"&gt;http://blogs.technet.com/b/heyscriptingguy/archive/2010/01/07/hey-scripting-guy-january-7-2010.aspx&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="a"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;&lt;A href="http://powershell.com/cs/media/p/9345.aspx"&gt;http://powershell.com/cs/media/p/9345.aspx&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Try Version control -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subversion&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="a"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;&lt;A href="http://tortoisesvn.net/"&gt;http://tortoisesvn.net/&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="a"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;&lt;A href="http://subversion.tigris.org/"&gt;http://subversion.tigris.org/&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Thanks Hal! &lt;BR /&gt; Twitter: &lt;A href="https://twitter.com/#%21/halr9000"&gt;@halr9000&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Blog: &lt;A href="http://halr9000.com/"&gt;http://halr9000.com&lt;/A&gt;&lt;BR /&gt; Buy his book!&amp;nbsp; (&lt;A href="http://www.amazon.com/gp/product/0982131402?ie=UTF8&amp;amp;tag=techprosaic-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0982131402"&gt;Amazon&lt;/A&gt; | &lt;A href="http://www.sapien.com/books/Managing-VMWare"&gt;Sapien&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Over the coming months/years I hope to share as much of the work that I've been doing with my coworker Jade Lester as we are able.&amp;nbsp; I want it to be known that much of what I post is work that we have worked on together with varying levels of contribution from each of us per script.&amp;nbsp; Now that that is out of the way let's get back to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Our Challenges and Goals&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;The first challenge I saw was how to combine the efforts that Jade and I had up to the point where we started working together.&amp;nbsp; Being PowerCLI guys it was easy to follow what the other was doing but our organization was a bit different.&amp;nbsp; He organized based on target (VM, VC, Host) while I organized based on function (Reporting, Maintenance, Implementation).&amp;nbsp; Both methods have strong arguments and it's impossible to say who is right or wrong.&amp;nbsp; What to do then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Some of Our Goals&lt;/P&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Create central repository for&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scripts&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Create guidelines for script&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; names using Target-Verb-Noun structure (i.e. vCenter-Get-Hostlist,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ESX-Get-ActiveHBAs)&lt;/LI&gt;&lt;/OL&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Create consistent structure&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for scripts [headers, formatting, variables, functions]&lt;/LI&gt;&lt;/OL&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Create central repository of&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; functions and snippets for rapid scripting.&amp;nbsp; &lt;/LI&gt;&lt;/OL&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Identify most common scripts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and convert to new structure.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Isolate possible functions and snippets and make available&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; accordingly.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Our Results - So Far&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;This is a work in progress but here's what we came up with so far.&amp;nbsp; Comments and suggestions welcome:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;===========================================================&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Two primary parent directories&lt;/P&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;/Scripts_CRs&amp;nbsp; | Location for scripts used for specific&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Change Requests.&amp;nbsp; Subdirectories&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; should be CR#.&amp;nbsp; This location&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intended for all users based on their CRs.&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;/Scripts_PowerCLI | Default&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Script repository.&amp;nbsp; This location&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intended for script developers.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;----Subdirectories for Z:\Private\Scripts_CRs&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\CR#######&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\CR#######&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;----Subdirectories for Z:\Scripts_PowerCLI&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\CRs &lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Location of scripts in&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; development for CRs.&amp;nbsp; All files&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; should include CR name.&amp;nbsp; Any files&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; not including CR will be deleted periodically.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Downloads&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Repository of scripts found&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; online - Add note on location script came from but do not change original&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Functions&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Repository for functions to&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; be used by other scripts&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Implementation&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt; Assist in implementation/Provisioning&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tasks&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Import&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Location of CSV, TXT, and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Credential files to be imported into scripts&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Maintenance&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Perform Maintenance tasks -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Update tools, config changes, change resource reservations, file/config&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; backups&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Reporting&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Reports on environment -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Connected devices, Resource reservations, WWNs&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Snippets&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Location for code snippets&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and reusable code that does not work as functions&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Team&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Scratch Directory for&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scripts in progress.&amp;nbsp; May want use&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usernames as subdirectory names.&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Team\Jade&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Team\Josh&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Troubleshooting&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Scripts for identifying and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; resolving issues.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;=============================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;We both liked being able to separate the scripts based on their target so several of the directories will include subdirectories.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Host_Specific&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Scripts that target ESX(i)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hosts &lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Ex. Network Configs, NTP&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Reports&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Placed here so that any&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reporting can be placed quickly in similar working directory&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\vCenter_Specific&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Scripts that target vCenter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Server or containers&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Ex. Cluster or Resource Pool&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; info&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\VM_Specific&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Scripts that target Virtual&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Machines&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Ex. Update-Tools,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reservations&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;==============================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Make it Happen, Cap'n!&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Right now we have code all over the place.&amp;nbsp; We each have scripts on our laptops.&amp;nbsp; I have scripts on flash drives.&amp;nbsp; He has scripts on jump servers.&amp;nbsp; I have scripts on jump servers.&amp;nbsp; He has scripts in his head and I'm wondering how he can run those.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;We both recognize that having stuff local makes sense for offline work, rapid prototyping, and testing things out in a safe environment.&amp;nbsp; The difference is now as we start needing code it is time to polish it up and place it in the right directory.&amp;nbsp; This is similar to the method my wife intends on cleaning up our kitchen drawers.&amp;nbsp; Put everything in a big box.&amp;nbsp; Pull it out as you need it and after 3-6 months you're likely using everything you'll need.&amp;nbsp; It may take a while to find it but you KNOW it's in the box if it's not in the drawer it's supposed to be in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Work in this directory structure has already begun and is proving fruitful.&amp;nbsp; I have already started gathering various code Snippets that we use regularly and placed them in dedicated files.&amp;nbsp; Just 20 minutes after adding a couple I was asked for a snippet.&amp;nbsp; I quickly pulled up the code from the snippets directory and was able to give him what he needed right away. We knew then we were off to a good start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you have found this useful.&amp;nbsp; Feedback from your experience and methods are definitely appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jul 2011 03:43:17 GMT</pubDate>
    <dc:creator>aerodevil</dc:creator>
    <dc:date>2011-07-08T03:43:17Z</dc:date>
    <item>
      <title>Managing Your Scripts - Directory Structure</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/Managing-Your-Scripts-Directory-Structure/ta-p/2775468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Script management can be a daunting task after some time, even for a small environment.&amp;nbsp; One of my initial responsibilities in my new role is to assist in automation and scripting in one of the largest environments I'm likely to ever encounter.&amp;nbsp; We're talking 1000+ hosts and thousands of VMs.&amp;nbsp; An environment of that size demands some serious scripting and I'm extremely excited about the opportunity to both flex my PowerCLI muscles as well as strengthen my chops tremendously.&amp;nbsp; On top of that I was going to be working with a very talented guy who already had his previous work.&amp;nbsp; This might pose some headache.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;To the Expert!&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;I was fortunate enough to have a conversation with Hal Rottenberg recently about our challenges and he provided quite a few suggestions that we're looking to implement.&amp;nbsp; I will only elaborate on the things as we implement but here are the tips he gave me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Tips from Hal Rottenberg&lt;/P&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Common Naming - Name using&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PowerShell Verb-Noun nomenclature&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Centralize Functions and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Snippets - Keep functions in files on central location so you can quickly&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reference them from your scripts without having to include them in the&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script itself.&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Get-Help aware - make&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; functions so that you can access help from the Get-Help command.&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="a"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;&lt;A href="http://blogs.technet.com/b/heyscriptingguy/archive/2010/01/07/hey-scripting-guy-january-7-2010.aspx"&gt;http://blogs.technet.com/b/heyscriptingguy/archive/2010/01/07/hey-scripting-guy-january-7-2010.aspx&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="a"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;&lt;A href="http://powershell.com/cs/media/p/9345.aspx"&gt;http://powershell.com/cs/media/p/9345.aspx&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Try Version control -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subversion&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="a"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;&lt;A href="http://tortoisesvn.net/"&gt;http://tortoisesvn.net/&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="a"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;&lt;A href="http://subversion.tigris.org/"&gt;http://subversion.tigris.org/&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Thanks Hal! &lt;BR /&gt; Twitter: &lt;A href="https://twitter.com/#%21/halr9000"&gt;@halr9000&lt;/A&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Blog: &lt;A href="http://halr9000.com/"&gt;http://halr9000.com&lt;/A&gt;&lt;BR /&gt; Buy his book!&amp;nbsp; (&lt;A href="http://www.amazon.com/gp/product/0982131402?ie=UTF8&amp;amp;tag=techprosaic-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0982131402"&gt;Amazon&lt;/A&gt; | &lt;A href="http://www.sapien.com/books/Managing-VMWare"&gt;Sapien&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Over the coming months/years I hope to share as much of the work that I've been doing with my coworker Jade Lester as we are able.&amp;nbsp; I want it to be known that much of what I post is work that we have worked on together with varying levels of contribution from each of us per script.&amp;nbsp; Now that that is out of the way let's get back to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Our Challenges and Goals&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;The first challenge I saw was how to combine the efforts that Jade and I had up to the point where we started working together.&amp;nbsp; Being PowerCLI guys it was easy to follow what the other was doing but our organization was a bit different.&amp;nbsp; He organized based on target (VM, VC, Host) while I organized based on function (Reporting, Maintenance, Implementation).&amp;nbsp; Both methods have strong arguments and it's impossible to say who is right or wrong.&amp;nbsp; What to do then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Some of Our Goals&lt;/P&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Create central repository for&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scripts&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Create guidelines for script&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; names using Target-Verb-Noun structure (i.e. vCenter-Get-Hostlist,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ESX-Get-ActiveHBAs)&lt;/LI&gt;&lt;/OL&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Create consistent structure&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for scripts [headers, formatting, variables, functions]&lt;/LI&gt;&lt;/OL&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Create central repository of&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; functions and snippets for rapid scripting.&amp;nbsp; &lt;/LI&gt;&lt;/OL&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Identify most common scripts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and convert to new structure.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Isolate possible functions and snippets and make available&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; accordingly.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Our Results - So Far&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;This is a work in progress but here's what we came up with so far.&amp;nbsp; Comments and suggestions welcome:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;===========================================================&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Two primary parent directories&lt;/P&gt;&lt;OL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11pt; font-weight: normal; font-style: normal;" type="1"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;/Scripts_CRs&amp;nbsp; | Location for scripts used for specific&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Change Requests.&amp;nbsp; Subdirectories&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; should be CR#.&amp;nbsp; This location&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intended for all users based on their CRs.&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;/Scripts_PowerCLI | Default&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Script repository.&amp;nbsp; This location&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; intended for script developers.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;----Subdirectories for Z:\Private\Scripts_CRs&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\CR#######&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\CR#######&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;----Subdirectories for Z:\Scripts_PowerCLI&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\CRs &lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Location of scripts in&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; development for CRs.&amp;nbsp; All files&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; should include CR name.&amp;nbsp; Any files&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; not including CR will be deleted periodically.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Downloads&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Repository of scripts found&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; online - Add note on location script came from but do not change original&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Functions&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Repository for functions to&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; be used by other scripts&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Implementation&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt; Assist in implementation/Provisioning&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tasks&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Import&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Location of CSV, TXT, and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Credential files to be imported into scripts&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Maintenance&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Perform Maintenance tasks -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Update tools, config changes, change resource reservations, file/config&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; backups&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Reporting&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Reports on environment -&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Connected devices, Resource reservations, WWNs&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Snippets&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Location for code snippets&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and reusable code that does not work as functions&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Team&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Scratch Directory for&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scripts in progress.&amp;nbsp; May want use&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; usernames as subdirectory names.&lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Team\Jade&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Team\Josh&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Troubleshooting&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Scripts for identifying and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; resolving issues.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;=============================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;We both liked being able to separate the scripts based on their target so several of the directories will include subdirectories.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Host_Specific&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Scripts that target ESX(i)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hosts &lt;/LI&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Ex. Network Configs, NTP&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\Reports&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Placed here so that any&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; reporting can be placed quickly in similar working directory&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\vCenter_Specific&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Scripts that target vCenter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Server or containers&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Ex. Cluster or Resource Pool&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; info&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="disc"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;\VM_Specific&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Scripts that target Virtual&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Machines&lt;/LI&gt;&lt;/UL&gt;&lt;UL style="margin-left: 0.375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in;" type="circle"&gt;&lt;LI style="margin-top: 0pt; margin-bottom: 0pt; vertical-align: middle;"&gt;Ex. Update-Tools,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reservations&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;==============================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Make it Happen, Cap'n!&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Right now we have code all over the place.&amp;nbsp; We each have scripts on our laptops.&amp;nbsp; I have scripts on flash drives.&amp;nbsp; He has scripts on jump servers.&amp;nbsp; I have scripts on jump servers.&amp;nbsp; He has scripts in his head and I'm wondering how he can run those.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;We both recognize that having stuff local makes sense for offline work, rapid prototyping, and testing things out in a safe environment.&amp;nbsp; The difference is now as we start needing code it is time to polish it up and place it in the right directory.&amp;nbsp; This is similar to the method my wife intends on cleaning up our kitchen drawers.&amp;nbsp; Put everything in a big box.&amp;nbsp; Pull it out as you need it and after 3-6 months you're likely using everything you'll need.&amp;nbsp; It may take a while to find it but you KNOW it's in the box if it's not in the drawer it's supposed to be in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-family: Calibri; font-size: 11pt;"&gt;Work in this directory structure has already begun and is proving fruitful.&amp;nbsp; I have already started gathering various code Snippets that we use regularly and placed them in dedicated files.&amp;nbsp; Just 20 minutes after adding a couple I was asked for a snippet.&amp;nbsp; I quickly pulled up the code from the snippets directory and was able to give him what he needed right away. We knew then we were off to a good start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you have found this useful.&amp;nbsp; Feedback from your experience and methods are definitely appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2011 03:43:17 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Documents/Managing-Your-Scripts-Directory-Structure/ta-p/2775468</guid>
      <dc:creator>aerodevil</dc:creator>
      <dc:date>2011-07-08T03:43:17Z</dc:date>
    </item>
  </channel>
</rss>

