Posts

Showing posts from 2021

Increase border width on hover without moving other content

Image
In this post, I describe how to increase the border thickness when you hover over an element without causing other elements on the page to move around. Cause If you add or increase the border width (top or bottom) of an element, it will increase the height of that element, which can cause other things on the page to move down. Resolution Element does not have a border If your element doesn't already have a border, you can add a transparent border, then change this to a coloured border on hover, for example: .item { border : 1px solid transparent ; }     .item:hover { border-color : red ; } Element has a border There are three ways to add a thicker border on hover if the element already has a border: 1. Reserve space in the element and expand the thicker border into that space.  For example, if you have an a element sized using line-height, you can set the min-height to a slightly bigger value to cater for the thicker border on hover: .item {     line-h...

Filter Windows Event Log by Exception Message

Image
In this post, I describe how you can filter the Windows Event Log by Exception Message.  This allows you to see when and how often a particular exception has occurred. The Get-EventLog PowerShell cmdlet can be used to get all the event log entries with an exception message containing the specified text, for example, the following command gets all the entries containing the text "The process cannot access the file": Get-EventLog -LogName Application | Select Index , TimeGenerated , Message , Source | where {( $_ . Message -like "*The process cannot access the file*" ) -and ( $_ . Source -like "ASP*" )}

The hostname in the website’s security certificate differs from the website you are trying to visit.

Image
In this post, I describe how to fix the error The hostname in the website’s security certificate differs from the website you are trying to visit. Error Code: DLG_FLAGS_SEC_CERT_CN_INVALID This error can occur when you browse to an HTTPS address: Cause This can occur when you have configured an IIS Site Binding to use HTTPS but there is a problem with the certificate you have selected. Resolution To resolve the issue, follow the steps in my other post  Mismatched Address certificate error - HTTPS localhost IIS Related Posts - Mismatched Address certificate error - HTTPS localhost IIS - How to create a self-signed public certificate - Powershell

Mismatched Address certificate error - HTTPS localhost IIS

Image
In this post, I describe how to use HTTPS with SSL on a local IIS development environment without the Mismatched Address certificate error: Cause This error can occur when you use Create Self-Signed Certificate in IIS.  The error says "Mismatched Address" and that the server cannot prove that it is its name. Resolution To resolve the issue, you can use the PowerShell cmdlet  New-SelfSignedCertificate to create the certificates. The following PowerShell code will create the root certificate, then create the SSL certificate signed by the root certificate, then import the root certificate into the Trusted Root Certification Authorities store: # Create the root certificate and store the thumbprint in a variable $thumb = ( New-SelfSignedCertificate -Type "Custom" -KeyExportPolicy "Exportable" -Subject "ROOT" -CertStoreLocation "Cert:\LocalMachine\My" -KeySpec "Signature" -KeyUsage "CertSign" -NotAfter ( Get-Date ) . A...

Chrome address autocomplete covers QuickBooks Country autocomplete

Image
In this post, I describe a quick way to hide the Chrome address autocomplete which can appear and cover over the QuickBooks Country autocomplete, preventing you from selecting the country: If you click out of the textbox, both the Chrome autocomplete and the QuickBooks autocomplete disappear. Resolution If you press Escape whilst both autocompletes are showing, only the Chrome autocomplete disappears, revealing the QuickBooks autocomplete underneath:

Windows 11 God Mode - shortcut to all control panel settings

Image
In this post, I describe how to create a shortcut to all the control panel settings in Windows 11.  This trick also applies to Windows 10, 8 or 7 and has the rather elaborate name "GodMode". To create the shortcut, simply create a Folder in Windows Explorer and give it the name: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} The shortcut will automatically show a control panel icon: Open the shortcut to view all the control panel settings. You can right click a group heading and select Collapse all groups if required.

Bulk rename Windows files with touch-friendly PowerRename

