Experts Live Café Wien–AWS and PowerShell Classes

Today we had two experts from Amazon Web Services (AWS) at our

Today we had our Experts Live Café in Vienna at HP Enterprise – and it was exciting as so often.

First Daniel Gruber introduced us to PowerShell classes, showed us the possibilities and limitations. Afterwards our guests from Seattle, Steve Roberts and Kenneth Hansen showed us the latest developments – some of them not even public – in the Amazon Cloud (AWS – Amazon Web Services).

20180618_155531289_iOS20180618_163157544_iOS

At the end we raffled a free ticket for the ExpertsLive conference among the participants, which Daniel Gruber won.

After the presentations we had intensive discussions. The two Americans also took notes about our feedback on AWS and its development – I think that one or the other will come to AWS or into the AWS PowerShell implementation.

All in all another successful evening. Our events are now on summer holidays – until the next event in October.

Advertisements

ExpertsLive Café in Linz sponsored by BASE IT

Yesterday we were guests at BASE IT in Ansfelden. We had 3 interesting presentations on the subject of automation. It is exciting to hear that System Center Service Manager is apparently becoming more and more popular and that there are now more and more people in Upper Austria who use it and are familiar with it.

Yesterday we had an automation focus, with these topics:
◾Phönix out of the ashes – Service Management and Automation with System Center (Michael Seidl, MVP)
◾Windows Admin Center RTM – formerly Project Honolulu (Markus Grudl)
◾Acitve Directory Domain Services Section (Patrick Grünauer, MVP)

This time we were a smaller – but very fine round – as our picture proves. There were many conversations – technical as well as private. Of the 8 participants 3 were MVP – a good cut, I think.

2018-06-13 ExpertsLiveCafé

The event was a really exciting.

On Monday, June 18, the next ExpertsLive event – this time in Vienna with Kenneth Hansen and Steve Roberts – they are working at Amazon/Seattle.

Sort string as int

Twice a year I have to sort a string as an integer. And with PowerShell it is really simple. What you have to do:

“199”,’23’,’89’ | Sort-Object

StringOrder

“199”,’23’,’89’ | Sort-Object -Property {$_ -as [int]}

CorrectOrder

I got this hint from Mathias R. Jessen. Have a look at his RegEx Session on PSConfEU. He also tells, what to do, if you have something like ‘IR343’ and ‘IR1342’ and you want to sort this numerical.

Service Manager Portal returns HTTP 500 – internal Server Error

We use the new portal for the Service Manager. Today we got an “HTTP 500 – internal Server Error” with Internet Explorer 11. The error message looks like that in german:

Error 500

We figured out, that this behaviour was because of an Internet Explorer Registry setting. If you set

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\International\AcceptLanguage to empty, you get this error message. So we (in Austria) choose AcceptedLanguage = de-AT,de-DE;q=0.5 and it works fine again.

Your Error Code is too red?

So you think, the PowerShell Error-Code is too red?

image

It should be better green? There are ways.

<br>
$psISE.Options.ErrorForegroundColor = [System.Windows.Media.Colors]::Chartreuse<br>

or

<br>
$host.PrivateData.ErrorForegroundColor = ‚green‘

So error color will change to a more friendly green.

image

This runs on PowerShell ISE as well as on Visual Studio Code. I hope you’ll like it.

One more hint: Some people think, yellow is the best error color.

Get a Header into an Array

Today I’ve been asked, how I can get a “header” for an array. So you can access the  contents via a property like $Obj.AccountName.

image => image

The idea was given by

Import-Csv -Header

I found some solutions to this.

Explicit with a class

### Explicit with a class
class User
{
      [String]$Accountname
User ([String[]]$Username)
      {
           $this.Accountname = $Username
      }
}
@('myUser','Your') | % {[User]::new($_)}

Implicit with select (somewhat shorter)


@('myUser','Your') | select @{l='Accountname';e={$_}}

Implicit with PSCustomObject


@('myUser','Your') |  %[PSCustomObject]@{ Accountname = $_ }} 

Results

What are the results? Are the results equal?

The result always look like this:

image

In each case we get an object array (Object[]). But there are different objects in it. With the class version there are self defined “User” Objects in the array. In the two other cases we get an unspecific PSCustomObject.

Experts Live Café Austria/Linz Review

Our event is over and it was great! An exciting Experts Live Café in Linz with nearly 20 participants, including 6 MVPs.

This time we had a Docker session with Michael Pambalk-Rieger’s on our agenda. He added some new parts to his session on the Experts Live Conference. And he had so much to tell, that he run out of time.

Next, Roman Stadlmair explained service maps to us and gave us a few practical examples.

Helmut Otto rounded off our program with Azure IoT today – he showed us Azure IoT and gave us some anecdotes.

Afterwards, we were able to enjoy the catering of Secureguard with a cosy networking.

We are already looking forward to our next events.

IMG_1716IMG_1717IMG_1712