parameters: (command, close_on_exit=False, no_window=False)
docstring: Runs the given command in a new PowerShell session.
docstring_summary: Runs the given command in a new PowerShell session.
docstring_tokens: Runs the given command in a new PowerShell session .
function: def ps_run(command, close_on_exit=False, no_window=False):
      """
      Runs the given command in a new PowerShell session.
      """
      if no_window:
          flags = subprocess.CREATE_NO_WINDOW | subprocess.DETACHED_PROCESS
          subprocess.Popen(command, close_fds=True, creationflags=flags)
      else:
          if close_on_exit:
              subprocess.Popen(["powershell", "start", "powershell", "{", "-Command", '"{}"}}'.format(command)])
          else:
              subprocess.Popen(["powershell", "start", "powershell", "{-NoExit", "-Command", '"{}"}}'.format(command)])
function_tokens: def ps_run ( command , close_on_exit = False , no_window = False ) : if no_window : flags = subprocess . CREATE_NO_WINDOW | subprocess . DETACHED_PROCESS subprocess . Popen ( command , close_fds = True , creationflags = flags ) else : if close_on_exit : subprocess . Popen ( [ "powershell" , "start" , "powershell" , "{" , "-Command" , '"{}"}}' . format ( command ) ] ) else : subprocess . Popen ( [ "powershell" , "start" , "powershell" , "{-NoExit" , "-Command" , '"{}"}}' . format ( command ) ] )