Initial Commit to Dedicated Repo
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
function Get-ZertoZsspSession {
|
||||
[cmdletbinding( DefaultParameterSetName = "default" )]
|
||||
param(
|
||||
[Parameter( ParameterSetName = "zsspSessionIdentifier" )]
|
||||
[string[]]$zsspSessionIdentifier
|
||||
)
|
||||
|
||||
begin {
|
||||
$baseUri = "zsspSessionIdentifier"
|
||||
$returnObject = [System.Collections.ArrayList]@()
|
||||
}
|
||||
|
||||
process {
|
||||
if ( $PSCmdlet.ParameterSetName -eq "default" ) {
|
||||
$results = Invoke-ZertoRestRequest -uri $baseUri
|
||||
$returnObject.Add($results)
|
||||
} elseif ( $PSCmdlet.ParameterSetName -eq "zsspSessionIdentifier" ) {
|
||||
foreach ( $id in $zsspSessionIdentifier ) {
|
||||
$uri = "{0}/{1}" -f $baseUri, $id
|
||||
$results = Invoke-ZertoRestRequest -uri $uri
|
||||
$returnObject.Add($results)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
end {
|
||||
return $returnObject
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user