SQL Query to get server IP address

Here is how;

SELECT  
   CONNECTIONPROPERTY('net_transport') AS net_transport,
   CONNECTIONPROPERTY('protocol_type') AS protocol_type,
   CONNECTIONPROPERTY('auth_scheme') AS auth_scheme,
   CONNECTIONPROPERTY('local_net_address') AS local_net_address,
   CONNECTIONPROPERTY('local_tcp_port') AS local_tcp_port,
   CONNECTIONPROPERTY('client_net_address') AS client_net_address 

Reference

https://stackoverflow.com/questions/142142/sql-query-to-get-servers-ip-address#:~:text=To%20do%20this%2C%20create%20a,ll%20get%20the%20IP%20address.

Color Temperature & Brightness Level of Philips Hue Scenes

Assuming we’re talking about the gen 3 A19 white and color ambiance bulb:

SceneColor temp (K)Brightness (lumens)
Relax2237~200*
Read2890~570
Concentrate4291~800
Energize6410~550

*The Relax scene is 56% brightness. Lumens calculated by multiplying brightness at 2000K (342 lm) by 0.56.

And then for the gen 3 A19 white only bulb:

SceneColor temp (K)Brightness (lumens)
Bright2700840
Dimmed2700~252**
Nightlight2700~84***

**Dimmed is 30% brightness. Lumens calculated by this formula: 840 x 0.30

***Nightlight is 1% brightness, but there is no difference in brightness below 10%. Lumens calculated by this formula: 840 x 0.10

Sources:

https://www2.meethue.com/en-us/p/hue-white-and-color-ambiance-single-bulb-e26/046677530211

Philips Hue bridge (Zigbee) supported lights

How bright are Philips Hue light bulbs?

Philips Hue offers different ranges of brightness in its smart bulbs so that you can get the perfect amount of light for any room in your home. Use this guide to learn more about lumens and smart bulbs, how to convert from lumens to watts, and how to choose the right brightness.

What are lumens?

Lumens measure how much light the human eye can see coming from light source — the brightness of a light bulb, for example. The higher the lumen rating, the brighter the light appears. This measurement is different from watts, which indicate the input power of a light bulb rather than its light output.

Model 1600 : Up to 1521 lumens

The brightest smart bulb from Philips Hue, this range comes in WhiteWhite ambiance, and White and color ambiance. Light up larger areas of your home, such as the garage or kitchen, with bright light for functional tasks, or dim down to set the mood. This range comes in standard A60/A19 bulbs with E26/E27 bases.

Looking for 100 W? If you want a bulb that’s as bright as a 100 W incandescent bulb, this is your pick.

Model 1100 : Up to 1055 lumens

This range offers powerful light in WhiteWhite ambiance, or White and color ambiance that fully illuminates medium-sized spaces, such as hallways — yet can still be dimmed to a low glow. You’ll find this range in standard A60/A19 bulbs with E26/E27 bases. 

Looking for 75 W? When converting lumens to watts, this bulb is the equivalent to a 75 W bulb.

Model 800 : Up to 806 lumens

The most common Philips Hue brightness, the 800 range of Philips Hue bulbs are available in WhiteWhite ambiance, and White and color ambiance. You’ll see this in the standard shape (A60/A19) and base (E26/E27). 

Looking for 60 W? This bulb is equal to how many lumens are in an incandescent 60-watt bulb.

Read more here

Azure PowerShell and Azure CLI

It’s impossible to memorize all commands in PowerShell and Azure CLI. Good news is that Microsoft follows a standard pattern

Open this page;

https://learn.microsoft.com/en-us/cli/azure/reference-index?view=azure-cli-latest

If we look at Azure CLI command for Virtual Machine, they follow this naming convention;

az vm list
az vm create
az vm delete

Azure CLI start with az vm and a verb. another example is;

az keyvault list
az keyvault create
az keyvault delete

for a more complicated example;

az network vnet list
az network vnet create
az network vnet delete

In above example vnet is a sub-component of netowrk. another example is;

az network vnet subnet list
az network vnet subnet create
az network vnt subnet delete

Where subnet is a sub-component of vnet and vnet is a sub-component of network.

Let’s go over PowerShell now;

https://learn.microsoft.com/en-us/powershell/module/az.keyvault/new-azkeyvault?view=azps-12.0.0

Get-AzVM
New-AzVM
Remove-AzVM

Verb is the first part of the word.

Get-AzVirtualNetwork
New-AzVirtualNetwork
Remove-AzVirtualNetwork
Get-AzVirtualNetworkSubnetConfig
New-AzVirtualNetworkSubnetConfig
Remove-AzVirtualNetworkSubnetConfig

Standard PowerShell that comes with windows doesn’t work. We need to upgrade it to PowerShell7 which is a cross-plateform scripting engine. There are 3 Azure specific modules for PowerShell that we need to install (We can avoid to install anything by using Azure Cloud shell);

For demo purpose, I am using Azure Cloud shell. The advantage is that i don’t need to login to my account because i am already logged in to Azure Portal. The response that i will get here is JSON formatted.

PowerShell

Microsoft has switched from old “Azure RM” to “Az” module. They don’t run side by side. To install a new AZ Module, run this command;

Run as administrator

Install-Module -Name Az-AllowClobber -Repository PSGallery -Force

To update module if you have already installed it;

Run as administrator
Update-Module -Name Az -AllowClobber -Repository PSGallery

To connect to Azure from workstation, use this command in PowerShell terminal;

connect-AzAccount -TenantId {GUID} (We don't need curly brackets)

To check latest version of PowerShell, follow this link;

To view installed Az module, use this command;

Get-InstalledModule -Name Az -AllVersions | Select-Object -Property Name, Version

This will list down Name and Version of Az Module. My list has Az Version 8.1.0 installed.

To list my web app, run this command in PowerShell terminal

Get-AzWebApp

To get a shorter version of output, run this command;

Get-AzWebApp | Select-Object Name, Location | ConvertTo-CSV -NoTypeInformation