Get-PrintConfiguration doesnt seem to work

0

I am trying to use Get-PrintConfiguration on a networked printer but for some reason it returns this error

Get-PrintConfiguration : The specified printer was not found. At
line:1 char:1
+ Get-PrintConfiguration -PrinterName "Printer1"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_PrinterConfiguration:ROOT/StandardCi...erConfiguration) [Get-PrintConfiguration], CimException + FullyQualifiedErrorId : HRESULT 0x80070709,Get-PrintConfiguration

Is there something I am missing? The Printer name is correct and im somewhat confident the syntax is correct.

powershell
printing
configuration
asked on Stack Overflow Nov 7, 2016 by IcantCode • edited Nov 7, 2016 by Nkosi

1 Answer

1

Edit: I just noticed the second line. If you're specifying a printer name by concatenating multiple strings, be sure to surround the concatenations with parenthese. Example:

Get-PrinterConfiguration -PrinterName ("Printer1" + "-PC1")

Hope some of this helps.

Original: Only posting this as an answer since I don't have enough reputation to make a comment, but in order to get a proper answer, could you provide more details, please? Perhaps a code/script example?

This worked for me to get a network printer configuration

Get-Printer | Where-Object -Property 'Name' -EQ 'Sharp MX-4140N' | Get-PrintConfiguration

PrinterName     ComputerName    Collate    Color      DuplexingMode       
-----------     ------------    -------    -----      -------------       
Sharp MX-4140N                  True       True       OneSided           

Note: computer name blanked intentionally.

answered on Stack Overflow Nov 7, 2016 by jessenich • edited Nov 7, 2016 by jessenich

User contributions licensed under CC BY-SA 3.0