Windows error 0x80070709, -2147023095

Detailed Error Information

INVALID_PRINTER_NAME[1]

MessageThe printer name is invalid.
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode7 (0x007)
NameFACILITY_WIN32[2][1]
DescriptionThis region is reserved to map undecorated error codes into HRESULTs.[2][1]
Error Code1801 (0x0709)

This is a Win32 error which has been mapped into an HRESULT. More information may be available in error 0x00000709.

Questions

3votes
2answers

Adding Shared Printer to Remote Computer via Powershell

I am unable to run an invoke-command script to install printers on a remote machine. My code works locally, but as soon as I pipe it into Invoke-command, i get errors. Local: $Printer = "\\server1\printer1" (New-Object -Com Wscript.Network).AddWindowsPrinterConnection($Printer) And this adds the printer just fine. I can do this same [...] read more
powershell
printing
0votes
1answer

Add a WSD print via group policy

I have a new wsd capable printer. Users can just discover it on the local network and add it and it works great. How can I push this out to these users with a GPO- so they don't have to discover the printer and add it themselves? I don't want [...] read more
windows
active-directory
group-policy
printer
0votes
1answer

Change Default Printer paper size with PHP powershell script

I am trying to change Default printer paper size from PHP Index.php <?php $printer = Shell_Exec ('powershell.exe -executionpolicy bypass -NoProfile -Command "(Get-WmiObject win32_printer | Where-Object Default -eq $True).Name"'); $printer = substr($printer, 0, -1); $printer = '"' . $printer . '"'; $cmd = ('powershell.exe -executionpolicy bypass -NoProfile -Command ../A5.ps1 ' .$printer); [...] read more
php
powershell
printing
0votes
0answers

Add-Printer -ConnectionName $printer; gives error cannot contain '\' characters. How do I properly use a connection name here?

I have multiple text documents with each line a shared printer in the format: > \\pserver.company.com\printername0 > \\pserver.company.com\printername1 > \\pserver.company.com\printername2 I want to automate the installation of these lists of printers, preferably with PowerShell. My goal is to get the content of the text and for each line add the [...] read more
powershell
network-printers
0votes
2answers

Install Printers from XML Files

I backed up printers from a Windows 10 system to XML files. I'm trying to add them using the Set-Printconfiguration CMDLET, but it seems to be not accepting variables? I've looked everywhere but I cannot find anything saying my syntax is wrong. #get list of printers in backup folder $printerNames [...] read more
powershell
0votes
1answer

Get-PrintConfiguration doesnt seem to work

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 + [...] read more
powershell
printing
configuration
0votes
0answers

adding printer in remote machine is not working: invalid printer name

I have gone through many blogs for finding solution for this issue, but never find a solution. $CompName = "test.domain.com" $Printer = "\\122.21.10.11\PRINTER-NAME-1" Invoke-Command -ComputerName $CompName -Scriptblock { Param($p) (New-Object -Com Wscript.Network).AddWindowsPrinterConnection($p) } -ArgumentList $Printer I have even tried PSRemoting and tried to execute the ps1 file from remote machine. [...] read more
powershell
remoting
network-printers

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0