Hello,
I want to be able to write a script that will allow a barcode scanner to scan barcodes with powershell.
Where do I begin? Any help would be greatly appreciated.
Thank you!
Hello,
I want to be able to write a script that will allow a barcode scanner to scan barcodes with powershell.
Where do I begin? Any help would be greatly appreciated.
Thank you!
Hi, welcome to the forum
Barcode scanners don’t usually do anything particulary special, they just send a stream of text to the computer. A PowerShell prompt should be able to receive that input stream just the same as if you typed it in from the keyboard.
In its most basic form:
$barcode = Read-Host 'Scan a barcode:'
# <scanner beepy noise>
Write-Host "Barcode: $barcode"
Thank you for the quick reply. Was much easier than I expected. Appreciate your help.