Author Posts

July 26, 2014 at 4:45 pm

I have a weird question. Can you modify object properties. the command

Get-PrinterPort 192.* | fl *

prints out all the attributes of the printer port. but I can't modify them. I don't want to create a new port and start from scratch, just modify the existing object. Or maybe export the export and then import it, modified, into the new one.

July 26, 2014 at 7:16 pm

Well, normally you can, but this appears to be an exception to the rule. Get-PrinterPort returns a CIM object of type MSFT_PrinterPort (or one of a number of subtypes). I've tried several methods of modifying these ports through WMI (including through the older Win32_TCPIPPrinterPort class), and none of them seem to work. What's odd is that you can modify the properties of printer ports through the GUI (which means it's possible via the Win32 API, most likely). Not sure why they chose to leave that functionality out of the WMI classes.

Which property are you trying to modify?

July 26, 2014 at 8:47 pm

[blockquote]Which property are you trying to modify?[/blockquote]

the ip address and the name

July 27, 2014 at 6:53 am

try this script [url]http://superwidgets.wordpress.com/2014/07/27/powershell-script-to-change-printer-ip-address/[/url]