You are mixing properties from two different WMI classes. Set-PrinterProperty
manipulates instances of the undocumented MSFT_PrinterProperty
class from the root/standardcimv2
namespace, which has different properties than the Win32_Printer
class in your previous command.
Instead, manipulate the desired instance of the Win32_Printer
class since that has the property you want, then call Put()
to commit the change. This works for me when run with elevation:
$printer = Get-WmiObject -Class 'Win32_Printer' -Filter 'Name = ''My Printer Name'''
$printer.EnableBIDI = $false
$printer.Put()
Using the newer CimCmdlets
module you can make that change in similar fashion using the Get-CimInstance
and Set-CimInstance
cmdlets...
$printer = Get-CimInstance -ClassName 'Win32_Printer' -Filter 'Name = ''My Printer Name'''
$printer.EnableBIDI = $false
Set-CimInstance -InputObject $printer
...or simplify it to a single pipeline...
Get-CimInstance -ClassName 'Win32_Printer' -Filter 'Name = ''My Printer Name''' `
| Set-CimInstance -Property @{ EnableBIDI = $false }
...or even simplify it to a single cmdlet invocation...
Set-CimInstance -Query 'SELECT * FROM Win32_Printer WHERE Name = ''My Printer Name''' -Property @{ EnableBIDI = $false }