title: Using dsmod To Set netbootmachinefilepath Attribute To Blank
body: <p>Is it possible to use <code>dsmod computer</code> to set <code>netbootmachinefilepath</code> ?</p>
  
  <p>I'm unable to use the ActiveDirectory commandlets, and <code>System.DirectoryServices.DirectoryEntry</code> doesn't let me clear the value, it only lets me delete the attribute (see <a href="https://stackoverflow.com/questions/27032963/powershell-unable-to-retrieve-active-directory-attribute-after-clearing-it">Powershell - Unable to retrieve active directory attribute after clearing it</a>).</p>
  
  <p>It seems as though dsmod is my only hope but it only has a few attributes which you can change.</p>
  
  <p><strong>UPDATE:</strong>
  Seems as though this attribute can be either non blank or deleted (it can't be blank).
  I'll have to work out how to recreate the attribute after it has been "cleared".
  When I use the Active Directory GUI to clear the value and then read the value using Powershell, it says the attribute doesn't exist. I therefore can't use Powershell to update the value as it has been deleted. However I can use the AD GUI to update it. So logically the GUI must actually be recreating the attribute when I "update" it.</p>
  
  <p><strong>UPDATE:</strong>
  I incorrectly assumed that <code>$result.Properties.Contains("netbootmachinefilepath") = false</code> meant that the property doesn't exist. <code>$result.Properties.Contains("netbootmachinefilepath")</code> equals false if the property exists and its value is null.</p>
  
  <p><code>System.DirectoryServices.DirectoryEntry</code> will let me clear a value and not delete it as seen in my other <a href="https://stackoverflow.com/questions/27032963/powershell-unable-to-retrieve-active-directory-attribute-after-clearing-it/27808393">post</a></p>