powershell - Clarification of syntax used -
can explain me syntax? think didn't work, if can me find syntax.
$fichesaenvoyer = @($fiches | {($_.typefiche -eq '2') -and (($_.causes -eq '') -or ($_.causes -eq $null) -or ($_.causes.count -eq 0) -or ($_.actioncorrective -eq '') -or ($_.actioncorrective -eq $null) -or ($_.dateactioncorrective -eq '') -or ($_.dateactioncorrective -eq $null) -or ($_.actionpreventive -eq '') -or ($_.actionpreventive -eq $null) -or ($_.dateactionpreventive -eq '') -or ($_.dateactionpreventive -eq $null) )})
i don't understand why there $_
instead of $fiches
$_ variable where cmdlet creates represent current object in pipeline. example, if do:
1,2,3 | {$_ -ge 2} | write-host
then $_ set 1 followed 2, followed 3.
Comments
Post a Comment