title: PowerShell script with messagebox don't show on remote computer
body: <p>This is my script:</p>
  
  <pre><code>$name = function Get-Name {
      $env:computername
  }
  Get-Name
  
  $time = function Get-SystemUptime {
      $operatingSystem = Get-WmiObject Win32_OperatingSystem
      "$((Get-Date) - ([Management.ManagementDateTimeConverter]::ToDateTime($operatingSystem.LastBootUpTime)))"
  }
  Get-SystemUptime
  
  $string = Get-SystemUptime
  $separator = "\."
  $string.Split($separator, 2)
  
  [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") 
  [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") 
  Add-Type -AssemblyName PresentationFramework
  Add-Type –AssemblyName System.Windows.Forms
  
  $days = $string.Split(".")[0]
  if ([convert]::ToInt32($days, 10) -ge 1) {
      $MsgboxTxt = "TXT $($days) TXT"
      $MsgboxTitle = '!!! TXT !!!'
      [System.Windows.Forms.MessageBox]::Show($MsgboxTxt, $MsgboxTitle, [Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Stop, [System.Windows.Forms.MessageBoxDefaultButton]::Button1, [System.Windows.Forms.MessageBoxOptions]::DefaultDesktopOnly)
  }
  </code></pre>
  
  <p>I start it with this command on remote computer by my company program who runs it with batch (CMD) administration rights:</p>
  
  <pre><code>Powershell.exe -ExecutionPolicy RemoteSigned -File uptime.ps1
  </code></pre>
  
  <p>When I run in on local computer by copy file and run it from CMD in local priveliges it's OK. Everything working fine.</p>
  
  <p>I think my company program (LOGSystem) runs it on administration user, not logged user.</p>
  
  <p>Is there a option to run it on logged users using CMD command or else?</p>