Tuesday, December 30, 2025

How to get tenant ID from subscription ID

 1. First run the command below in powershell, substituting the subscription ID into the last line.


function Get-TenantIdFromSubId ($subId) {

    $url = "https://management.azure.com/subscriptions/$($subId)?api-version=2015-01-01"

    try {

        Invoke-WebRequest -Uri $url -Method Get -ErrorAction Stop

    } catch {

        # Extract the Tenant ID from the WWW-Authenticate header in the 401 response

        $authHeader = $_.Exception.Response.Headers["WWW-Authenticate"]

        if ($authHeader -match "https://login.windows.net/([a-f0-9-]+)") {

            return $matches[1]

        }

    }

    return "Tenant not found or ID invalid."

}


# Usage:

Get-TenantIdFromSubId "your-subscription-id-here"


2. After you get your tenant ID, go to the page below to identify the tenant.

https://sub2tenant.com/

Friday, November 14, 2025

ScreenConnect - Adding user with OTP

 Visit the page below to generate the OTP code for a new user in ScreenConnect:


https://docs.connectwise.com/ScreenConnect_Documentation/Get_started/Administration_page/Security_page/Enable_two-factor_authentication_for_host_accounts/Configure_two-factor_authentication_with_Google_Authenticator

Thursday, February 13, 2025

Print Nightmare workaround

 


  • Run an administrative command prompt
  • Copy this command:
    • reg add "HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint" /v RestrictDriverInstallationToAdministrators /t REG_DWORD /d 0 /f
  • You should not need to reboot after doing this, but if you still can't add the printer go ahead and reboot
  • After adding the printer successfully, delete this registry entry and reboot