title: Query domain controllers & NTP servers time w32tm /monitor format output
body: <p>I'm using the following to measure the time offset between our domain controllers and ntp servers.</p>
  
  <pre>
  $Servers = "ntp.xxxxx,ntp.xxxxx,dc1,dc2,dc3,dca,dcb,dcc"
  $ListDomains = "domain1","domain2"
  
  Foreach ($Server in $ListServers) {
      $time = (w32tm /stripchart /dataonly /computer:$Server /samples:1)[-1].split("[")[0]
      "$Server`: `t $Time" #| out-file $timeFile -append
      $time = ""  
  } 
  
  ForEach ($Domain in $ListDomains) {
      "** $Domain **"
      w32tm /monitor /domain:"$Domain.unisa.edu.au" /nowarn /threads:5
  }
  </pre>
  
  <p>This is working but the output is horrible. 
  <strong>Domain 1</strong></p>
  
  <pre><code>itupw-xxxxx.xxxxxxxxxxxxxx[666.666.6.76:123]:
      ICMP: 0ms delay
      NTP: -0.0099384s offset from itupw-xxxxx.xxxxxxxxxxxxxx
       RefID: itupw-xxxxx.xxxxxxxxxxxxxx[22222222222222]
          Stratum: 5
  itupw-xxxxx.xxxxxxxxxxxxxx[999.666.6.76:123]:
      ICMP: 0ms delay
      NTP: -0.0093544s offset from itupw-xxxxx.xxxxxxxxxxxxxx
          RefID: itupw-xxxxx.xxxxxxxxxxxxxx[22222222222222]
          Stratum: 5
  </code></pre>
  
  <p>Can anyone please suggest a way of formatting this so the data is easier to compare? We're only interested in Name, ICMP, NTP(offset).</p>
  
  <p>As the NTP boxes are Solaris we can't use WMI queries.</p>
  
  <p>Thanks,
  Amelia</p>