Functions/Get-IADefaultView.ps1
Function Get-IADefaultView { Param( [Parameter(Mandatory = $true, ParameterSetName='All')] [Switch] $All, [Parameter(Mandatory = $true, ParameterSetName='Id')] [String] $Id ) $Uri = "DefaultViews" if($Id){ $Uri += "($Id)" } $response = Invoke-IAQuery -QueryUrl $Uri -Method Get if(!$Id) { if ($null -eq $response.value) { return $null } return $response.value } else{ return $response } } |