Skip to content

Commit

Permalink
Allow listing of plugins
Browse files Browse the repository at this point in the history
It might be desirable to see which plugins are installed.  Allow listing them using the -ListPlugins switch
  • Loading branch information
Hobadee committed Apr 15, 2022
1 parent fe88b67 commit f6cf8d3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
22 changes: 14 additions & 8 deletions Public/Test-Uri.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,24 @@ function Test-Uri {
#>
[CmdletBinding()]
Param(
[parameter(Mandatory=$true)]
[String]
$URI
[parameter(Mandatory=$true, ParameterSetName='Test')]
[URI]$URI
,
[parameter(ParameterSetName='Info')]
[switch]$ListPlugins
)


$plugins = [TestUriPlugins]::GetInstance()
$UriObj = [URI]::new($URI)

$ret = $plugins.checkUri($UriObj)

return $ret
if($ListPlugins){
$plugins
}
elseif($URI -ne $null){
return $plugins.checkUri($URI)
}
else{
Write-Error "No URI given!"
}

<#
echo "Status: [$(New-Text "Success" -fg "Green")]"
Expand Down
2 changes: 1 addition & 1 deletion test-uri.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CompatiblePSEditions = @('Core', 'Desktop')


# Module information
ModuleVersion = '1.0.0'
ModuleVersion = '1.0.1'
GUID = '6d0eb1a4-cdf5-44e0-bcf5-be974386a36f'
Description = 'Test-Uri - Test various URIs for connectivity'

Expand Down

0 comments on commit f6cf8d3

Please sign in to comment.