update
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<#
|
||||
.Synopsis
|
||||
Retreives list of all VMs, and lists their corresponding vSphere Replication RPO settings, if applicable.
|
||||
.DESCRIPTION
|
||||
Long description
|
||||
.EXAMPLE
|
||||
Get-ITDVMwareRPO
|
||||
#>
|
||||
function Get-ITDVMwareVMRPO {
|
||||
[CmdletBinding()]
|
||||
Param
|
||||
(
|
||||
)
|
||||
|
||||
Begin {
|
||||
|
||||
}
|
||||
Process {
|
||||
$VMs = Get-VM -Name itddohslimsp2.nd.gov | Where-Object PowerState -EQ PoweredOn
|
||||
$result = @()
|
||||
ForEach ($VM in $VMs) {
|
||||
Write-Verbose $VM.Name
|
||||
$RPOMinutes = ($VM.ExtensionData.Config.extraconfig | Where-Object key -EQ hbr_filter.rpo).Value
|
||||
$DatastoreTag = ($VM | Get-TagAssignment -Category "VR Datastores").Tag.Name
|
||||
$Cluster = ($VM | Get-Cluster).Name
|
||||
|
||||
$obj = [PSCustomObject]@{
|
||||
'Name' = $VM.Name;
|
||||
'Cluster' = $Cluster;
|
||||
'Datastore' = $DatastoreTag;
|
||||
'RPO' = $RPOMinutes;
|
||||
}
|
||||
Write-Warning $obj
|
||||
$result += $obj
|
||||
}
|
||||
}
|
||||
End {
|
||||
Write-Output $result
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user