У меня возникли проблемы с получением параметров из определенного набора параметров. Я решил это, получив все параметры и используя $parDetails.Name.Contains("FileAttachment")
в качестве оператора if
.
Вместо этого я хотел бы получить параметры из определенного набора параметров.
Может кто-нибудь, пожалуйста, помогите мне с этим? Ниже приведен код, который я сейчас использую.
$CommandName = $PSCmdlet.MyInvocation.InvocationName
$ParameterList = (Get-Command -Name $CommandName).Parameter
foreach ($key in $ParameterList.keys) {
Write-Verbose "Starting loop for $key"
$parDetails = Get-Variable -Name $key
}
Get-Help
для просмотра параметров? Какую проблему вы решаете? - person Bill_Stewart   schedule 19.06.2018