I’m trying to update the printer port for multiple printers on multiple servers in a cluster. The cluster is for specific software which sends print jobs to its own printers. Each of the printers are configured using local ports that point to the ‘real’ print server. The local port looks like “\old\printer” for each of the printers.
I’d like to update them in PowerShell but I keep running into issues.
Currently I’m trying to add a new printer port to each of the printers like this.
I have no printers to test with sorry, but this error tells me it doesn’t know what parameter set to use based on the provided parameters. I’d say it’s typically best practice to specify a parameter name for each and not rely on positional parameters, as it makes it clearer when you are writing what parameters you are passing.
Also you may want to set the name in a var prior to actually doing it in the command
Take a look at each section under syntax. those are your parameter sets. It might be that you’re trying to set the name up in the command and then set it to the var in the second part, so not 100% sure what you’re attempting there