title: What does script keyword mean in Powershell 5: Function script:Set-Variables
body: <p>I have come across this &quot;<code>script</code>&quot; keyword in <code>Function script:Set-Variables{}</code></p>
  <p>Any idea why it is being used?</p>
  <pre><code>Function script:Set-Variables {
  $PerTraceArr = @()
  $script:ASNOwnerArr = @()
  $ASNOwnerObj = New-Object PSObject
  $ASNOwnerObj | Add-Member NoteProperty &quot;ASN&quot;(&quot;AS0&quot;)
  $ASNOwnerObj | Add-Member NoteProperty &quot;ASN Owner&quot;(&quot;EvilCorp&quot;)
  $ASNOwnerArr += $ASNOwnerObj #Add some values so the array isn't empty when first checked.
  $script:i = 0
  $script:x = 0
  $script:z = 0
  $script:WHOIS = &quot;.origin.asn.cymru.com&quot;
  $script:ASNWHOIS = &quot;.asn.cymru.com&quot;
  } #End Set-Variables
  </code></pre>
  <p>Thanks!</p>