Initial Commit to Dedicated Repo

This commit is contained in:
Wes Carroll
2019-02-19 15:53:30 -05:00
parent e9773caa10
commit ae28fddec2
48 changed files with 5188 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
function Get-ZertoDatastore {
[cmdletbinding( DefaultParameterSetName = "main" )]
param(
[Parameter( ParameterSetName = "datastoreIdentifier" )]
[string[]]$datastoreIdentifier
)
begin {
$baseUri = "datastores"
$returnObject = [System.Collections.ArrayList]@()
}
process {
if ( $PSCmdlet.ParameterSetName -eq "main" ) {
$uri = "{0}" -f $baseUri
$result = Invoke-ZertoRestRequest -uri $uri
$returnObject.Add($result) | Out-Null
} else {
foreach ( $id in $datastoreIdentifier ) {
$uri = "{0}/{1}" -f $baseUri, $id
$result = Invoke-ZertoRestRequest -uri $uri
$returnObject.Add($result) | Out-Null
}
}
}
end {
return $returnObject
}
}