PowerShell 구문 응용 프로그램을 만들었으므로 PowerShell 구문에 대한 gui 도구가 실제로 적용됩니다. 파일 필터 "DeploymentConfig_custom"이 제대로 작동하는지 폴더를 검색해야합니다. if 문을 설정하고 폴더에서 해당 파일을 찾으면 체크 상자를 $ true로 설정해야합니다.Powershell Studio Get-ChildItem -Path -filter and do action
내 시도
$deploymentcheck.Checked = $false
[string]$deployment = Get-ChildItem -Path $Pkgpathmain.Text -Filter "*DeploymentConfig_custom*"
if ($deployment -contains "*DeploymentConfig_custom*")
{
$deploymentcheck.Checked = $true
}
-Contains가 배열에 적용되고 결과가 string으로 변환되었습니다. 이 경우에는 테스트하지만 일치합니다.'$ deployment -match "DeploymentConfig_custom" – Matt