Create Get-ZAPlannerSite.ps1

This commit is contained in:
Wes Carroll
2020-03-08 14:39:34 -04:00
parent 71352cae7b
commit a891a4914d
@@ -0,0 +1,22 @@
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
function Get-ZAPlannerSite {
[cmdletbinding()]
param(
[Parameter(
HelpMessage = "The site identifier(s) for which to return detailed information."
)]
[ValidateNotNullOrEmpty()]
[string[]]$siteIdentifier
)
$uri = "planner/sites"
if ( -not [String]::IsNullorEmpty($siteIdentifier) ) {
$entry = foreach ($id in $siteIdentifier) {
"{0}/{1}" -f $uri, $id
}
} else {
$entry = $uri
}
foreach ($uri in $entry) {
Invoke-ZARestRequest -uri $uri
}
}