title: Difference between Clear-Variable and setting variable to NULL
body: <p>I often use variables which are declared in the script scope to avoid problems with functions and their scopes. I am declaring these variables like this:</p>
  
  <pre><code>New-Variable -Name test -Option AllScope -Value $null
  </code></pre>
  
  <p>... or sometimes I switch existing variables like this to use them comprehensively:</p>
  
  <pre><code>$script:test = $test
  </code></pre>
  
  <p>When I want to clear them I either use this:</p>
  
  <pre><code>Clear-Variable test -Scope Script
  </code></pre>
  
  <p>... or I simply use this:</p>
  
  <pre><code>$test = $null
  </code></pre>
  
  <p>Is there a difference? What should I prefer and why?</p>