title: open and print a file from a specific application
body: <p>As I have no experience in powershell i need your assistance. I want to open a file from an application, print the file and close the application. This is what I have tried so far:</p>
  <p>Invoke-Item $filelocation <code>$filelocation = 'C:\Users\Public\Documents\RSView Enterprise\SE\HMI Projects\printer\DLGLOG\print\2021 10 30 0000 (Float).DAT' Invoke-Item $filelocation </code>
  what I did is make the application the default application for DAT files and I can open the file directly. I have also tried the Out-Printer but with no luck. Does anyone know what commands should I use to simulate the mouse click on Print and then the OK button?</p>