Wrong result for FileTableRootPath Function of SQL Server
Below is a T-SQL example from the documentation:

ALTER DATABASE database_name  
    SET FILESTREAM ( NON_TRANSACTED_ACCESS = FULL, DIRECTORY_NAME = N'directory_name' );


Note the database must be locked exclusively for this operation.