<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Viewing Junctions with ‘dir’</title><link>http://blogs.msdn.com/b/powershell/archive/2010/02/10/viewing-junctions-with-dir.aspx</link><description>One feature of the NTFS file system is the junction, which is similar to a short cut but works at the file system level. This lets you link one directory to another. There’s a tool called ‘junction’ available here that lets you manipulate junctions. When</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Viewing Junctions with ‘dir’</title><link>http://blogs.msdn.com/b/powershell/archive/2010/02/10/viewing-junctions-with-dir.aspx#10191521</link><pubDate>Mon, 01 Aug 2011 00:53:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10191521</guid><dc:creator>JFX</dc:creator><description>&lt;p&gt;I agree with L. and Jon ... maybe in version 3 ?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10191521" width="1" height="1"&gt;</description></item><item><title>re: Viewing Junctions with ‘dir’</title><link>http://blogs.msdn.com/b/powershell/archive/2010/02/10/viewing-junctions-with-dir.aspx#9976041</link><pubDate>Wed, 10 Mar 2010 06:50:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9976041</guid><dc:creator>jon</dc:creator><description>&lt;p&gt;@L.&lt;/p&gt;
&lt;p&gt;I agree. PowerShell really ought to support for listing and manipulating junctions, hard links and symlinks out of the box.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9976041" width="1" height="1"&gt;</description></item><item><title>re: Viewing Junctions with ‘dir’</title><link>http://blogs.msdn.com/b/powershell/archive/2010/02/10/viewing-junctions-with-dir.aspx#9963369</link><pubDate>Sun, 14 Feb 2010 22:43:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9963369</guid><dc:creator>L.</dc:creator><description>&lt;p&gt;@PowerShellTeam: Come on, you should support current NTFS features out of the box! &amp;nbsp;Even cmd.exe knows about junctions and symlinks.&lt;/p&gt;
&lt;p&gt;@Nigel Sharples [MSFT]: This will display a J for any kind of reparse point, though, not only for junctions. &amp;nbsp;Is it really all right to confuse junctions with e.g. files moved to offline storage? &amp;nbsp;(IIRC reparse points are used in this case to trigger fetching back the file).&lt;/p&gt;
&lt;p&gt;@n4cer: You description of junctions vs symlinks is right, but junctions are not hard links. &amp;nbsp;Hard links are yet another kind of beast (a file that has several names, possibly in different directories), and are also supported by NTFS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9963369" width="1" height="1"&gt;</description></item><item><title>re: Viewing Junctions with ‘dir’</title><link>http://blogs.msdn.com/b/powershell/archive/2010/02/10/viewing-junctions-with-dir.aspx#9961781</link><pubDate>Thu, 11 Feb 2010 07:16:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9961781</guid><dc:creator>n4cer</dc:creator><description>&lt;p&gt;@FP - Junctions are hard links, evaluated on the server in networking scenarios, and available in NT since Windows 2000.&lt;/p&gt;
&lt;p&gt;Symbolic links, introduced on Windows in Windows Vista along with support for them in SMB2, are soft links and evaluated clientside.&lt;/p&gt;
&lt;p&gt;Both link types are implemented using NTFS reparse points.&lt;/p&gt;
&lt;p&gt;The equivalent to ln on Windows Vista and above is mklink. On versions prior to Vista, you can use linkd (shipped seperately in a Resource Kit) or the Sysinternals tool linked in the post.&lt;/p&gt;
&lt;p&gt;Reparse points can also be shown in CMD's dir using the /AL switch, and in Vista/7's Explorer if the related columns are made visible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9961781" width="1" height="1"&gt;</description></item><item><title>re: Viewing Junctions with ‘dir’</title><link>http://blogs.msdn.com/b/powershell/archive/2010/02/10/viewing-junctions-with-dir.aspx#9961454</link><pubDate>Wed, 10 Feb 2010 20:25:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9961454</guid><dc:creator>Klaus Graefensteiner</dc:creator><description>&lt;p&gt;This is great stuff. I am working with Junctions a lot. Every deployment of our software needs to change junction points.&lt;/p&gt;
&lt;p&gt;Klaus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9961454" width="1" height="1"&gt;</description></item><item><title>re: Viewing Junctions with ‘dir’</title><link>http://blogs.msdn.com/b/powershell/archive/2010/02/10/viewing-junctions-with-dir.aspx#9961095</link><pubDate>Wed, 10 Feb 2010 10:15:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9961095</guid><dc:creator>Blake</dc:creator><description>&lt;p&gt;This works, but it is not a good practice, because the it leaves the impression that the Mode property includes that trailing J when it doesn't.&lt;/p&gt;
&lt;p&gt;The better practice is to add a new ScriptProperty to a local types.ps1xml file for both DirectoryInfo and FileInfo types. &amp;nbsp; Mine looks like this:&lt;/p&gt;
&lt;p&gt;&amp;lt;ScriptProperty&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;Name&amp;gt;Attrib&amp;lt;/Name&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;GetScriptBlock&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if ($this.Attributes -band [IO.FileAttributes]::ReparsePoint) { &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'l'+$this.Mode &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;} else { &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;'-'+$this.Mode&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/GetScriptBlock&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/ScriptProperty&amp;gt;&lt;/p&gt;
&lt;p&gt;Then use a local format.ps1xml to display that property for table formatting rather than the Mode property.&lt;/p&gt;
&lt;p&gt;(I used an 'l' to mirror the unix-y look of the rest of usual Mode string, because ReparsePoint can be set for many things other than a directory junction, and because 'r' is already used.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9961095" width="1" height="1"&gt;</description></item><item><title>re: Viewing Junctions with ‘dir’</title><link>http://blogs.msdn.com/b/powershell/archive/2010/02/10/viewing-junctions-with-dir.aspx#9961047</link><pubDate>Wed, 10 Feb 2010 07:57:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9961047</guid><dc:creator>FP</dc:creator><description>&lt;p&gt;Oh, so if I understand correctly, &amp;quot;junctions&amp;quot; are just like the soft links Unix has had for, what, 30 years ? Where is the ln utility ? And why on Earth is it necessary to copy and paste (!) code from the equivalent of &amp;quot;ls&amp;quot; to see that some items are in fact soft links ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9961047" width="1" height="1"&gt;</description></item></channel></rss>