question

FrancescoSTremamunno-1333 avatar image
0 Votes"
FrancescoSTremamunno-1333 asked FrancescoSTremamunno-1333 answered

Powershell Get-Printer

I'm wondering why, if I use in powershell the command Get-Printer I get all the printers installed on server, but if I use Get-Printer -name '008 - SRM [A06]', I get nothing.
But if I use the same command on 'Microsoft XPS Document Writer' all the details appear.
84004-image.png




Therefore I suppose that this error is preventing me from updating massivily the printer drivers.

windows-server-powershell
image.png (148.2 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,
Is there any update? Have you got a chance to verify the below suggestions?
Please feel free to let us know if more assistance is needed. If the reply is helpful, please “Accept Answer” to help other community members find it more easily.

0 Votes 0 ·
IanXue-MSFT avatar image
1 Vote"
IanXue-MSFT answered IanXue-MSFT edited

Hi,

You have to prepend the escape character to the square brackets.

 Get-Printer -name '008 - SRM `[A06`]'

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

FrancescoSTremamunno-1333 avatar image
0 Votes"
FrancescoSTremamunno-1333 answered

Sorry for the late reply, I've been off for some days.
It's working.
I can get all the information I need and update drivers as well.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.