Azure: Storage-Account

Create a Storage-Account

az storage account create \
  --resource-group RGTEST \
  --name $STORAGE_ACCOUNT_NAME \
  --sku Standard_LRS \
  --location westeurope

retrieve connection string

AZURE_STORAGE_CONNECTION_STRING=$(az storage account show-connection-string \
  --resource-group RGTEST \
  --name $STORAGE_ACCOUNT_NAME \
  --output tsv)

ronald@Azure:~$ echo $AZURE_STORAGE_CONNECTION_STRING
DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=mystorageaccount4108;AccountKey=HlLklNRxLsKRzLw28Tc8W+0MDPv2RON/Stic8Lu1ryu0XiLDizlZRVnpAVwoSkzA==

Retrieve the Storage_key

ronald@Azure:~$ STORAGE_KEY=$(az storage account keys list \
>   --resource-group RGTEST \
>   --account-name $STORAGE_ACCOUNT_NAME \
>   --query "[0].value" \
>   --output tsv)
ronald@Azure:~$ echo $STORAGE_KEY
HlLklNRxLsKRzLw28Tc8W+0MDPv2RONAVwoSkzA==

create a file-share:

az storage share create --name TESTSHARE

Azure CLI: Default-Values for config-Session

In most cases, at least some parameters for a set of CLI-Commands remain the same. Setting those as „default“ saves time and reduces human error.

For example, specify your location and ressource-group exactly one time and never repeat it:

ronald@Azure:~$ az configure --defaults group=RG-TEST location=westeurope

Disclaimer

Since i’m trying to get rid of Evernote, too anoying too often, i’ll start to document non-private-stuff here.

RG_NAME=RG_TEST
LOCATION_NAME=westeurope
az group create --resource-group $RG_NAME --location $LOCATION_NAME

az configure --defaults group=$RG_NAME location=$LOCATION_NAME

Create Cosmos-DB and retrieve Connection-String

Retrieve the Conection-String of the Endpoint:

ronald@Azure:~$ COSMOS_DB_ENDPOINT=$(az cosmosdb create \
>   --resource-group RGTEST \
>   --name $COSMOS_DB_NAME \
>   --query documentEndpoint \
>   --output tsv)

ronald@Azure:~$ echo $COSMOS_DB_ENDPOINT
https://aci-cosmos-db-4711.documents.azure.com:443/

Disclaimer

Since i’m trying to get rid of Evernote, too anoying too often, i’ll start to document non-private-stuff here.

ronald@Azure:~$ COSMOS_DB_MASTERKEY=$(az cosmosdb keys list \
>   --resource-group RGTEST \
>   --name $COSMOS_DB_NAME \
>   --query primaryMasterKey \
>   --output tsv)
ronald@Azure:~$ echo $COSMOS_DB_MASTERKEY
nVcsc0lq5troD9XgUl5RRONXUpaxX0pkK06qmDItkvXAUrRONyJHaasial3G8dajcc6tn6Y12i2D29tKP99CUw==

Disclaimer

Since i’m trying to get rid of Evernote, too anoying too often, i’ll start to document non-private-stuff here.

vSphere vCenter – PowerShell: reliable Connection

From time to time the first try to connect to a vCenter-Server fails, building a simple loop to allow a limited number of retries fixes this possible issue.

$vSphereServer = "vcsa.local"
$vSphereUser = "administrator@vsphere.local"
$vSpherePassword = "********"

$result = @{}

$retries = 6
$viConnection = $null
#
while ($viConnection -eq $null) {
    # My-Logger 'Connecting to Management vCenter Server $vSphereServer ...'
    #
    $error.clear()
    $viConnection = Connect-VIServer $vSphereServer -User $vSphereUser -Password $vSpherePassword -WarningAction SilentlyContinue
    #
    if ($viConnection -eq $null) {
        $retries = $retries - 1
        if ($retries -eq 0) {
            throw ("Connecting to vCenter ($vSphereServer) failed ($vSphereUser): $error")
        }
        Start-Sleep -s 10
    }
}
$result.viConnection = $viConnection

Disclaimer

Since i’m trying to get rid of Evernote, too anoying too often, i’ll start to document non-private-stuff here.

Firefox: „Certificate Viewer“ – How to disable

Firefox 70 added a new „Certificate Viewer“ feature which moves the „Window“-based GUI to a „Web-Page“-View.

  • different look
  • no new features
  • missing features
    • Export Certificate

So this is no „new feature“ but a „modification of an existing feature“ – with less features.

Reenable the former full featureset

about:config
security.aboutcertificate.enabled := false

Disclaimer

Since i’m trying to get rid of Evernote, too anoying too often, i’ll start to document non-private-stuff here.

Firefox: Don’t ignore the Windows Enterprise-CA Store

Not a new Feature for Windows, to use an enterprise CA to create server certificates.

And Firefox added the possibility to trust those certificates ages ago – but still you’ll get an TLS-error-message (in German „Kein Verbindungsversuch unternommen: Mögliches Sicherheitsproblem“).

This is no Security-Problem, it’s just a problem of using stupid defaults causing people to waste their time and providing no little level of security, since a CA operated on my own is much more trustworthy than public CAs which firefox trusts blindly.

Solution

Open

about:config

and change

security.enterprise_roots.enabled := true

Disclaimer

Since i’m trying to get rid of Evernote, too anoying too often, i’ll start to document non-private-stuff here.

New Windows 2019 Jump-Host

Until everything in my lab runs on Terraform, PowerShell will be a valid solution for automation purposes.

Install PowerShell 7

https://docs.microsoft.com/de-de/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-7.1

https://github.com/PowerShell/PowerShell/releases/tag/v7.0.4

Allow Execution of PowerShell-Scripts

Set-ExecutionPolicy Unrestricted

Install Power-CLI

Install-Module -Name VMware.PowerCLI

Allow Self-Signed Certs

[Lab Environment]

Set-PowerCLIConfiguration -InvalidCertificateAction:Ignore

Disclaimer

Since i’m trying to get rid of Evernote, too anoying too often, i’ll start to document non-private-stuff here.

Annoying Firefox-Defaults to be changed

The Firefox-Developers know best what’s good for their users, so they hide a bunch of Settings in

about:config

so it’s hard to find them.

Some of them I change in every Firefox installation:

  • ask me if i want to download MP4-Files, disable the build-in Media-Player
media.play-stand-alone = false
  • use the DNS, not Google – if I enter a single word as URL
keyword.enabled = false
 
 
  • stop asking me if I really want to leave a page
dom.disable_beforeunload := true
 
  • stop autocompletion in the URL-Bar
browser.urlbar.autocomplete.enabled = false
browser.fixup.alternate.enabled = false
browser.fixup.alternate.prefix = (empty)
browser.fixup.alternate.suffix = (empty)
 

accessibility.typeaheadfind.flashBar 0

browser.fixup.alternate.suffix prod.local
browser.fixup.domainwhitelist.wiki true

browser.tabs.warnOnClose false
browser.urlbar.autocomplete.enabled false
network.dns.disablePrefetch true

Disclaimer

Since i’m trying to get rid of Evernote, too anoying too often, i’ll start to document non-private-stuff here.