Public/Get-TestServiceApp.ps1
|
function Get-TestServiceApp { <# .EXTERNALHELP TestEnvironment-Help.xml .SYNOPSIS Reports the bootstrapped credential and whether it still works #> [CmdletBinding()] param() dynamicparam { return Get-TestProviderParameter -CommandName ('Get-{0}ServiceApp' -f $script:ActiveProvider) } begin { if (-not $script:ActiveProvider) { Write-Error 'Not connected. Run Connect-TestEnvironment -Provider <name> first.' -ErrorAction Stop return } } process { $target = 'Get-{0}ServiceApp' -f $script:ActiveProvider if (-not (Get-Command -Name $target -ErrorAction SilentlyContinue)) { Write-Error "The $($script:ActiveProvider) provider does not implement $target." -ErrorAction Stop return } & $target @PSBoundParameters } } |