License PowerCLI-Examples-Scripts repository under BSD-2 Clause (#462)

As part of the VMware open source program, we have to update this repository with the correct license and copyright information.
We add the BSD-2 Clause License for this repository.
We mark all source code provided by VMware with the Copyright notice under BSD-2 Clause license.

* Update repository license to BSD 2-Clause License

* Update Copyright
This commit is contained in:
dmilov
2021-06-07 09:58:47 +03:00
committed by GitHub
parent db68f439a3
commit fb641c8a1c
110 changed files with 1066 additions and 790 deletions

View File

@@ -1,16 +1,16 @@
function Get-VMmaxIOPS {
<#
<#
.NOTES
===========================================================================
Created by: Markus Kraus
Twitter: @VMarkus_K
Private Blog: mycloudrevolution.com
===========================================================================
Changelog:
2016.10 ver 1.0 Base Release
Changelog:
2016.10 ver 1.0 Base Release
2016.11 ver 1.1 Added vSphere 6.5 Support, New Counters, More Error Handling
===========================================================================
External Code Sources:
External Code Sources:
http://www.lucd.info/2011/04/22/get-the-maximum-iops/
https://communities.vmware.com/thread/485386
===========================================================================
@@ -24,7 +24,7 @@ function Get-VMmaxIOPS {
===========================================================================
.DESCRIPTION
This Function will Create a VM Disk IOPS Report
This Function will Create a VM Disk IOPS Report
.Example
Get-VM TST* | Get-VMmaxIOPS -Minutes 60 | FT -Autosize
@@ -34,17 +34,17 @@ function Get-VMmaxIOPS {
Get-VMmaxIOPS -VMs $SampleVMs -Minutes 60
.PARAMETER VMs
Specify the VMs
Specify the VMs
.PARAMETER Minutes
Specify the Minutes to report (10080 is one Week)
Specify the Minutes to report (10080 is one Week)
#Requires PS -Version 4.0
#Requires -Modules VMware.VimAutomation.Core, @{ModuleName="VMware.VimAutomation.Core";ModuleVersion="6.3.0.0"}
#>
[CmdletBinding()]
param(
param(
[Parameter(Mandatory=$true, ValueFromPipeline=$True, Position=0)]
[ValidateNotNullorEmpty()]
[VMware.VimAutomation.ViCore.Impl.V1.Inventory.InventoryItemImpl[]] $VMs,
@@ -55,7 +55,7 @@ param(
Begin {
# none
}
Process {
Process {
if ($_.PowerState -eq "PoweredOn") {
#region: Global Definitions
[int]$TimeRange = "-" + $Minutes
@@ -82,7 +82,7 @@ Process {
#region: Creating Reports
Write-Verbose "$(Get-Date -Format G) Create Report..."
$reportPerf = @()
$reportPerf = @()
$reportPerf = $stats | Group-Object -Property {$_.Entity.Name},Instance | %{
New-Object PSObject -Property @{
VM = $_.Values[0]
@@ -98,7 +98,7 @@ Process {
}
Write-Verbose "$(Get-Date -Format G) Create Report completed"
#endregion
}
Else {
@@ -108,7 +108,7 @@ Process {
}
End {
# none
# none
}
}