title: How do I kill a PowerShell script that is invoked from a Python GUI?
body: <p>How do I kill a PowerShell script that is invoked from a Python GUI? Once the script is executed, I get an empty Powershell window.</p>
  
  <p>I have been adding cmdlets such as "exit" and "Stop-Process -Name powershell" with no success to my script. Also, the script's only purpose is to add a printer to my device. </p>
  
  <h2>Python script</h2>
  
  <p><a href="https://i.stack.imgur.com/2gHB5.png" rel="nofollow noreferrer">My Python Script</a></p>
  
  <h2>Powershell Script with Blank Window</h2>
  
  <p><a href="https://i.stack.imgur.com/E3hNk.png" rel="nofollow noreferrer">Blank PS Window with script that is being run</a></p>
  
  <p>The script successfully adds the printer, however this annoying PS window stays on my screen. </p>