title: How can I try to connect a networkprinter and output a text saying if the connecting was succesfull or not?(powershell)
body: <p>How can I try to connect a networkprinter and output a text saying if the connecting was succesfull or not? I connected my printer with <code>Add-Printer</code> and now want to check and output a text saying if the connection was succesfull or not. If the connection was unsuccesfull it should try again twice.</p>
  
  <p>Thanks for the help.</p>