Image
This post describes how you can rename files and folders in bulk in Windows using a tool called PowerRename which has recently been updated with a new touch-friendly interface: Resolution Firstly, you need to download and install  Microsoft PowerToys  v0.49.1 Once installed, in Windows Explorer, select all the files and folders you want to rename and right click, you should see a new option 'PowerRename' in the context menu (if you're using Windows 11, you might need to press Show More Options first): You can then type the text you want to replace in the 'Search for' textbox and the text you want to replace it with in the 'Replace with' textbox. There are various self-explanatory settings with tooltips that you can change to adjust how the text is matched and what the rename will apply to. Pressing the i button inside the 'Replace with' textbox shows some special codes that can be used to replace using file creation date and time: You can see how the...

How long does an electric car battery last?

Image
Yesterday, I read an interesting article on MSN which describes how long an electric car battery lasts. The article covers EV battery warranties which are much better than I thought: Tesla Model S and Model X 8 years or 150,000 miles, whichever comes first. Tesla Model 3 Standard Range / Renault Zoe / Peugeot e-208 8 years or 100,000 miles, whichever comes first. Tesla Model 3 Long Range 8 years or 120,000 miles, whichever comes first. My main worry with an electric car is, like mobile phones and laptops, the battery slowly degrades and hardly lasts any time at all.  It sounds like they should all last at least 8 years and 100,000 miles though which is good. The article also covers how EV batteries degrade and how best to maintain them. Read the full article >

EnforceChangePasswordPolicy in New-AzureADUser and Set-AzureADUserPassword

Image
This post explains what EnforceChangePasswordPolicy does when used as an attribute in a PasswordProfile parameter in New-AzureADUser, or Set-AzureADUserPassword: Documentation The New-AzureADUser documentation says EnforceChangePasswordPolicy is "a boolean indicating that the change password policy is enabled or disabled for this user" . The Set-AzureADUserPassword documentation says "If set to true, force the user to change their password" . Explanation When I set EnforceChangePasswordPolicy to False for a particular Azure AD User, I can logon as that User with just a username and password. If I set EnforceChangePasswordPolicy to True, that User is prompted for more information, even if they are already logged on: After pressing Next, that User is then forced to perform an additional security verification, either using a phone or app:

LG TV move or delete apps and shortcuts on home screen

Image
This post describes how you can move or delete apps and shortcuts on the home screen of an LG TV. Resolution On my LG TV (webOS UK6950PLB), the steps I took to do this were: 1. Press the Home button on the remote control to show the home screen. 2. Press and hold the OK button (the scroll wheel) on the remote control to enter Edit Mode: 3. Use the left and right arrows on the remote control to change the location of the app or shortcut, then press OK to place it. 4. To delete an app or shortcut, ensure you are not moving an app by pressing the down arrow or OK (this reveals the cross icon), then press the up arrow, then OK. Related Posts - LG TV delete/remove/hide channels from guide -  LG TV Clear All Browsing History Data -  LG TV turn off Quick Start in settings

Realistic shadows with depth and elevation in CSS

Image
In this post, I describe how to create realistic shadows with varying depths and elevation in CSS. Low Depth Shadow in CSS Personally, I find a subtle shadow with a low depth to be a nice alternative to using a border to surround an element. This example shadow can be used to give the impression that an element is close to the page with low depth and elevation: box-shadow: rgba(0, 0, 0, 50%) 0.5px 1px 1px; Medium Depth Shadow in CSS A medium depth shadow can be useful to indicate an element has been hovered over. This example shadow can be used to give the impression that an element is further from the page with medium depth and elevation: box-shadow: rgba(0, 0, 0, 38%) 4px 8px 8px; High Depth Shadow in CSS Longer shadows with more depth and elevation can be useful for popup windows. This example shadow can be used to give the impression that an element is far from the page with high depth and elevation: box-shadow: rgba(0, 0, 0, 25%) 8px 16px 16px; Realistic Shadow in CSS To create ev...

Task Manager missing from right click on Taskbar - Windows 11

Image
When you right click the Taskbar in Windows 11, Task Manager is no longer one of the options, the only option is Taskbar settings: This post describes another method to quickly access the Task Manager in Windows 11. Resolution Right click the start button instead of the taskbar to quickly access a shortcut to Task Manager: Alternatively, hover the mouse cursor over the Search icon on the Taskbar, you will see another shortcut to Task Manager: Related Posts -  This PC can't run Windows 11 - VMware Workstation -  Always permanently 'Show more options' right click menu - Windows 11

Sysprep was not able to validate your Windows installation - Windows 11

Image
This post describes how to fix the error: Sysprep was not able to validate your Windows installation. Review the log file at %WINDIR%\System32\Sysprep\Panther\setupact.log for details. After resolving the issue, use Sysprep to validate your installation again. which can occur when you run the System Preparation Tool 3.14 on Windows 11. I've identified two potential causes for this error. Open the Panther folder in the Sysprep directory, copy the setupact.log file out of that directory to open it, then scroll to the bottom to see the error. Package Provisioning Error If the error is as follows: Error SYSPRP Failed to remove apps for the current user: 0x80073cf2. Cause Just above this, you can see a potential cause, in this case it's the Microsoft.OneDriveSync package: SYSPRP Package Microsoft.OneDriveSync_21196.921.7.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image. Resolution I rem...

Something happened, and we couldn't install a feature - Windows

Image
This post describes how to stop the error "Something happened, and we couldn't install a feature" which can popup in the notification action centre on Windows: Cause On my machine, this occurred when Windows tried to install the Microsoft-Windows-LanguageFeatures-Basic-en-gb-Package which failed because I have disabled the Windows Update service. I found this by searching for a CbsPackageServicingFailure2 event in the Application Log in Event Viewer. Resolution I believe this can be resolved by enabling Windows Update. Alternatively, I have tried to resolve the issue by enabling the following group policy setting: Computer Configuration\Administrative Templates\System\Specify settings for optional component installation and component repair And unchecking the 'Never attempt to download payload from Windows Update' and 'Download repair content and optional features directly from Windows Update instead of Windows Server Update Services (WSUS)' checkboxes: Pl...

Always permanently 'Show more options' right click menu - Windows 11

Image
This post describes how you can always permanently 'Show more options' in the right click menu on Windows 11 rather than having to press it every time you right click. Resolution 1. Open regedit and go to: HKEY_CURRENT_USER\SOFTWARE\CLASSES\CLSID\ 2. Create a new Key named: {86ca1aa0-34aa-4e8b-a509-50c905bae2a2} 3. Within that Key, create another new Key named: InprocServer32 4. Within InprocServer32, double click (Default) then press OK to change the Value Data from (value not set) to blank: 5. Sign out then log back in 'Show more options' is now permanently removed from the right click menu and all options are always shown: Related Posts -  Windows 11 God Mode - shortcut to all control panel settings - Where has copy paste gone in the right click menu - Windows 11 -  This PC can't run Windows 11 - VMware Workstation

Where has copy paste gone in the right click menu - Windows 11

Image
This post describes where to find copy and paste in the right click menu on Windows 11. Resolution The Copy button now appears at the top of the right click menu and looks like this: The Paste button also appears at the top of the right click menu: If the right click menu doesn't have those options at the top, even though you have right clicked the folder/file: Left click first, then right click again. This can occur due to a bug in Windows 11 whereby if your right click the empty space in the window before right clicking the folder/file, it still shows the same right click menu. Related Posts -  Always permanently 'Show more options' right click menu - Windows 11 -  This PC can't run Windows 11 - VMware Workstation

This PC can't run Windows 11 - VMware Workstation

Image
This post describes how to fix the error: This PC can't run Windows 11 This PC doesn't meet the minimum system requirements to install this version of Windows. For more information, visit https://aka.ms/WindowsSysReq This error can occur when installing Windows 11 on a virtual machine in VMware Workstation. Cause Windows 11 requires TPM as per the specification:  https://www.microsoft.com/en-us/windows/windows-11-specifications Resolution There are two ways to resolve this issue, either bypass the TPM check or add TPM to the virtual machine : Bypass TPM Check To bypass the TPM check when doing a new, clean install of Windows 11: 1. Go back a step from the "This PC can't run Windows 11" message 2. Press Shift + F10 on the keyboard to open a Command Prompt 3. Type regedit to open the Registry Editor and go to: HKEY_LOCAL_MACHINE\SYSTEM\Setup 4. Create a new Key named: LabConfig 5. Within 'LabConfig', create a new DWORD (32-bit) Value named: BypassTPMCheck A...