junction

powershell to resolve junction target path

♀尐吖头ヾ 提交于 2019-11-26 22:24:17
问题 In PowerShell, I need resolve the target path of a junction (symlink). for example, say I have a junction c:\someJunction whose target is c:\temp\target I tried variations of $junc = Get-Item c:\someJunction , but was only able to get c:\someJunction How do I find the target path of the junction, in this example c:\temp\target , of a given junction? 回答1: You can get the path by doing the following: Get-ChildItem -Path C:\someJunction Edit for finding the path and not the contents of the