Powershell script will initially, installing the DFS name space role and the MMC. 

Thereafter, the configuration is made: 

 sharing should be created without this step the script fails

 

 

 

Finally, the script processes the creation of target files, why two text files are used: 

 sharing should be created without this step the script fails