How do you create a new symlink in windows 10 using powershell (not mklink.exe)?
up vote
4
down vote
favorite
If there's docs on it, I'll take that. Any web searches for "symlink" "symbolic link" "windows [10]" "powershell" returns everything except the base command.
Even the powershell docs site returns nothing. Is this not possible?
windows-10 powershell
add a comment |
up vote
4
down vote
favorite
If there's docs on it, I'll take that. Any web searches for "symlink" "symbolic link" "windows [10]" "powershell" returns everything except the base command.
Even the powershell docs site returns nothing. Is this not possible?
windows-10 powershell
Why don’t you want to use mklink you can call it from a PowerShell prompt and/or script
– Ramhound
Mar 24 at 0:51
Please see docs.microsoft.com/en-us/powershell/wmf/5.0/feedback_symbolic
– Epoxy
Mar 24 at 1:07
@Epoxy Thank you. Fun Fact: using the search box on the top level of that site returns "No results" when searching forsym
. In other words, you can't find it if you don't know where it is.
– monsto
Mar 24 at 1:15
You are quite welcome! :)
– Epoxy
Mar 24 at 1:19
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
If there's docs on it, I'll take that. Any web searches for "symlink" "symbolic link" "windows [10]" "powershell" returns everything except the base command.
Even the powershell docs site returns nothing. Is this not possible?
windows-10 powershell
If there's docs on it, I'll take that. Any web searches for "symlink" "symbolic link" "windows [10]" "powershell" returns everything except the base command.
Even the powershell docs site returns nothing. Is this not possible?
windows-10 powershell
windows-10 powershell
asked Mar 24 at 0:46
monsto
2301311
2301311
Why don’t you want to use mklink you can call it from a PowerShell prompt and/or script
– Ramhound
Mar 24 at 0:51
Please see docs.microsoft.com/en-us/powershell/wmf/5.0/feedback_symbolic
– Epoxy
Mar 24 at 1:07
@Epoxy Thank you. Fun Fact: using the search box on the top level of that site returns "No results" when searching forsym
. In other words, you can't find it if you don't know where it is.
– monsto
Mar 24 at 1:15
You are quite welcome! :)
– Epoxy
Mar 24 at 1:19
add a comment |
Why don’t you want to use mklink you can call it from a PowerShell prompt and/or script
– Ramhound
Mar 24 at 0:51
Please see docs.microsoft.com/en-us/powershell/wmf/5.0/feedback_symbolic
– Epoxy
Mar 24 at 1:07
@Epoxy Thank you. Fun Fact: using the search box on the top level of that site returns "No results" when searching forsym
. In other words, you can't find it if you don't know where it is.
– monsto
Mar 24 at 1:15
You are quite welcome! :)
– Epoxy
Mar 24 at 1:19
Why don’t you want to use mklink you can call it from a PowerShell prompt and/or script
– Ramhound
Mar 24 at 0:51
Why don’t you want to use mklink you can call it from a PowerShell prompt and/or script
– Ramhound
Mar 24 at 0:51
Please see docs.microsoft.com/en-us/powershell/wmf/5.0/feedback_symbolic
– Epoxy
Mar 24 at 1:07
Please see docs.microsoft.com/en-us/powershell/wmf/5.0/feedback_symbolic
– Epoxy
Mar 24 at 1:07
@Epoxy Thank you. Fun Fact: using the search box on the top level of that site returns "No results" when searching for
sym
. In other words, you can't find it if you don't know where it is.– monsto
Mar 24 at 1:15
@Epoxy Thank you. Fun Fact: using the search box on the top level of that site returns "No results" when searching for
sym
. In other words, you can't find it if you don't know where it is.– monsto
Mar 24 at 1:15
You are quite welcome! :)
– Epoxy
Mar 24 at 1:19
You are quite welcome! :)
– Epoxy
Mar 24 at 1:19
add a comment |
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
- Start powershell as admin
- You need to know 1) the
path to target
of the link 2)path to location
where you want the link 3)the name
you want to use to refer to the link. PS C:> new-item -itemtype symboliclink -path <path to location> -name <the name> -value <path to target>
Example: If you're in c:driversAMD and you want to link in f:driverolddrivers, then you would go
PS C:> new-item -itemtype symboliclink -path . -name OldDrivers -value f:driverolddrivers
And wind up with a symlink path of c:driverAMDOldDrivers
That's becausemklink
is a specific tool for a specific purpose. PowershellNew-Item
is a very general tool. It can do much more than create directories and symlinks.
– monsto
Mar 24 at 3:07
perfect! for those who are wondering, this also works for creating symbolic links to directories ...PS C:Usersmcoog> New-Item -itemtype symboliclink -path . -name .vim -value C:UsersmcoogDropbox.vim
– ricardo
Aug 11 at 5:05
1
FYI, ItemType SymbolicLink was added in PowerShell 5.0
– Brettski
Nov 9 at 5:29
add a comment |
up vote
0
down vote
+-----------------------+-----------------------------------------------------------+
| mklink syntax | Powershell equivalent |
+-----------------------+-----------------------------------------------------------+
| mklink Link Target | New-Item -ItemType SymbolicLink -Name Link -Target Target |
| mklink /D Link Target | New-Item -ItemType SymbolicLink -Name Link -Target Target |
| mklink /H Link Target | New-Item -ItemType HardLink -Name Link -Target Target |
| mklink /J Link Target | New-Item -ItemType Junction -Name Link -Target Target |
+-----------------------+-----------------------------------------------------------+
mklink reference: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink
Powershell symlink reference: https://docs.microsoft.com/en-us/powershell/wmf/5.0/feedback_symbolic
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
- Start powershell as admin
- You need to know 1) the
path to target
of the link 2)path to location
where you want the link 3)the name
you want to use to refer to the link. PS C:> new-item -itemtype symboliclink -path <path to location> -name <the name> -value <path to target>
Example: If you're in c:driversAMD and you want to link in f:driverolddrivers, then you would go
PS C:> new-item -itemtype symboliclink -path . -name OldDrivers -value f:driverolddrivers
And wind up with a symlink path of c:driverAMDOldDrivers
That's becausemklink
is a specific tool for a specific purpose. PowershellNew-Item
is a very general tool. It can do much more than create directories and symlinks.
– monsto
Mar 24 at 3:07
perfect! for those who are wondering, this also works for creating symbolic links to directories ...PS C:Usersmcoog> New-Item -itemtype symboliclink -path . -name .vim -value C:UsersmcoogDropbox.vim
– ricardo
Aug 11 at 5:05
1
FYI, ItemType SymbolicLink was added in PowerShell 5.0
– Brettski
Nov 9 at 5:29
add a comment |
up vote
4
down vote
accepted
- Start powershell as admin
- You need to know 1) the
path to target
of the link 2)path to location
where you want the link 3)the name
you want to use to refer to the link. PS C:> new-item -itemtype symboliclink -path <path to location> -name <the name> -value <path to target>
Example: If you're in c:driversAMD and you want to link in f:driverolddrivers, then you would go
PS C:> new-item -itemtype symboliclink -path . -name OldDrivers -value f:driverolddrivers
And wind up with a symlink path of c:driverAMDOldDrivers
That's becausemklink
is a specific tool for a specific purpose. PowershellNew-Item
is a very general tool. It can do much more than create directories and symlinks.
– monsto
Mar 24 at 3:07
perfect! for those who are wondering, this also works for creating symbolic links to directories ...PS C:Usersmcoog> New-Item -itemtype symboliclink -path . -name .vim -value C:UsersmcoogDropbox.vim
– ricardo
Aug 11 at 5:05
1
FYI, ItemType SymbolicLink was added in PowerShell 5.0
– Brettski
Nov 9 at 5:29
add a comment |
up vote
4
down vote
accepted
up vote
4
down vote
accepted
- Start powershell as admin
- You need to know 1) the
path to target
of the link 2)path to location
where you want the link 3)the name
you want to use to refer to the link. PS C:> new-item -itemtype symboliclink -path <path to location> -name <the name> -value <path to target>
Example: If you're in c:driversAMD and you want to link in f:driverolddrivers, then you would go
PS C:> new-item -itemtype symboliclink -path . -name OldDrivers -value f:driverolddrivers
And wind up with a symlink path of c:driverAMDOldDrivers
- Start powershell as admin
- You need to know 1) the
path to target
of the link 2)path to location
where you want the link 3)the name
you want to use to refer to the link. PS C:> new-item -itemtype symboliclink -path <path to location> -name <the name> -value <path to target>
Example: If you're in c:driversAMD and you want to link in f:driverolddrivers, then you would go
PS C:> new-item -itemtype symboliclink -path . -name OldDrivers -value f:driverolddrivers
And wind up with a symlink path of c:driverAMDOldDrivers
answered Mar 24 at 1:07
monsto
2301311
2301311
That's becausemklink
is a specific tool for a specific purpose. PowershellNew-Item
is a very general tool. It can do much more than create directories and symlinks.
– monsto
Mar 24 at 3:07
perfect! for those who are wondering, this also works for creating symbolic links to directories ...PS C:Usersmcoog> New-Item -itemtype symboliclink -path . -name .vim -value C:UsersmcoogDropbox.vim
– ricardo
Aug 11 at 5:05
1
FYI, ItemType SymbolicLink was added in PowerShell 5.0
– Brettski
Nov 9 at 5:29
add a comment |
That's becausemklink
is a specific tool for a specific purpose. PowershellNew-Item
is a very general tool. It can do much more than create directories and symlinks.
– monsto
Mar 24 at 3:07
perfect! for those who are wondering, this also works for creating symbolic links to directories ...PS C:Usersmcoog> New-Item -itemtype symboliclink -path . -name .vim -value C:UsersmcoogDropbox.vim
– ricardo
Aug 11 at 5:05
1
FYI, ItemType SymbolicLink was added in PowerShell 5.0
– Brettski
Nov 9 at 5:29
That's because
mklink
is a specific tool for a specific purpose. Powershell New-Item
is a very general tool. It can do much more than create directories and symlinks.– monsto
Mar 24 at 3:07
That's because
mklink
is a specific tool for a specific purpose. Powershell New-Item
is a very general tool. It can do much more than create directories and symlinks.– monsto
Mar 24 at 3:07
perfect! for those who are wondering, this also works for creating symbolic links to directories ...
PS C:Usersmcoog> New-Item -itemtype symboliclink -path . -name .vim -value C:UsersmcoogDropbox.vim
– ricardo
Aug 11 at 5:05
perfect! for those who are wondering, this also works for creating symbolic links to directories ...
PS C:Usersmcoog> New-Item -itemtype symboliclink -path . -name .vim -value C:UsersmcoogDropbox.vim
– ricardo
Aug 11 at 5:05
1
1
FYI, ItemType SymbolicLink was added in PowerShell 5.0
– Brettski
Nov 9 at 5:29
FYI, ItemType SymbolicLink was added in PowerShell 5.0
– Brettski
Nov 9 at 5:29
add a comment |
up vote
0
down vote
+-----------------------+-----------------------------------------------------------+
| mklink syntax | Powershell equivalent |
+-----------------------+-----------------------------------------------------------+
| mklink Link Target | New-Item -ItemType SymbolicLink -Name Link -Target Target |
| mklink /D Link Target | New-Item -ItemType SymbolicLink -Name Link -Target Target |
| mklink /H Link Target | New-Item -ItemType HardLink -Name Link -Target Target |
| mklink /J Link Target | New-Item -ItemType Junction -Name Link -Target Target |
+-----------------------+-----------------------------------------------------------+
mklink reference: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink
Powershell symlink reference: https://docs.microsoft.com/en-us/powershell/wmf/5.0/feedback_symbolic
add a comment |
up vote
0
down vote
+-----------------------+-----------------------------------------------------------+
| mklink syntax | Powershell equivalent |
+-----------------------+-----------------------------------------------------------+
| mklink Link Target | New-Item -ItemType SymbolicLink -Name Link -Target Target |
| mklink /D Link Target | New-Item -ItemType SymbolicLink -Name Link -Target Target |
| mklink /H Link Target | New-Item -ItemType HardLink -Name Link -Target Target |
| mklink /J Link Target | New-Item -ItemType Junction -Name Link -Target Target |
+-----------------------+-----------------------------------------------------------+
mklink reference: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink
Powershell symlink reference: https://docs.microsoft.com/en-us/powershell/wmf/5.0/feedback_symbolic
add a comment |
up vote
0
down vote
up vote
0
down vote
+-----------------------+-----------------------------------------------------------+
| mklink syntax | Powershell equivalent |
+-----------------------+-----------------------------------------------------------+
| mklink Link Target | New-Item -ItemType SymbolicLink -Name Link -Target Target |
| mklink /D Link Target | New-Item -ItemType SymbolicLink -Name Link -Target Target |
| mklink /H Link Target | New-Item -ItemType HardLink -Name Link -Target Target |
| mklink /J Link Target | New-Item -ItemType Junction -Name Link -Target Target |
+-----------------------+-----------------------------------------------------------+
mklink reference: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink
Powershell symlink reference: https://docs.microsoft.com/en-us/powershell/wmf/5.0/feedback_symbolic
+-----------------------+-----------------------------------------------------------+
| mklink syntax | Powershell equivalent |
+-----------------------+-----------------------------------------------------------+
| mklink Link Target | New-Item -ItemType SymbolicLink -Name Link -Target Target |
| mklink /D Link Target | New-Item -ItemType SymbolicLink -Name Link -Target Target |
| mklink /H Link Target | New-Item -ItemType HardLink -Name Link -Target Target |
| mklink /J Link Target | New-Item -ItemType Junction -Name Link -Target Target |
+-----------------------+-----------------------------------------------------------+
mklink reference: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink
Powershell symlink reference: https://docs.microsoft.com/en-us/powershell/wmf/5.0/feedback_symbolic
edited Nov 16 at 11:17
answered Nov 16 at 8:27
Ian Kemp
130111
130111
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1307360%2fhow-do-you-create-a-new-symlink-in-windows-10-using-powershell-not-mklink-exe%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Why don’t you want to use mklink you can call it from a PowerShell prompt and/or script
– Ramhound
Mar 24 at 0:51
Please see docs.microsoft.com/en-us/powershell/wmf/5.0/feedback_symbolic
– Epoxy
Mar 24 at 1:07
@Epoxy Thank you. Fun Fact: using the search box on the top level of that site returns "No results" when searching for
sym
. In other words, you can't find it if you don't know where it is.– monsto
Mar 24 at 1:15
You are quite welcome! :)
– Epoxy
Mar 24 at 1:19