title: Publishing DFS replication to a Namespace
body: <p>I'm creating a chef cookbook which runs on 2 Windows boxes</p>
  
  <ul>
  <li>Turns on DFS Windows feature</li>
  <li>Creates a folder and sets it up for replication</li>
  <li>Creates a Replication Group and registers it to the ActiveDirector</li>
  </ul>
  
  <p>The recipes are calling PowerShell commands to automate these tasks. This is working well.</p>
  
  <p>What I still need to to is creating a Namespace and Publishing the replication in that Namespace. </p>
  
  <p>Based on <a href="https://windorks.wordpress.com/2014/02/16/dfs-namespace/" rel="nofollow">this</a> tutorial, I managed to do it in no time with the DFS Management UI.</p>
  
  <p>I need a way to do it with PowerShell or with anything what I can call from Chef. </p>
  
  <p>Note: If I can publish the replication to an already existing Namespace, that's already a half solution for me.</p>
  
  <p>Update: I'm using Windows 2012 R2. ( The latest version provided on AWS.)</p>