Problem:The following packages have been kept back: docker-io

On one of my docker host with Ubuntu 16.04 running apt-get upgrade I receive the message:

The following packages have been kept back: docker-io

then to upgrade one or all of the kept-back packages, without doing a distribution upgrade (dist-upgrade can be quite dangerous) is to issue the command:

apt-get install <list of packages kept back>

this will resolve the kept-back issues and will ask to install additional packages and dependencies.

SMS Concatenation

Technically you can concatenate up to 255 SMS but it’s common to find that a message with more that 480 characters (3 SMS) is converted to an MMS; at least this happens on Samsung A3.

The conversion from SMS to MMS can be avoided by selecting Options > Sending options > Message type > Text when in the Text message window writing the message. The message is then always sent as SMS text message and no conversion to MMS occurs.

Via: https://en.wikipedia.org/wiki/Concatenated_SMS

How to use Portable Visual Studio Code and GIT

I started to use Visual Studio Code as my primary Editor tool. I used portable version of Visual Studio Code and GIT to avoid installation and be able to quickly use different machines. For this purpose I also prefered to use “Workspace Settings” instead of “User Settings” in Visual Studio Code.

Download and install Visual Studio Code Portable from https://github.com/garethflowers/vscode-portable

Download and install Git Portable from https://github.com/sheabunge/GitPortable

Open Visual Studio Code and create a “Workspace Settings” with path to portable GIT and in my case Proxy Settings:

// Place your settings in this file to overwrite default and user settings.
{
    // The proxy setting to use. If not set will be taken from the http_proxy and https_proxy environment variables
    "http.proxy": "http://192.168.1.1:80",

    // Path to the git executable
    "git.path": "C:\\Data\\GitPortable\\App\\Git\\Bin\\git.exe"
}

If you develop in powershell with this repository make sense to add Powershell Extension (https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell) and configure powershell as integrated terminal:

// 64-bit PowerShell if available, otherwise 32-bit
"terminal.integrated.shell.windows":"C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"

Open Visual Studio Code and initialize a GIT repository

VisualStudioCode_Git_Initialize

Open GIT Portable, go to local repository path and config GIT repository:

git remote add origin https://mygitserver.com/_git/mygitrepository
git config http.proxy "<a href="http://192.168.1.1:80">http://185.46.212.34:80</a>"
git config user.email "myemail@mydomain.com"
git config credential.helper wincred

Check also http://www.theregister.co.uk/2015/12/07/visual_studio_code_git_integration/ to use Visual Studio Team Service as a provider.

How to Manage Firefox settings

Firefox is not our primary browser but I had to find a solution for changing the homepage settings on all our clients.

I explored how to manage Firefox via GPO. There is a Plugin for that (https://sourceforge.net/projects/mozillagpo/) but you should deploy this plugin on all clients.

Then i tried to use a central web server to deploy settings to all our clients.

First create a file with settings to deploy: autoadmin.js and publish it on a web server.
Then Execute on all your clients the script Invoke_FirefoxAutoconfig.cmd for configure the browser to download the settings from your central web server every time the browser is started.

Before deploy the script and the autoadmin.js file, change the settings according to your preferences and your environment:

on autoadmin.js change “browser.startup.homepage” with the correct homepage to deploy. Keep in mind that there is also a IF-ELSE Statement that deploy different homepages based on account name. You can remove it if not needed.

on Invoke_FirefoxAutoconfig.cmd adjust the path where Firefox is installed: on my case “%ProgramFiles(x86)%\Mozilla Firefox\”

 


 

If you want to deploy only homepage setting without use Central Enterprise Configuration, this is a script to deploy to all users (at logon or via GPO) that change the settings only to current user and do not require admin rights.

VIA: https://bitbucket.org/remyservices/powershell-firefoxpref/wiki/Home
http://stackoverflow.com/questions/10043616/programmatically-set-the-default-homepage-for-mozilla-firefox
http://web.mit.edu/~firefox/www/maintainers/autoconfig.html

How to use Windows Photo Viewer on Windows 10

On Windows 10, Windows Photo Viewer by default is used only for open .tif and .tiff files. All the other graphic files (jpe, png, bmp, gif, ico, etc.) are opened with Photos App.

To open with Windows Photo Viewer also for example .jpe files add this reg key:

HKLM\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations\.jpe

and set REG_SZ value to: PhotoViewer.FileAssoc.Tiff

WindowsPhotoViewer_Reg

This can be easily deployed with GPO Preferences.

Here an example of what you can associate to Windows Photo Viewer

“.bmp”=”PhotoViewer.FileAssoc.Tiff”
“.dib”=”PhotoViewer.FileAssoc.Tiff”
“.gif”=”PhotoViewer.FileAssoc.Tiff”
“.jfif”=”PhotoViewer.FileAssoc.Tiff”
“.jpe”=”PhotoViewer.FileAssoc.Tiff”
“.jpeg”=”PhotoViewer.FileAssoc.Tiff”
“.jpg”=”PhotoViewer.FileAssoc.Tiff”
“.jxr”=”PhotoViewer.FileAssoc.Tiff”
“.png”=”PhotoViewer.FileAssoc.Tiff”

How to solve Know Issue on MS16-072

Microsoft release MS16-072: Security update for Group Policy: June 14, 2016

MS16-072 changes the security context with which user group policies are retrieved. This by-design behavior change protects customers’ computers from a security vulnerability. Before MS16-072 is installed, user group policies were retrieved by using the user’s security context. After MS16-072 is installed, user group policies are retrieved by using the computer’s security context.

The issue was that all user Group Policy, including those that have been security filtered on user accounts or security groups, or both, may fail to apply on domain joined computers if the Group Policy Object is missing the Read permissions for the Authenticated Users group or if you are using security filtering and are missing Read permissions for the domain computers group.

Resolution:
To resolve this issue, use the Group Policy Management Console (GPMC.MSC) and follow one of the following steps:

  • Add the Authenticated Users group with Read Permissions on the Group Policy Object (GPO).
  • If you are using security filtering, add the Domain Computers group with read permission.

 

Doing that manually it’s a nightmare… but powershell can help. With this script you can deploy ‘Read’ permission for “Authenticated Users” on all GPOs or only where needed because “Domain Computers” group with ‘read’ permission and/or it’s a “Per-User Setting” GPO. If you what to be restrictive, enable -checkDomainComputer and -checkPerUserSetting.

Via: https://support.microsoft.com/en-us/kb/3163622

How to Select an AD query on Powershell without AD cmdlets

I’m working on a script that should run on machines without powershell AD module, so I used objects from “System.DirectoryServices”. Working on that i experienced a bizarre performance problem. “Select-Object” on line 34 perform much better that the one on line 31:

…so I suggest to use Select-Object filtering on line 34