Home Dashboard Directory Help
Search

Where-Object simplified Syntax doesn't support multiple expressions by JasonHorner


Status: 

Active


1
0
Sign in
to vote
Type: Suggestion
ID: 776728
Opened: 1/16/2013 11:03:11 AM
Access Restriction: Public
0
Workaround(s)
view

Description

When using the simplified syntax introduced in V3:

Works:
Get-ChildItem | where { !$_.PSIsContainer -and $_.Attributes -notmatch "Archive" }

Does not work:
Get-ChildItem | where {PSIsContainer -and Attributes -notmatch "Archive"}

Even better:
Get-ChildItem | where PSIsContainer -and Attributes -notmatch "Archive"
Details
Sign in to post a comment.
Sign in to post a workaround.