validate set for new functions

This commit is contained in:
Leonid Lapshin
2020-09-01 17:22:57 +03:00
parent ade2f9d34a
commit 425d62e593

View File

@@ -69,6 +69,7 @@ function Get-VisualStudioInstallation {
Param Param
( (
[Parameter(Mandatory)] [Parameter(Mandatory)]
[ValidateSet('VS','BuildTools')]
[String] $VSInstallType [String] $VSInstallType
) )
@@ -92,6 +93,7 @@ function Get-VisualStudioComponents {
Param Param
( (
[Parameter(Mandatory)] [Parameter(Mandatory)]
[ValidateSet('VS','BuildTools')]
[String] $VSInstallType [String] $VSInstallType
) )
(Get-VisualStudioInstallation -VSInstallType $VSInstallType).Packages | Where-Object type -in 'Component', 'Workload' | (Get-VisualStudioInstallation -VSInstallType $VSInstallType).Packages | Where-Object type -in 'Component', 'Workload' |