Compare commits
14 Commits
Reorg
...
LucD-remar
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e5f5bccee | ||
|
|
5f80511cff | ||
|
|
96d2557ea6 | ||
|
|
99673b1dfa | ||
|
|
3403db0ead | ||
|
|
2f595f086d | ||
|
|
e7c968d32b | ||
|
|
8469b3a285 | ||
|
|
456bd28b45 | ||
|
|
32096f6e02 | ||
|
|
c8b2607b94 | ||
|
|
eae378822b | ||
|
|
4464bf001b | ||
|
|
06d3eed37d |
203
README.md
203
README.md
@@ -1,10 +1,14 @@
|
|||||||
# PowerCLI Community Repository
|
# PowerCLI Community Repository
|
||||||
## Principles of Operations
|
## Principles of Operations
|
||||||
|
[//]: # (LucD: Did you run this through Legal? Knowing the US habit of suing I want to make sure that every submitter's a** is covered.)
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
* [Abstract](https://github.com/vmware/PowerCLI-Example-Scripts#abstract)
|
* [Abstract](https://github.com/vmware/PowerCLI-Example-Scripts#abstract)
|
||||||
* [Table of Contents](https://github.com/vmware/PowerCLI-Example-Scripts#table-of-contents)
|
* [Table of Contents](https://github.com/vmware/PowerCLI-Example-Scripts#table-of-contents)
|
||||||
* [Content Restrictions](https://github.com/vmware/PowerCLI-Example-Scripts#content-restrictions)
|
* [Content Restrictions](https://github.com/vmware/PowerCLI-Example-Scripts#content-restrictions)
|
||||||
* [Type of Content](https://github.com/vmware/PowerCLI-Example-Scripts#type-of-content)
|
* [Type of Content](https://github.com/vmware/PowerCLI-Example-Scripts#type-of-content)
|
||||||
|
* [Getting Started](https://github.com/vmware/PowerCLI-Example-Scripts#getting-started)
|
||||||
|
* [Accessing the Repository](https://github.com/vmware/PowerCLI-Example-Scripts#accessing-the-repository)
|
||||||
|
* [Adding Resources](https://github.com/vmware/PowerCLI-Example-Scripts#adding-resources)
|
||||||
* [Meta Information](https://github.com/vmware/PowerCLI-Example-Scripts#meta-information)
|
* [Meta Information](https://github.com/vmware/PowerCLI-Example-Scripts#meta-information)
|
||||||
* [Required Information](https://github.com/vmware/PowerCLI-Example-Scripts#required-information)
|
* [Required Information](https://github.com/vmware/PowerCLI-Example-Scripts#required-information)
|
||||||
* [Suggested Information](https://github.com/vmware/PowerCLI-Example-Scripts#suggested-information)
|
* [Suggested Information](https://github.com/vmware/PowerCLI-Example-Scripts#suggested-information)
|
||||||
@@ -19,9 +23,6 @@
|
|||||||
* [Maintenance Ownership](https://github.com/vmware/PowerCLI-Example-Scripts#maintenance-ownership)
|
* [Maintenance Ownership](https://github.com/vmware/PowerCLI-Example-Scripts#maintenance-ownership)
|
||||||
* [Filing issues](https://github.com/vmware/PowerCLI-Example-Scripts#filing-isssues)
|
* [Filing issues](https://github.com/vmware/PowerCLI-Example-Scripts#filing-isssues)
|
||||||
* [Resolving issues](https://github.com/vmware/PowerCLI-Example-Scripts#resolving-issues)
|
* [Resolving issues](https://github.com/vmware/PowerCLI-Example-Scripts#resolving-issues)
|
||||||
* [Getting Started](https://github.com/vmware/PowerCLI-Example-Scripts#getting-started)
|
|
||||||
* [Accessing the Repository](https://github.com/vmware/PowerCLI-Example-Scripts#accessing-the-repository)
|
|
||||||
* [Adding Resources](https://github.com/vmware/PowerCLI-Example-Scripts#adding-resources)
|
|
||||||
* [Additional Resources](https://github.com/vmware/PowerCLI-Example-Scripts#additional-resources)
|
* [Additional Resources](https://github.com/vmware/PowerCLI-Example-Scripts#additional-resources)
|
||||||
* [Discussions](https://github.com/vmware/PowerCLI-Example-Scripts#discussions)
|
* [Discussions](https://github.com/vmware/PowerCLI-Example-Scripts#discussions)
|
||||||
* [VMware Sample Exchange](https://github.com/vmware/PowerCLI-Example-Scripts#vmware-sample-exchange)
|
* [VMware Sample Exchange](https://github.com/vmware/PowerCLI-Example-Scripts#vmware-sample-exchange)
|
||||||
@@ -41,79 +42,6 @@ The repository has been provided to allow the community to share resources that
|
|||||||
* Pester Tests
|
* Pester Tests
|
||||||
* Tools built with PowerShell
|
* Tools built with PowerShell
|
||||||
|
|
||||||
## Meta Information
|
|
||||||
This section will provide guidance on information which should be included with each submitted PowerCLI resource. Information listed in the Suggested Information will not be required for commit of a pull request to the repo, but will certainly increase ease of use for users of the resource.
|
|
||||||
### Required Information
|
|
||||||
The following information must be included with each submitted scripting resource. Please include the information in the appropriate location based upon the submitted scripting resource.
|
|
||||||
|
|
||||||
* Author Name
|
|
||||||
* This can include full name, Twitter profile, or other identifiable piece of information that would allow interested parties to contact author with questions.
|
|
||||||
* Date
|
|
||||||
* Date the resource was written
|
|
||||||
* Minimal/High Level Description
|
|
||||||
* What does the resource do
|
|
||||||
* Any KNOWN limitations or dependencies
|
|
||||||
* vSphere version, required modules, etc.
|
|
||||||
|
|
||||||
#### Note Placement Examples:
|
|
||||||
Script: Top few lines
|
|
||||||
Module: Module manifest
|
|
||||||
|
|
||||||
#### Script Note Example:
|
|
||||||
`<#`
|
|
||||||
`Script name: script_name.ps1`
|
|
||||||
`Created on: 07/07/2016`
|
|
||||||
`Author: Author Name, @TwitterHandle`
|
|
||||||
`Description: The purpose of the script is to …`
|
|
||||||
`Dependencies: None known`
|
|
||||||
`#>`
|
|
||||||
|
|
||||||
### Suggested Information
|
|
||||||
The following information should be included when possible. Inclusion of information provides valuable information to consumers of the resource.
|
|
||||||
* vSphere version against which the script was developed/tested
|
|
||||||
* PowerCLI build against which the script was developed/tested
|
|
||||||
* PowerShell version against which the script was developed/tested
|
|
||||||
* OS platform version against which the script was tested/developed
|
|
||||||
* Keywords that make it easier to find a script, for example: VDS, health check
|
|
||||||
|
|
||||||
## Suggested Quality Management
|
|
||||||
This section describes guidelines put in place to maintain a standard of quality while also promoting broader contribution.
|
|
||||||
### General Best Practices
|
|
||||||
### Resource Naming
|
|
||||||
* Give the resource a name that is indicitive of the actions and/or results of its running
|
|
||||||
|
|
||||||
### Fault Handling
|
|
||||||
* Every submitted resource should include basic fault handling. One of many good write-ups can be found via Microsoft’s Hey, Scripting Guy! Blog: https://blogs.technet.microsoft.com/heyscriptingguy/2014/07/09/handling-errors-the-powershell-way/
|
|
||||||
|
|
||||||
### Alias Usage
|
|
||||||
* Avoid any alias usage within all submitted resources.
|
|
||||||
|
|
||||||
### Global Variable Usage
|
|
||||||
* Avoid changing any global variables
|
|
||||||
|
|
||||||
### Help Information
|
|
||||||
* All resources shall have inline documentation.
|
|
||||||
|
|
||||||
### Scripts
|
|
||||||
* The script should be easy to read and understand
|
|
||||||
* Place user-defined variables towards the top of the script
|
|
||||||
|
|
||||||
### Modules
|
|
||||||
* The module file, PSM1, should contain only functions. A module manifest file, PSD1, should also be created and included. A module formatting file (format.ps1xml) is desirable but not a requirement.
|
|
||||||
* Use only standard verbs
|
|
||||||
|
|
||||||
### Security
|
|
||||||
* Usage of PowerShell’s strict mode is preferred, but not required.
|
|
||||||
* Remove any information related to one’s own environment (examples: Passwords, DNS/IP Addresses, custom user credentials, etc)
|
|
||||||
|
|
||||||
## Resource Maintenance
|
|
||||||
### Maintenance Ownership
|
|
||||||
Ownership of any and all submitted resources are maintained by the submitter. This ownership also includes maintenance of any and all submitted resources.
|
|
||||||
### Filing Issues
|
|
||||||
Any bugs or other issues should be filed within GitHub by way of the repository’s Issue Tracker.
|
|
||||||
### Resolving Issues
|
|
||||||
Any community member can resolve issues within the repository, however only the owner or a board member can approve the update. Once approved, assuming the resolution involves a pull request, only a board member will be able to merge and close the request.
|
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
### Accessing the Repository
|
### Accessing the Repository
|
||||||
#### Downloading the Repository for Local Access
|
#### Downloading the Repository for Local Access
|
||||||
@@ -144,30 +72,135 @@ Any community member can resolve issues within the repository, however only the
|
|||||||
5. Click “Propose new file”
|
5. Click “Propose new file”
|
||||||
6. On the “Open a pull request” page, click “Create pull request”
|
6. On the “Open a pull request” page, click “Create pull request”
|
||||||
|
|
||||||
|
## Meta Information
|
||||||
|
This section will provide guidance on information which should be included with each submitted PowerCLI resource. Information listed in the Suggested Information will not be required for commit of a pull request to the repo, but will certainly increase ease of use for users of the resource.
|
||||||
|
### Required Information
|
||||||
|
The following information must be included with each submitted scripting resource. Please include the information in the appropriate location based upon the submitted scripting resource.
|
||||||
|
|
||||||
|
* Author Name
|
||||||
|
* This can include full name, Twitter profile, or other identifiable piece of information that would allow interested parties to contact author with questions.
|
||||||
|
[//]: # (LucD: Shouldn't we enforce that all question follow the Issues concept? Questions about a script might be useful for others.)
|
||||||
|
* Date
|
||||||
|
* Date the resource was written
|
||||||
|
* Minimal/High Level Description
|
||||||
|
* What does the resource do
|
||||||
|
* Any KNOWN limitations or dependencies
|
||||||
|
* vSphere version, required modules, etc.
|
||||||
|
[//]: # (LucD: Perhaps add a question to add additional "tested" versions/environments through the Issues concept. Original author(s) might not always have access.)
|
||||||
|
|
||||||
|
#### Note Placement Examples:
|
||||||
|
Script: Top few lines
|
||||||
|
Module: Module manifest
|
||||||
|
|
||||||
|
#### Required Script Note Example:
|
||||||
|
`<#`
|
||||||
|
`Script name: script_name.ps1`
|
||||||
|
`Created on: 07/07/2016`
|
||||||
|
`Author: Author Name, @TwitterHandle`
|
||||||
|
`Description: The purpose of the script is to …`
|
||||||
|
`Dependencies: None known`
|
||||||
|
`#>`
|
||||||
|
[//]: # (LucD: Why not go for the standard PS Help format as a requirement?)
|
||||||
|
[//]: # (LucD: What about a Disclaimer? Or is that covered by the License attached to the repository?)
|
||||||
|
### Suggested Information
|
||||||
|
The following information should be included when possible. Inclusion of information provides valuable information to consumers of the resource.
|
||||||
|
* vSphere version against which the script was developed/tested
|
||||||
|
* PowerCLI build against which the script was developed/tested
|
||||||
|
* PowerShell version against which the script was developed/tested
|
||||||
|
* OS platform version against which the script was tested/developed
|
||||||
|
* Keywords that make it easier to find a script, for example: VDS, health check
|
||||||
|
|
||||||
|
#### Suggested Script Note Example:
|
||||||
|
`<#`
|
||||||
|
`Script name: script_name.ps1`
|
||||||
|
`Created on: 07/07/2016`
|
||||||
|
`Author: Author Name, @TwitterHandle`
|
||||||
|
`Description: The purpose of the script is to …`
|
||||||
|
`Dependencies: None known`
|
||||||
|
|
||||||
|
`===Tested Against Environment====`
|
||||||
|
`vSphere Version: 6.0`
|
||||||
|
`PowerCLI Version: PowerCLI 6.3 R1`
|
||||||
|
`PowerShell Version: 5.0`
|
||||||
|
`OS Version: Windows 10`
|
||||||
|
`Keyword: VM`
|
||||||
|
`#>`
|
||||||
|
|
||||||
|
## Suggested Quality Management
|
||||||
|
This section describes guidelines put in place to maintain a standard of quality while also promoting broader contribution.
|
||||||
|
[//]: # (LucD: I'm missing the formatting of the code (capitalisation, indentation, aligned braces... Perhaps refer to the [The PowerShell Best Practices and Style Guide](https://github.com/PoshCode/PowerShellPracticeAndStyle))
|
||||||
|
### General Best Practices
|
||||||
|
### Resource Naming
|
||||||
|
* Give the resource a name that is indicative of the actions and/or results of its running
|
||||||
|
|
||||||
|
### Fault Handling
|
||||||
|
[//]: # (LucD: That article is a rather limited set of fault handling options. Shouldn't we add a snippet with some examples?)
|
||||||
|
* Read and apply the following basic fault handling where applicable: Microsoft’s Hey, Scripting Guy! Blog: https://blogs.technet.microsoft.com/heyscriptingguy/2014/07/09/handling-errors-the-powershell-way/
|
||||||
|
|
||||||
|
### Alias Usage
|
||||||
|
* Avoid any alias usage within all submitted resources.
|
||||||
|
|
||||||
|
### Global Variable Usage
|
||||||
|
* Avoid changing any global variables
|
||||||
|
|
||||||
|
### Help Information
|
||||||
|
* All resources should have inline documentation.
|
||||||
|
|
||||||
|
### Scripts
|
||||||
|
* The script should be easy to read and understand
|
||||||
|
* Place user-defined variables towards the top of the script
|
||||||
|
|
||||||
|
### Modules
|
||||||
|
* The module file, PSM1, should contain only functions. A module manifest file, PSD1, should also be created and included. A module formatting file (format.ps1xml) is desirable but not a requirement.
|
||||||
|
* Use only standard verbs
|
||||||
|
|
||||||
|
### Security
|
||||||
|
* Usage of PowerShell’s strict mode is preferred, but not required.
|
||||||
|
* Remove any information related to one’s own environment (examples: Passwords, DNS/IP Addresses, custom user credentials, etc)
|
||||||
|
|
||||||
|
## Resource Maintenance
|
||||||
|
### Maintenance Ownership
|
||||||
|
Ownership of any and all submitted resources are maintained by the submitter. This ownership also includes maintenance of any and all submitted resources.
|
||||||
|
[//]: # (LucD: This part is one of the reasons I asked about Legal and Disclaimers. Is Ownership the same as Liability?)
|
||||||
|
### Filing Issues
|
||||||
|
Any bugs or other issues should be filed within GitHub by way of the repository’s Issue Tracker.
|
||||||
|
### Resolving Issues
|
||||||
|
Any community member can resolve issues within the repository, however only the owner or a board member can approve the update. Once approved, assuming the resolution involves a pull request, only a board member will be able to merge and close the request.
|
||||||
|
|
||||||
## Additional Resources
|
## Additional Resources
|
||||||
### Discussions
|
### Discussions
|
||||||
Join in on the discussion within the VMware Code Slack team's PowerCLI channel: <https://code.vmware.com/slack/>
|
Join in on the discussion within the VMware Code Slack team's PowerCLI channel: <https://code.vmware.com/slack/>
|
||||||
|
[//]: # (LucD: I would suggest to start a dedicated Slack channel, for example "PowerCLI Repository". This to avoid having to look through all the PowerCLI clatter)
|
||||||
### VMware Sample Exchange
|
### VMware Sample Exchange
|
||||||
It is highly recommened to add any and all submitted resources to the VMware Sample Exchange: <https://developercenter.vmware.com/samples>
|
It is highly recommened to add any and all submitted resources to the VMware Sample Exchange: <https://developercenter.vmware.com/samples>
|
||||||
|
|
||||||
Sample Exchange can be allowed to access your GitHub resources, by way of a linking process, where they can be indexed and searched by the community. There are VMware social media accounts which will advertise resources posted to the site and there's no additional accounts needed, as the VMware Sample Exchange uses MyVMware credentials.
|
Sample Exchange can be allowed to access your GitHub resources, by way of a linking process, where they can be indexed and searched by the community. There are VMware social media accounts which will advertise resources posted to the site and there's no additional accounts needed, as the VMware Sample Exchange uses MyVMware credentials.
|
||||||
|
[//]: # (LucD: Will that be an automated process?)
|
||||||
|
|
||||||
## VMWARE TECHNOLOGY PREVIEW LICENSE AGREEMENT
|
## VMWARE TECHNOLOGY PREVIEW LICENSE AGREEMENT
|
||||||
The VMware Technnology Preview License Agreement: <https://github.com/vmware/PowerCLI-Example-Scripts/blob/master/LICENSE.md>
|
The VMware Technnology Preview License Agreement: <https://github.com/vmware/PowerCLI-Example-Scripts/blob/master/LICENSE.md>
|
||||||
|
[//]: # (LucD: This only protects VMware, not the submitters, as far as my legalese is correct)
|
||||||
# Repository Administrator Resources
|
# Repository Administrator Resources
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
* Board Members
|
* Board Members
|
||||||
* Approval of Additions
|
* Approval of Additions
|
||||||
|
|
||||||
## Board Members
|
## Board Members
|
||||||
* Josh Atwell
|
|
||||||
* Mathieu Buisson
|
Board members are volunteers from the PowerCLI community and VMware staff members, board members are not held responsible for any issues which may occur from running of scripts inside this repository.
|
||||||
* Luc Dekens
|
[//]: # (LucD: Again, I would like to have this checked by Legal. Especially for the submitter and the requirement to have a disclaimer in each script)
|
||||||
* Jonathan Medd
|
|
||||||
* Alan Renouf
|
Members:
|
||||||
* Kyle Ruddy
|
* Josh Atwell (Community Member)
|
||||||
* Rynardt Spies
|
* Mathieu Buisson (Community Member)
|
||||||
|
* Luc Dekens (Community Member)
|
||||||
|
* Jonathan Medd (Community Member)
|
||||||
|
* Alan Renouf (VMware)
|
||||||
|
* Kyle Ruddy (VMware)
|
||||||
|
* Rynardt Spies (Community Member)
|
||||||
|
|
||||||
## Approval of Additions
|
## Approval of Additions
|
||||||
Items added to the repository require 2 votes from the board members before being added to the repository. The approving members will have ideally downloaded and tested the item. When two “Approved for Merge” comments are added from board members, the pull can then be committed to the repository.
|
Items added to the repository, including items from the Board members, require 2 votes from the board members before being added to the repository. The approving members will have ideally downloaded and tested the item. When two “Approved for Merge” comments are added from board members, the pull can then be committed to the repository.
|
||||||
|
|
||||||
|
[//]: # (LucD: What about Removals? Could imagine a submitter wants his submission removed)
|
||||||
|
|
||||||
Reference in New Issue
Block a user