title: How do I perform a bitwise or (|) for enumerations in PowerShell?
body: <p>I am trying to perform a bitwise or (|) operation to apply multiple enumerations to a variable in PowerShell used by a .NET assembly. However, when the single pipe character to do this I get an <code>Expressions are only allowed as the first element of a pipeline</code> error. How do I assign multiple enumerations in PowerShell?</p>
  
  <pre class="lang-cs prettyprint-override"><code>    $everyone = New-Object System.Security.Principal.SecurityIdentifier([System.Security.Principal.WellKnownSidType]::WorldSid, $null);
      $fsr = [System.Security.AccessControl.FileSystemRights]::Read;
      $if = [System.Security.AccessControl.InheritanceFlags]::ContainerInherit | [System.Security.AccessControl.InheritanceFlags]::ObjectInherit;
      $pf = [System.Security.AccessControl.PropagationFlags]::None;
      $act = [System.Security.AccessControl.AccessControlType]::Allow;
      $accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($everyone, $fsr, $if, $pf, $act);
  </code></pre>