Hjertet af strøm

Hvilken forskel kunne det gøre for Danmarks el-produktion og distribution, hvis husstande i Danmark, i 2030, var udstyret med et blot 10Kwh batteri?
For at perspektiveret det udsagn yderligere.
Lejligheder gik sammen og fik nogle større batteribanker installeret. (100-200Kwh)
Lejligheder fik lagt solceller på tagene af deres lejligheder.
Nybyggede huse havde krav til at have minimum 10Kwh batteri kapacitet.

Preliminært resultat
P1: Lavere afregning for forbrugere – købes når det var billigst.
P2: Højere afregning til producenter – flere til at købe når der var mest.
P3: Optimeret lagring af grønt produceret energi. – El lagret som el, uden konversionstab.
P4: Højere privat forsyningssikkerhed – Hustandens batteribank leveret strøm, i tilfælde af lokal eller regional spændingstab.
P5: Etablering på allerede eksisterende teknologier.

O1: Tillade at disse batterier kunne sende el retur til netværk.
O2: Distribueret, decentraliseret lagring af el.
O3: Teknologisk udvikling kan opgraderes og udskifte løbende.

F1: Nuværende el net skal opgraderes uanset hvad.
F2: Forbruget af el er og vil være stigende. – Uanset muligheden for andre energi muligheder.

B1: Politik – Et gæt er 80% af elmarkedet er politik og ikke økonomi eller teknologi.
B2: Nær monopoler på elnet, transmissionsnet osv.

Koncept sketch omkring: Bornholms Hjerte

Original concept sketch Copenhagen Heart (English)

Notes: 13102018

SQL and Deadlocks – What, where and when are they exactly?

Working on for a customer where we were having some issues with some deadlocks. We couldn’t quite get the details on the events for a subset of reasons. Foremost, because the SQL Ring buffer events was recycled within one and a half hour during peak loads.
So we created a powershell script, which was set to run as a scheduled task, taking all deadlock events in the ring buffer and pairing it with relevant queries, one hour backwards.

Basically this script, run as a scheduled task every hour, will output all your deadlocks, for the past hour. If your system is not generating that much Ring buffer events, you can throttle it down or even just run the SQL query once in order to collect this data. Its just important to note, that these Ring buffer events will be overwritten by the good grace of the SQL server.

# Get todays date in order to stamp the output file correctly.
$Date = (Get-date).ToString("yyyy-MM-dd")

# The selected SQL instance to connect to
$SQLInstance = '<Servername>\<Instance>'
$Outputfile= "<Local folder location>"+$date+"Deadlocks.log"

