Answer the question
In order to leave comments, you need to log in
How to change the print server for a network printer?
The task is as follows, it is necessary to change the address of the print server through which printing is performed on the users' PC, without deleting the printers. I thought to do it through PowerShell, but I don't understand how to change the registry setting in the "HKEY_CURRENT_USER\Printers\Connections\,,PrintServer,Printer" Server branch.
Get-ChildItem -path ‘HKCU:\Printers\Connections’ -recurse -ErrorAction SilentlyContinue
Answer the question
In order to leave comments, you need to log in
in addition to Get-Printer , there is Set-Printer and much more
PS> Get-Command -Module PrintManagement
Add-Printer
Add-PrinterDriver
Add-PrinterPort
Get-PrintConfiguration
Get-Printer
Get-PrinterDriver
Get-PrinterPort
Get-PrinterProperty
Get-PrintJob
Read-PrinterNfcTag
Remove-Printer
Remove-PrinterDriver
Remove-PrinterPort
Remove-PrintJob
Rename-Printer
Restart-PrintJob
Resume-PrintJob
Set-PrintConfiguration
Set-Printer
Set-PrinterProperty
Suspend-PrintJob
Write-PrinterNfcTag
$arr = array(
'title' => 'This is Title',
'content' => 'This is Content'
);
$new_arr = array();
foreach($arr as $key => $value){
$new_arr['{{'.$key.'}}'] = $value;
}
print_r($new_arr);
And you can get a little twisted :)
function bracket($n) {
return '{{'.$n.'}}';
}
$new = array_flip(array_map("bracket", array_flip($old)));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question