確認する比較が多すぎて If ステートメントが画面右側の遠くの方へスクロールされてしまうという状況を避けることはできません。PowerShell コピー $user = Get-ADUser -Identity $UserName if ( $null -ne $user -and $user.Department -eq 'Finance' -and $user.Title -match 'Senior' -...