Month April 2018

Windows 10 language settings with PowerShell

Language settings in Windows 10 is a little more complicated than just setting the display language and keyboard input. Let me explain further. Region settings The region settings control a number of things. If you change the language here, you will also change “cultural” properties such as date format, currency, number formatting and so on. These settings are linked together with the region language. That means you can’t have English display language and Danish currency and time format. Because if you change the region to English you will also get English cultural settings. 😲 Stupid right? Note: this behavior may have changed in Windows 10 1903, but I have not tested this thoroughly. This is super frustrating for those who would like to have Windows in English, but different region settings. The solution is a simple PowerShell command: As the documentation says, this disables the action of dynamically setting the “culture” for the current user based on changes to the Windows display language. So now you can set the region in one of two ways. You can either set the region with the cmdlet: or you can edit the region language in Control Panel – > Region. Display language and keyboard language In Windows 10 there is also something called “language lists“. Languages in Windows 10 can be a little more complicated than just setting the right display language and keyboard language. I mean, if you think about it… Switzerland, for example, has four national languages; German, French, Italian and Romansh. People living in the cities Canton of Valais, Fribourg, and Bern are bilingual (speaking French and German), while Canton Graubünden is trilingual (German, Romansh and Italian). So what language settings would you use in Switzerland? My point here is that although you may have one main language, you might […]

Remove automapping for a shared mailbox in Office 365

In short, there is no simple way to remove automapping from a shared mailbox in Office 365 unfortunately. But there is a more tedious way 😉 First remove the user from the mailbox, then re-add the user without automapping enabled. Fire up PowerShell and connect to your Office 365 tenant with: Remove the user from the shared mailbox delegation: Remove-MailboxPermission -Identity shared.mail@example.com -User user.mail@example.com -AccessRights FullAccess Then add the user to the shared mailbox delegation again, without automapping: Add-MailboxPermission -Identity shared.mail@example.com -User user.mail@example.com -AccessRight FullAccess -InheritanceType All -Automapping $false If you need to give the user send as permission too you can do: Sources: https://support.microsoft.com/en-us/help/2646504/how-to-remove-automapping-for-a-shared-mailbox-in-office-365

Edit user accounts with the command line in Windows 10

Add an admin account with password “123abc”: Make the account administrator: Add a domain user to the domain administrator group Activate the hidden administrator account: Change password for the hidden administrator account Activate the guest user account: Create a new user without a password: Change the password of a user: Delete a user account You will have to manually delete the user folder after deleting the account.

pip install directly from Github with Python 3

A lot of python libraries are more often updated on GitHub than in the “Python Package Index”. So if you want to get the latest of the greatest Python repository you should install Python packages directly from Github instead of PyPi. First, you need to install Git and then add it to PATH, if you are running Windows. Then simply install any Python package from GitHub like so: Of course, you will have to replace https://github.com/rg3/youtube-dl.git with the location of your package.

List of Windows Run commands

You can use these commands to run certain Windows settings directly from either Run or Start just by typing them in and hitting Enter. Super handy if you are working with a Windows installation in a foreign language 😉 Function…

WinRAR archiver script

This script will make an archive of all files in a source folder. Furthermore, it will add a date stamp to the file name of the archive. @echo off set rardirectory="C:\Program Files\WinRAR\Rar.exe" set source=%AppData% set destination="C:\Users\admin\Desktop\" if not exist %destination% mkdir %destination% %rardirectory% -dh -r a -agYYYY-MM-DD-HH-MM-SS %destination% %source% -ep1 -r -m5 You will have to install WinRAR first, and set the appropriate file paths for the script to work. Make sure you replace the source and destination path. You might also need to set the right path to rar.exe if you have a different path. I also noticed that you might need to include a backslash \ after the folder name to make it work. I guess this is just an attempt at a very primitive version control 😜 You can get more commands and information by opening WinRAR -> Help -> Help topics -> Command line mode