# SQL Query to be performed
$SQLQuery = $("
  (SELECT xevent.query('(event/data/value/deadlock)[1]') AS DeadlockGraph,
          CAST (xevent.value('(event/@timestamp)[1]', 'nvarchar(30)') AS DATETIME) AS FullDate
     (SELECT xevent.query('.') AS XEvent
        (SELECT Cast(target_data AS XML) AS TargetData
         FROM sys.dm_xe_session_targets st
         JOIN sys.dm_xe_sessions s ON s.address = st.event_session_address
         WHERE s.NAME = 'system_health'
           AND st.target_name = 'ring_buffer') AS DATA CROSS apply targetdata.nodes ('RingBufferTarget/event[@name=""xml_deadlock_report""]') AS XEventData (xevent)) 
              AS src
WHERE RESULT.FullDate >= Dateadd(HOUR, -1, Getdate());

# Collect deadlock data every hour, using MaxCharLenght to get full output back. 
$DeadlockDataFromSQL=Invoke-Sqlcmd -Query $SQLQuery -ServerInstance $SQLInstance -MaxCharLength 10000 -QueryTimeout 0

# Output exception data to file using stream.
$stream = New-Object -TypeName System.IO.StreamWriter $OutPutFile, $true
foreach($line in $deadlockdataFROMSQL) 
      	$stream.WriteLine(($line.DeadlockGraph | Out-string))

Respect – Perspectives

The world is full of ruffians. The world is full of people of good character. Both of those statements are true, I believe, because within most of the people I have known lies the beginning points of both seemingly disparate paths.
Some people are too timid to ever be ruffians, of course, and others too kindhearted, and similarly, some folk are too hard tempered to ever let their good qualities show. But the emotional make-up of most people lies somewhere in the middle, a shape of grey that can be easily darkened or lightened by simple interaction. Race can certainly alter the shade – how well I have seen that since my road led me to the surface! An elf might noticeably flinch at the approach of a dwarf, wh8ile a dwarf might do likewise, or even spot upon the ground, if the situation is reversed.
Those initial impressions are sometimes difficult to overcome, and sometimes become lasting, but beyond race and appearance and other things that we cannot control, I have learned that there are definite decisions that I can make concerning which reaction, I will edge someone else toward.
The key to it all, I believe, is respect.
When I was in Luskan with Wulfgar, we crossed through a tavern full of ruffians, men who used their fists and weapons on an almost daily bases. Yet, another friend of mine, Captain Deudermont of the Sea Sprite, often frequents such taverns, and rarely, very rarely, ever gets into so much as a verbal argument. Why is this? Why would a man such as Deudermont, obviously (as is shown by his dress and manner ) a man of some wealth, and a man of respectable society, as well, not find himself immersed in brawls as regularly as the others? He often goes in alone, and stands quietly at the bar, but though he hardly says a word, he surely stands out among the more common patrons.
Is it fear that holds the ruffians from the man? Are they afraid that if they tangle with Deudermont, they will find retribution at the hands of his crew? Or has Deudermont simply brought with him such a reputation for ferocity as to scare off any potential challengers? Neither, I say. Certainly the captain of the Sea Sprite must be a fine warrior, but that is no deterrent to the thugs of the taverns; indeed, the greatest fighting reputation only invites challenges among those folk. And though Deudermont’s crew is formidable, but all accounts, more powerful and connected men than he, have been found dead in the gutters of Luskan.
No, what keeps Captain Deudermont safe is his ability to show respect for anyone he meets. He is a man of charm, who holds well is personal pride. He grants respect at the outset of a meeting and continues that respect until the person forfeits it. This is very different than the way most people view the world. Most people insists that respect has to be earned, and with many, I have come to observe, earning it is no easy task! Many, and I include Bruenor and Wulfgar in this group, demand that anyone desiring that friendship first earn their respect, and I can understand their point of view, and once believed that I held one similar.
On my journey south on the Sea Sprite, Captain Deudermont taught me better, made me realize, without ever uttering a word on the subject, that demanding of another that he earns your respect is, in of itself, an act of arrogance, a way of self-elevation, implying by its very nature that your respect is worth earning.
Deudemont takes the opposite approach, one of acceptance and one lacking initial judgement. This may seem a subtle alternative but it most certainly is not. Would that the man be anointed king. I say, for he has learned the secret of peace. When Captain Deudermont, dressed in his finery, enters a tavern of common peasant thugs, most within the place, and society at large, would view him as superior. And yet, in his interactions these people, there is no air of superiority about the man at all. In his eyes and in his heart, he is among peers, among other intelligent creatures whose paths have led them to a different – and not better or worse – place than his own. And when Deudermont grants respect to men who would think nothing of cutting his heart out, he disarms them, he takes away whatever reason they might have to found to fight with him.
There is much more to it than that, Captain Deudermont us able to do this because he can honestly attempt to see the world through the eyes of another. He is a man of empathy, a man who revels in the differences of people rather than fearing those differences.
How rich is his life! How full of wonder and how wide of experience!
Captain Deudermont taught these things to me, by example. Respect is one of the most basic needs of reasoning creatures, particularly among men. An insult is just that because it is an assault upon respect, upon esteem, and upon that most dangerous of qualities: pride.
Wo when I meet people now, they do not have to earn my respect. I grant it, willingly and happily, expecting that in doing so I will come to learn even more about the beautiful world around, that my experiences will widen.
Certainly some people will see this as weakness or cowardice, will misconstrue my intentions as sublimation, rather than an acceptable of equal worth. But it is not fear that guides my actions – I have seen far too much of battle to fear it any longer – it is hope.
The hope that I will find another Bruenor, or another Catti-brie, for I have come to known that I can never have to many friends. So I offer you respect, and it will take much for you to lose it. But if you do, if you choose to see it as weakness and seize upon your perceived advantage, well…..
Perhaps I’ll then let you talk with Guenhwyvar.

– Drizzt Du’Urden

Quoted from R.A.Salvatore’s Trilogy The Icewind Dales

I do not know where these words truly come from, but I find thought and reflection within them. They seem to universally bend around topics and areas within the human. Offering no answers, but perspectives which I truly appreciate.

Tradition – Perspective

The very sound of the word invokes a sense of gravity and solemnity. Tradition. Suuz’chok in the drow language, and there, too, as in every language that I have heard, the word rolls off of one’s tongue with tremendous weight and power.
Tradition. It is the root of who we are, the link to our heritage, the reminder that we as people, if not individually, will span the ages. To many people and many societies, tradition is the source of stricture and of law, the abiding fact of identity that denies the contrary claims of the outlaw , or the misbehavior of the rogue. It is that echoing sound deep in our hearts and our minds and our souls that reminds us of who we are by reinforcing who we were. To many it is even more than the law; it is the religion, guiding faith as it guides morality and society. To many, tradition is a god itself, the ancient rituals and holy texts, scribbled on unreadable parchments yellowed with age or chiseled into eternal rocks.
To many, tradition is all.
Personally, I view it as a double-edged sword. and one that can cut even more deeply in the way of error:
I saw the workings of tradition in Menzoberranzan, the ritualistic sacrifice of the third male child (which was almost my own fate), the workings of the three drow schools. Tradition justified my sister’s advances toward me in the graduation of Melee-Magthere, and denied me any claims against that wretched ceremony. Tradition holds the Matrons in power, limiting the ascent of any males. Even the vicious wars of Menzoberranzan, house against house, are rooted in tradition, are justified because that is the way it has always been.
Such failings are not exclusive to the drow. Often i sit on the northern face of Kelvin’s Cairn looking out over the empty tundra and the twinkling lights of the campfires in the cast barbarian encampments. There, too, is a people wholly consumed by tradition, a people clinging to ancient codes and ways that once allowed them to survive as a society in an inhospitable land, but that now hinder them as much as, or more than, helps them. The barbarians of Icewind Dale follow the caribou herd from one end of the dale to the other. In days long past that was the only way they could have survived up here, but how much easier might their existence be now if they only traded with the folk of Ten-Towns, offering pelts and good meat in exchange for stronger materials brought up from the south so they might construct more permanent homes for themselves?
In days long past, before any real civilization crept this far to the north, the barbarians refused to speak with, or even to accept, anyone else within the Icewind Dale, the various tribes often joining for the sole purpose of driving out any intruders. In those past times, any newcomers would inevitably become rivals for the meager food and other scarce supplies, and so such xenophobia was necessary for basic survival.
The folk of Ten-Towns, with their advanced fishing techniques, and their rich trade with Luskan , are not rivals of the barbarians-most have never even eaten venison, I would guess. And yet, traditions demands of the barbarians that they do not make friends with those folk, and indeed, often war upon them.
What gravity indeed does that word impart! What power it wields! As it roots us and grounds us and gives us hope for who we are because of who w were, it also wreaks destruction and denies change.
I would never pretend to understand another people will enough to demand that they change their traditions, yet how foolish it seems to me to hold fast and unyielding to those mores and ways without regard for any changes that have taken place in the world about us. For that world is a changing place, moved by advancements in technology and magic, by the rise and fall of populations, even by blending of races, as in the half-elf communities. The world is not static, and if the roots of our perceptions, traditions, hold static, then we are doomed, I say, into destructive dogma.
Then we fall upon the darker blade of that double-edged sword.

– Drizzt Do’Urden

Quoted from R.A.Salvatore’s Trilogy The Icewind Dales

I do not know where these words truly come from, but I find thought and reflection within them. They seem to universally bend around topics and areas within the human. Offering no answers, but perspectives which I truly appreciate.

Trails Anew – Perspectives

In my travels on the surface, I once met a man who whore his religious beliefs like a badge of honor upon the sleeves of his tunic. “I am a Gondsman!” he proudly told me as we sat beside each other at a tavern bar, I sipping my wine , and he, I fear, partaking a bit too much of his more potent drunk. He went on to explain to premise of his religion, his very reasons for being, that all things were based in science, in mechanics and in discovery. He even asked if he could take a piece of my flesh, that he might study it to determine why the skin of the drow elf is black. “What element is missing, ” he wondered, “that makes your race different from your surface kin?”
I think that the Gondsman honestly believed his claim that if he could merely find the various elements that compromised the drow skin, he might affect a change in that pigmentation to make the dark elves become more akin to their surface relatives. And, given his devotion, almost fanaticism , it seemed to me as if he felt the would affect a change in more than a physical appearance.
Because, in his view of the world, all things could be so explained and corrected.
How could I even begin to enlighten him to the complexity? How would I show him the variations between drow and surface elf in the very view of the world resulting from eons of walking widely disparate roads?
To a Gondsman fanatic, everything can be broken down, taken apart and put back together. Even a wizard’s magic might no more than a way of conveying universal energies – and that, too, might one day be replicated. My Gondsman companion promised me that he and his fellow inventor priests would one day replicate every spell in any wizard’s repertoire, using natural elements in the proper combination.
But there was no mention of the discipline any wizard must attaint as he perfects his craft. There was no mention of the fact that powerful wizardly magic is not given to anyone, but rather, is earned, day by day, year by year and decade by decade. It is a lifelong pursuit with a gradual increase in power, as mystical as it is secular.
So it is with the warrior. The Gondsman spoke of some weapon an arquebus, a tubular missile thrower with many times the power of the strongest crossbow.
Such a weapon strikes terror into the heart of the true warrior, and not because he fears that he will fall victim to it, or even that he fears that it will one day replace him. Such weapons offend because the true warrior understands that while one is learning how to use a sword, one should also be learning why and when to use a sword. To grant the power of a weapon master to anyone at all, without effort, without training and proof that the lessons have token hold, is to deny the responsibility that comes with such power.
Of course, there are wizards and warriors who perfect their craft without learning the level of emotional discipline to accompany it, and certainly there are those who attain great prowess in either profession to the detriment of all the world – Artemis Entreri seems a perfect example – but those individuals are, thankfully, rare, and mostly because their emotional lacking will be revealed early in their careers, and it often brings about a fairly abrupt downfall. But if the Gondsman has his way, if his errant viw of paradise should come to fruition, then all the years of training will mean little. Any fool could pick an arquebus or some other powerful weapon and summarily destroy a skilled warrior. Or any child could utilize a Gondsman’s magic machine and replicate a fireball, perhaps, and burn down half a city.
When I pointed out some of my fears to the Gondsman, he seemed shocked-not at the devastating possibilities, but rather, at my, as he put it, arrogance. “The inventions of the Priests of Gond will make all equal!” he declared. “We will lift up the lowly peasant.”
Hardly. All that the Gondsman and his cronies would is ensure death and destruction at a level heretofore unknown across the Realms.
There was nothing more to be said, for I knew that the man would never hear my words. He thought me, or, for that matter anyone who achieved a level of skill in the fighting or magic arts, arrogant, because he could not appreciate the sacrifice and dedication necessary for such achievement.
Arrogant? If the Gondsman’s so-called lowly peasant came to me with a desire to learn the fighting arts , I would gladly teach him. I would revel in his successes as much as in my ow, but I would demand, always I would demand, a sense of humility, dedicated and an understanding of this power I was teaching, an appreciation of the potential for destruction. I would teach no one who did not continue to display and appropriate level of compassion and community. To learn how to use a sword, one must first master when to use a sword.
There is no one other error in the Gondsman’s line of reasoning, I believe, on a purely emotional level. If machines replace achievement, then to what will people aspire? And who are we, truly, without such goals?
Beware of the engineers of society, I say, who would make everyone in all the world equal. Opportunity should be equal, must be equal, but achievement must remain individual.

– Drizzt Do’Urden

Quoted from R.A.Salvatore’s Trilogy The Icewind Dales

I do not know where these words truly come from, but I find thought and reflection within them. They seem to universally bend around topics and areas within the human. Offering no answers, but perspectives which I truly appreciate.

Clean print servers of old jobs

Been working on some maintenance, cleanup, auditing, streamlining for a customer. During this workthrough, printjobs showed up and asking around they actually performed this task manually. Of course I would not hear of this and created a simple powershell script that would go through all print servers, look for jobs older than 7 days and delete them. All wrapped in standard remote powershell, so this can be run from a central batch server.
1: Make sure to add your printservers to the array.
2: This script requires remote powershell to work 🙂
3: You can change the number of days to reflect your own requirements.

$PrintServers = @("<PrintSRV01>","<PrintSRV02>", "<PrintSRV03>", "<PrintSRV04>")

Foreach($Printserver in $PrintServers) 
$Session = New-PSSession -Computername $PrintServer -Authentication Kerberos
$SC = { 
$OldJobs = get-wmiobject -class "Win32_PrintJob" -namespace "root\CIMV2" | Where-Object { $_.StartTime -lt $($(Get-Date).addDays(-7)) }
foreach ($job in $OldJobs) 

Invoke-Command -Session $Session -ScriptBlock $SC
Remove-PSSession $Session

Microsoft PKI with client certificate auto enrollment design specification

Next in the collection of design specifications is a Microsoft PKI with added client certificate auto enrollment settings.
A customer asked me if I could implement this and seeing as I’ve done a fair bit of Microsoft PKIs before, it didn’t seem like too much of a hassle. Of course I wanted it to be documented and shared with all of you.

All in all, it was a little less than 8 hours before client certificates started rolling out, without anyone noticing.

Microsoft PKI with client certificate auto enrollment design specification (located on Google drive)

Onedrive for Business Design Specification

Having worked on this document for quite some time I felt the need to publish it just about now. I see alot of attention on the Onedrive for business client as it has matured greatly over the past year and many national and international companies are looking towards what this solution can offer. The below design outlines a lot of these considerations, including network latency, legislation, features and of course a large collection of valuable links when considering the implementation of Onedrive for Business.
I will update document as my work brings me further into this area. Until then I hope you will enjoy this piece of work and benefit as much from it as I have.

Onedrive for Business Design Specification (located on Google drive)

Microsoft Cloud solution – Security, Auditing, Traceability and how do they react to data breach

You might have an interest in Microsoft cloud hosting security, auditing and / or data protection, just like me. I’ve collected a few good links, that should get you started.

First of, a little on how they react if breaches will happen, because they will at some point in some way. Major or minor…
How Would Microsoft Respond to a Data Breach of the Azure services?

Secondly, this white paper examines how Microsoft investigates, manages, and responds to security incidents within Azure.
Microsoft Azure Security Response in the Cloud

So how do they protect their physical data centers as well as your data and which certifications do they comply to?
Security, Audits, and Certifications

A little on their politics for how they manage and regard your data.
With Microsoft, you are the owner of your customer data.

And lastly a more wide perspective article.
5 questions every executive should be asking their security team