leeand00 leeand00 - 1 year ago 228
PowerShell Question

What does ?{} mean in PowerShell?

What does a

?{ }
block mean in a PowerShell?

For example

[enum]::GetValues([io.fileoptions]) | ?{$_.value__ -band 0x90000000}

Answer Source

? is an alias for Where-Object. The curly brackets are used if you have to do something more complex with the actual object. You could also write:

[enum]::GetValues([io.fileoptions]) | Where-Object { $_.value__ -band 0x90000000}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download