Windows – Is it possible to use IPv6 to connect to a remote share using ‘net use’

net-usenetwork-sharewindows

One can use either UNC or IPv4 address to connect to a shared folder on a remote machine using net use, e.g.:

net use \\remotePC\SharedFolder     // valid
net use \\111.122.1.1\SharedFolder  // valid

Is it possible for user to connect using IPv6 as well? Is it something that needs to be configured separately but is technically possible? If I try to specify IPv6 address, I get error 53:

The network path was not found.

The reason I'm asking is because one of my programs accepts a remote shared folder location as an input parameter – I need to evaluate whether the location is valid. I know it's valid if it's a UNC path or an IPv4 address, but am not sure if IPv6 should be allowed or simply result in an error.

Best Answer

As documented by Microsoft:

For example, for the following IPv6 address:

2001:4898:9:3:c069:aa97:fe76:2449

an example for a share might be the following:

\\2001-4898-9-3-c069-aa97-fe76-2449.ipv6-literal.net\share

For more, see: How do I create a UNC to an IPv6 address?


Also note that, strangely enough, Microsoft doesn't actually own that domain name, and the actual owner is unknown. While Windows shouldn't send these queries out to the network, there is still the possibility of leakage if this sort of literal gets reused in other contexts. You would be well advised to set up DNS for your network.