How to remotely restart network HP printer from command line

 

Are two ways . One uses ftp command , and second   query with command snmpset. I will describe second one because is easier  to use it with mRemote NG.

Easy way to restart printer is send SNMPT codes via command line  , which is available for Windows and Linux.

This command will sent to the printer query which will force printer restart.

snmpset -v 1 -c public PRINTER_IP ".1.3.6.1.2.1.43.5.1.1.3.1." i 4

snmpset is a part of tools available at : http://net-snmp.sourceforge.net/

Many times tested, always worked.

Windows 10 bash – configuration for proxy connection

Bash in Windows 10   normally works in non proxied network. But what if system is configured to make connection via not transparent proxy  for example your.proxy:8080 . It will refuse connection when you gonna try use apt-get command. To fix this problem, proxy must be configured for updates by editing file „/etc/apt/apt.conf.d/01proxy” . I prefer nano  so it will be

nano /etc/apt/apt.conf.d/01proxy

Where you need to add line :

Acquire::http::Proxy "http://your.proxy:8080";

And after saving  you will be able to make updates and install packaged.

How to change keyboard and region settings from command line .

If installed system has not national settings like time zone, keyboard type or currency configured by default during system installation, it must be done before user start complain on it . So it can be done via windows gui, and command line which is easier to repeat on each PC via GP or batch file.

Settings can be set by executing command line :

control.exe intl.cpl,,/f:”P:\IT\lang\localepl.xml”

where „P:\IT\lang\localepl.xml” is localization of the file which contains  code :

<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
<gs:UserList>
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
</gs:UserList>
<!--Location Preferences-->
<gs:LocationPreferences>
<gs:GeoID Value="191"/>
</gs:LocationPreferences>
<gs:InputPreferences>
<!--pl-PL--><gs:InputLanguageID Action="add" ID="0415:00000415" Default="true"/>
<!--pl-PL--><gs:InputLanguageID Action="add" ID="0415:00000415"/>
</gs:InputPreferences>
<!-- user locale -->
 <gs:UserLocale>
  <gs:Locale Name="pl-PL" SetAsCurrent="true" ResetAllSettings="true"/>
 </gs:UserLocale>
<!-- system locale -->
<gs:SystemLocale Name="pl-PL" />
</gs:GlobalizationServices>

full description at:

https://support.microsoft.com/pl-pl/help/2764405/how-to-automate-regional-and-language-settings-in-windows-vista,-windows-server-2008,-windows-7-and-in-windows-server-2008-r2

and

https://msdn.microsoft.com/en-us/goglobal/bb964650

Shortly:

I used there

<gs:GeoID Value="191"/>

Which belongs to PL  full list of codes fo other countries can be found at:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd374073%28v=vs.85%29.aspx

It will set timezone and currency for your country.

<!--pl-PL--><gs:InputLanguageID Action="add" ID="0415:00000415" Default="true"/>
<!--pl-PL--><gs:InputLanguageID Action="add" ID="0415:00000415"/>

Added polish programmers keyboard and configured it as default.

List available keyb codes for other countries at :
https://technet.microsoft.com/en-us/library/hh825682.aspx

Please remember using this XML entity does NOT install the display languages. It should only be used for selecting display languages after they have been installed.

When you execute described command , logging  off user may be needed.