Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

connect to a print queue

$
0
0

hi all,

I tried add-printer as a cmdlet but realized that it is not available on some computers here and I have the same issue as many people I read posts on this forum. I cannot update those computers with the required items so that add-printer would work without having a 3 - 4 weeks project, which I will start shortly.

until the computers are updated, I would like my script to use the vbscript instead, which is a good workaround until everything is set-up and running.

I wish to use this into my powershell, and was wondering if it was possible? I saw somewhere that I could create a vbscript object into my powershell script but can't recall where I saw that. I do not wish to call the vbscript file, I wish to execute the vbs commands into my powershell script itself.

vbs lines that work today:

Set objNetwork = CreateObject("WScript.Network")
objNetwork.AddWindowsPrinterConnection strUNCPrinter

thank you for the help!


Viewing all articles
Browse latest Browse all 6937

Trending Articles