Problem scenario
When running a PowerShell script, you receive the error "Unable to initialize device PRN."
Solution
Use the "echo" reserved word instead of "print".
PRN is what the Windows system name for printer (according to this external posting).
Optional: If you want to buy a book on PowerShell, click here; you may also want to click here and search for "PowerShell".
if you use “if” in powershell, don’t write -match in if, write “-imatch”
You may want to read https://stackoverflow.com/questions/67451141/if-match-is-case-insensitive-why-do-we-need-imatch
Worked