WebDAV (Web Distributed Authoring and Versioning) is an extension of the HTTP/1.1 protocol. The WebDAV protocol allows to access files on the remote server and perform common actions: reading, writing, deleting files. Typically, this protocol is used by users to work together with remote files. Simply put, WebDAV is essentially a web-based shared folder. To access the WebDAV shares, WebDAV client must be installed on the client side.
In Microsoft server operating systems there is no WebDAV client by default. For example, in Windows Server 2008 R2,2012/2012 R2, the WebDAV client is included to the Desktop-Experience feature. Therefore, to access WebDAV resources from these OSs, you must install this feature.
Tip. In Windows Server 2008 R2, the Install-WindowsFeature cmdlet is missing, instead you need to use the Add-WindowsFeature.
Windows Server 2016 has a separate WebDAV-Redirector component. To install it, run the following command (you will need to reboot the server):
Install-WindowsFeature WebDAV-Redirector –Restart
After the reboot, verify that you have the WebDAV-Redirector feature installed:
Get-WindowsFeature WebDAV-Redirector | Format-Table –Autosize
Two 2 new services will appear in the system:
- WebClient (get-service WebClient) — Enable Windows-based programs to create, access, and modify Internet-based files;
- MRxDAV (get-service MRxDAV) — File system driver (WebDav Client Redirector Driver).
By default, the WebClient service and the MRxDAV driver are disabled and configured to run in Manual mode when a trigger event occurs. Apparently, according to the idea of the developers, the service should have been launched when it first accessed from the driver MRXDAV.SYS, but, alas, it does not work everywhere. Therefore, we will force Automatic option for the service.
Set-Service WebClient -StartupType Automatic Set-Service MRxDAV -StartupType Automatic Start the services by running the following commands: Start-Service WebClient Start-Service MRxDAV
The WebClient service is configured through the registry. All available settings are located in the registry key HKLM\SYSTEM\CurrentControlSet\Services\WebClient\Parameters.
From a practical point of view, the following parameters of the WebClient service may be of interest.
AcceptOfficeAndTahoeServers — Ability to connect to Web servers with SharePoint and Office Web Server (1 –by default);
BasicAuthLevel — The type of authentication used by the WebClient service. Available values:
- 0 — Basic authentication disabled;
- 1 — Basic authentication enabled for SSL shares only (default value on Windows Server 2016);
- 2 or greater — Basic authentication enabled for SSL shares and for non-SSL shares (Not safe, because The username and password are sent in plain text);
FileSizeLimitInBytes — maximum size (bytes) for file transfers (by default 50 MB).
To test the operation of WebDav Client, let’s use the webdav-enabled share on live.sysinternals.com. This web directory stores popular sysadmin’s utilities from Sysinternals.
You can mount WebDAV drive on Windows Server 2016 in the following ways:
- Without SSL:
net use * \\live.sysinternals.com\
- With SSL:
net use * \\live.sysinternals.com@ssl\
- You can specify credentials to authenticate on a remote WebDav share:
net use * \\live.sysinternals.com@ssl\ /user:itbros *
- You can specify a specific TCP port:
- To delete the connected WebDav drive, run the command:
net use * /del /y
In case you’ll face with System error 67 has occured. The network name cannot be found after mounting the Webdav drive via explorer or cmd, follow the steps below to fix it:
- Check if WebClient service is started;
- Change the value of the registry parameter BasicAuthLevel to 1;
- Restart the computer.