New article on PowerShell Magazine: Using UNC paths when working with PowerShell providers

The article explains two solutions to errors that you might run in to when utilizing UNC paths when working PowerShell providers. For example the execution of the following command will fail:

Set-Location HKLM:
Get-ChildItem | Export-Csv -Path \\localhost\c$\registry.csv

This can be solved by adding the specific provider, in this case the FileSystem PowerShell provider:

Get-ChildItem | Export-Csv -Path Microsoft.PowerShell.Core\FileSystem::\\localhost\c$\registry.csv

For more information on this topic head on over to PowerShell Magazine to have a look at the article:
http://www.powershellmagazine.com/2012/11/05/pstip-using-unc-paths-when-working-with-powershell-providers/

Share

2 thoughts on “New article on PowerShell Magazine: Using UNC paths when working with PowerShell providers

  1. Livio von Büren

    Your scrollbar is glitched. Everytime I try to scroll to the right, it disappears…

    Reply
  2. Pingback: Add Sql Server Module to PowerShell Console | Jaap Brasser's Blog

Leave a Reply

Your email address will not be published.