-band
, -bor
, bxor
, -bnot
, -shl
and -shr
are bitwise operators. They focus on single bits in integral values. if ( (get-item foo.txt).attributes -band [System.IO.FileAttributes]::Offline) { write-host 'File has offline attribute' } else { write-host 'File does not have offline attribute' }