Hello, dear Colleagues.
User with administrators rights cannot change printer properties on "Advanced" tab from "Devices and Printers" on Windows Server 2012 R2.
If to launch "Devices and Printers" on server, all printer properties on "Advanced" tab are inactive (see screen below).
But I can change it manually with "Print Management". Features become active.
The main purpose - to uncheck "Enable advanced printing features" with powershell scripts.
$erroractionpreference = "continue" $colPrinters = Get-Wmiobject -Class win32_printer -computername print_server -Filter "Name like 'printer1' or Name like 'printer2' or Name like 'printer3' or Name like 'printer4' or Name like 'printer5' or Name like 'printer6'" # get printers on server and filter with names ForEach ($objPrinter in $colPrinters) { # get printer details from WMI If ($objPrinter.RawOnly -ne "True") { # check that Advanced printing fetaures is turned on Write-host $objPrinter.Name Write-Host $objPrinter.RawOnly $objPrinter.RawOnly = "True" # Untick and update the object in WMI $objPrinter.Put() } }
It works on Windows 7 workstation, but does not on print server Windows Server 2012 R2 with error
Exception calling "Put" with "0" argument(s): "Generic failure " At \\print_server\c$\DisableAdvancedPrintingFeatures.ps1:8 char:17+ $objPrinter.Put()+ ~~~~~~~~~~~~~~~~~+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException+ FullyQualifiedErrorId : DotNetMethodException
Can you help me with that? Look like somethings with rights.
Thank you.