title: Connect to a network share with different credentials
body: <p>I have a .pptx file on a network share, where user 1 doesn't have access to.
  Now I want to open this file with different credentials from a domain user who has access to.
  How can i achieve that?</p>
  <p>This is what I have</p>
  <pre><code>$cred = Get-Credential
  New-PSDrive -Name &quot;z&quot; -Root &quot;\\server1\folder1&quot; -PSProvider &quot;FileSystem&quot; -Persist:$true -credential $cred -ea SilentlyContinue
  start &quot;\\server1\folder1\News-Ticker.pptx&quot; 
  Remove-PSDrive -name &quot;z&quot;
  </code></pre>