>NULL

Friday, 24 November 2023

Get a list of user SIDs in CMD

 There are plenty of complex queries for this task but the simplest way to get a user's SID is just to list them all. 

wmic useraccount get name,sid


 

Tuesday, 21 November 2023

Start menu stops working in Windows Server 2019 & 2022

 You find that the Start button does nothing when left-clicked, you still get the Win+X menu when right-clicking.

This article has a great writeup. I have found the solution does work, although users will see a delay when logging off.

https://www.phy2vir.com/windows-server-2016-2019-rds-server-black-screen-or-start-menu-not-working/

If you are fully patched add the following reg key.

Add “DeleteUserAppContainersOnLogoff” (DWORD) in “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy” and set it to 1. 

It's worth reading the whole article linked above as it explains the issue better and there is a script which can help with removing extra firewall rules that contribute to the issue.


Monday, 16 October 2023

Non RDS, RDP Certificate Install

To get rid of the yellow untrusted warning when connecting to RDP. 

1, Install the cert via MMC.

2, In PowerShell run the following.
Get-Childitem Cert:\LocalMachine\My

 

3, Copy the Thumbprint and run the following replacing the word 'Thumbprint' without spaces or extra character at the beginning.

wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="Thumbprint"

Monday, 2 October 2023

Cannot replace TLS/SSL Certificate on Microsoft Dynamics BC or NAV

If you get the following error when setting a new thumbprint on a BC/NAV instance:
SSL Certificate add failed, Error: 183 Cannot create a file when that file already exists
The answer is to note down the port number in the error then use it with this command to remove the existing certificate mapping. (replace 443 with the port from the error message.)
netsh http delete sslcert ipport=0.0.0.0:443
You can now set and save the new thumbprint in your instance configuration.

Friday, 25 August 2023

List installed certificates and their thumbprints in PowerShell

Enter the following to list installed certificates and their thumbprints in PowerShell
Get-ChildItem -Path Cert:LocalMachine\MY

Wednesday, 16 August 2023

Find install dates of apps in Windows from CMD

Simply run the following.
wmic product get Description,InstallDate

Wednesday, 26 April 2023

Clearing a stuck RDS session, session stuck logging off etc

On the session host, first I run query session to get a list of session IDs.

Then run query process /ID:XX where XX is the session ID number to find processes running in the session.

Then go to task manager and click the details tab look up the PID (process ID) and 'end task' on each process in the stuck session until it logs off.


Monday, 6 February 2023

Using PowerShell to find when domain users last set their password

 A simple one, enter the following into PowerShell running as a domain admin to export a list of domain users with the date they last set a password and if their password is set to expire.


Get-ADUser -filter * -properties passwordlastset, passwordneverexpires | sort-object name | select-object Name, passwordlastset, passwordneverexpires | Export-csv -path c:\PassLastSet.csv


You can of course also use CMD. Which is much simpler and easy to remember.

Net User Username



Friday, 20 January 2023

Move Outlook Navigation Toolbar Back to Bottom From Side

 In a recent update of Office 365 applications the Outlook toolbar that switches between email, calendar and contacts was moved from the bottom-left to the top-left of the main window.

Here's how to move it back.


  1. Open regedit

  2. Go to the following registry key
    Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\ExperimentEcs\Overrides

    If you have the ‘Microsoft.Office.Outlook.Hub.HubBar’ string value and set it to ‘false’.
    Then click OK and restart Outlook.

    If  “Microsoft.Office.Outlook.Hub.HubBar” doesn’t exist, create it by right-clicking on Overrides in the left pane and selecting New, String Value then name it “Microsoft.Office.Outlook.Hub.HubBar”
    Set the value to 'false'

  3. Close and restart Outlook


Friday, 30 December 2022

Restoring an Azure VM to earlier disk state from backups (unmanaged disks)

Restore the disks from backup and use Storage Browser in the Azure Portal to place them where you want them, please note they will restore to the root of your Storage Account.

Open Cloud Shell in the Azure Portal and use the following commands to set variables, read the VM configuration, and update the VM configuration with the new OS disk location. 


# Variables for you to fill in

$ResourceGroup = 'RG-Classic'

$VMname = 'winclassic'


#Get the VM config to a variable

$VM = Get-AzVM –Name $VMname –ResourceGroupName $ResourceGroup


#Stop and deallocate the VM

Stop-AzVM –Name $VM.Name –ResourceGroupName $VM.ResourceGroupName –Force


#Swap out the OS disk using the VM variable

$VM.StorageProfile.OsDisk.Vhd.Uri = 'https://rgunmanageddisknew.blob.core.windows.net/vhds/rhclassic-os-2317.vhd' #example, use your new OS disk uri


#Update the VM configuration

Update-AzVM –VM $VM –ResourceGroupName $ResourceGroup


You can now verify the disk location has changed by clicking on the disk in the VM/Disks section and looking at the location.

Data disks can be swapped out within the Azure Portal GUI.


Tuesday, 2 August 2022

What is BTWifi-X and how to make your BT mobile automatically login to BTWifi

I've always wondered what BTWifi-X was for, you see it wherever there is a BT router. Turns out it's for the BTWifi app. 

The other day I was on the London Underground and saw there was free Wifi, once above ground I checked and BT mobile customers can follow some steps to get connected.

https://www.bt.com/help/mobile/getting-set-up/london-underground

  1. Make sure your wi-fi is switched on.
  2. Choose EE WiFi-Auto from the available networks.
  3. Once selected, change your EAP method from PEAP to SIM.
  4. Select Connect.

How about we combine the two. Yes! The method BT give for connecting to Wifi on the Underground also works for BTWifi-X as long as you have a BT SIM. A big advantage of this over the app is that it automatically connects you and seems quite reliable in the few weeks since I discovered this.



Friday, 29 July 2022

TLS Error in Jet Reports

Error: 

The data source is not properly configured for Office 365 authentication.

You are using TLS version 1.0, 1.1 and/or 3DES cipher which are depreciated to improve the security posture of Azure AD.

 


Solution:

After some back and forth we found the addition of the following reg keys resolved this. Run the following in an elevated PowerShell on the client computer.

Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord

Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type Dword