title: How can I call explicitly implemented interface method from PowerShell?
body: <p>Code:</p>
  
  <pre><code>add-type @"
      public interface IFoo
      {
          void Foo();
      }
  
      public class Bar : IFoo
      {
          void IFoo.Foo()
          {
          }
      }
  "@ -Language Csharp
  
  $bar = New-Object Bar
  ($bar -as [IFoo]).Foo() # ERROR.
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Method invocation failed because [Bar]
    doesn't contain a method named 'Foo'.</p>
  </blockquote>