Functions/Get-SecretScopes.ps1
Function Get-SecretScopes { [cmdletbinding()] param ( [parameter(Mandatory = $false)][string]$BearerToken, [parameter(Mandatory = $false)][string]$Region, [parameter(Mandatory = $false)][string]$ScopeName ) $workspaceScopes = Get-DatabricksSecretScopes -BearerToken $BearerToken -Region $Region if ($ScopeName) { Return ($workspaceScopes | where-object { $_.name -eq "$ScopeName" }) } else { return $workspaceScopes } } |