This is the first is a series of posts, entitled “The PowerShellToolbox,” where I'll be talking about everyone's favourite shell/scripting language. I'm assuming a lot of you will at least have heard of it, and there will also be some fanatics out there, so I thought it might be of interest if I covered some aspects that come up in my role as a sales engineer. Specifically, I learned many of these lessons when I wrote the PowerShell Module based on the SDK.

 

These will include topics such as:

  • Reusing scripts by making them into cmdlets and modules
  • How to properly test your scripts using Pester
  • Creating a PowerShell jumpbox
  • A look at Desired State Configuration

 

... and many more. I'm writing this series based on the assumption that you, the reader, have a certain level of experience with PowerShell. For those wanting to learn the basics, I couldn't recommend enough the excellent training videos Jeffrey Snover and Jason Helmick created over at Microsoft® Virtual Academy. To begin with, we'll look at a project I've been thinking of for a while, and over the coming weeks iterate the solution, beginning today with a high-level planning phase. We’ll then move on to some basic cmdlets, before adding those to a module. Along the way, we'll also look at using unit testing for the scripts, error handling, and source-control. While the code here is specific to a use case for me, the overall goal is to show you how to take an idea, convert it to PowerShell, and then build it into a robust tool in your arsenal.

 

The Scenario

I work from home and while I'm usually the only one in the house, there are times when it's obviously useful to have some sort of indicator as to whether the door to my office is closed due to the fact I'm on a call (and "do not disturb") or whether it's okay to pop in. While trying to find  a solution, I stumbled across Scott Hanselman's blog on using a Kuando Busylight. Essentially, it's a USB light that indicates presence based on your Lync® presence, but it can also work with other technologies. There are Alpha and Omega models, but given there wasn't much of a price difference on Amazon®, I went for the Omega. And by pairing it with a 5m USB extension cable, I should be able to locate it outside my office.

 

However, some of the technologies I use aren't supported, so I want to have a way to manually control the colour. While there is a manual sample app for this, I want to be able to script these changes, since I use some PowerShell scripts to configure certain workflows on my system—like when I'm running a WebEx®, I'll connect to another network and ensure that certain apps are not running—and I want to be able to control the device from PowerShell.

 

Buslyight and Jabra headset

Busylight alongside Jabra headset for perspective

 

PowerShell for Busylight

  Fortunately, there is also a

Busylight SDK available (I'm using Vers

. 3.0.0.6), and while it ships with C++, C#, and VB code samples, a really strong feature of PowerShell is that it’s easy to expand its reach by using objects designed for other technologies. I'm not going to do a huge amount of coding today, but just for a quick proof of concept, I want to very quickly just do something basic—like setting the color to blue—from PowerShell. Once I download and install the SDK, the next step is to look at the included help file documentation, and I note there are a few classes: busylightcolor, busylightdevice, PulseSequence, and SDK. That might be of interest.

Help File.png

Busylight SDK  Help

 

At this stage, don't panic if you don't know what constructors, methods, and properties are; I'll explain as we go along. In my case, I'm fortunate that I also have a basic understanding of some programming concepts—I've worked with C, C++, and Java, as well as various VB & FoxPro applications I developed in previous roles—but the key thing I noted that in the "SDK" class is that it is described as “This class handles all connected Busylight Devices,” so it seems like a good place to start.

1. I'll load the DLL, so that PowerShell knows what code I want to use (the "add-type" line)

2. Next I'll create a new object, which from the documentation, is in a namespace called "Busylight" (tab-completion will help!), and I assign this to a $BusyLightDevice variable. (Just in case you're interested, at this stage the "constructor" that you see is called implicitly, so you don't have to worry about it)

3. And finally, I'll just now check the variable, to make sure it's connected, and sure enough we're now seeing info.

PowerShell to Connect to Busylight

 

And to set the color, again only 3 lines of code.

PowerShell to set the colour

 

Blue Busy Light

This time, however, we are now creating a color object that the busylight can interpret, has just blue set to max, and the rest to 0. This Busylightcolor object is then used as a parameter by the "method" called "Light" in the SDK class. (To get technical: in a class a method "does" something, like setting or reading a value, while the value of something, such as the BlueRGBValue in the Busylightcolor class, is called a "property.")

ViewColor.png

By setting the different red, green, and blue combinations as RGB values we can now set different colors. So if I now add in red, and check the settings:

CodeForPurpleBusyLight.png

 

And as we can now see, we have a purple!

Purple Busy Light

 

Wrap Up

In the next post, I'll iterate on the above code by writing some functions that will allow us to reuse the code in multiple places. But in the meantime, I'd love to hear if you've already begun working on a toolbox with these types of scripts. If you have any feedback on things you'd like to see in future posts, please let us know!

 

Exit-PSSession "Blog Post"

Sascha Giese

Berlin, wir kommen!

Posted by Sascha Giese Employee Jan 24, 2017

Es ist mal wieder soweit, Cisco Live in Berlin steht an! 

1612_SWI_cisco-live-berlin_1200x628_1.png

 

Natürlich ist auch das Solarwinds Team vor Ort, tatsächlich sogar mit einem ganzen Team!

Letztes Jahr war unser Stand ziemlich beschäftigt mit vielen Solarwinds Fans die mit Unmengen von Goodies gegangen sind.

Wer jemals Solarwinds auf einer Messe besucht hat, kennt sicherlich unsere Spielzeuge, Pins etc wie diesen hier

 

pin.jpg

 

Was macht Solarwinds auf einer Ausstellung? Natürlich Zeugs ausstellen, wer hätte das gedacht!

Kommt vorbei mit euren Fragen und wir werden ein paar Ideen oder sogar Lösungen für euch haben.
Egal, ob ihr schon Kunde seid und vielleicht mit dem Gedanken spielt, euer bestehendes Monitoring zu erweitern, oder einfach nur ein paar Tipps braucht wie man dieses oder jenes anpasst.

 

Vielleicht habt ihr aber gar keinen Überblick darüber, was so ein ominöses Solarwinds Ding überhaupt machen kann! Hervorragend! Da seid ihr bei mir genau am richtigen Mann

Wir zeigen euch gerne wie man unser Orion einrichtet, vielleicht einen Report automatisiert oder –oh, Schreck- Java auf einem Desktop patched!

 

Ich weiss, ich weiss, im Nachhinein sind alle Erinnerungen romantisch aber wir hatten scheinbar viel Spass in 2016:

 

2016.jpg

 

 

Ich kann mich noch erinnern, dass wir 300 T-Shirts hatten die alle schon am ersten Tag weg waren.

Dieses Jahr machen wir den Fehler nicht noch einmal aber ich schlage vor, dass ihr trotzdem so früh wie möglich vorbeischaut!

 

Ich freue mich schon auf die Messe. Es ist immer schön, sich mit Nutzern austauschen zu können. Auch mit anderen Herstellern von denen es ja genug dort gibt.

Da fällt mir ein:

Hallo Philips, falls ihr das hier lesen solltet, ich hätte gerne einen Satz Hue…rein zu Forschungszwecken, natürlich!

 

Berlin ist ebenso einen Reise wert. Und das gute Deutsche Essen, welches man vermisst wenn man im Ausland lebt.

Was mich dann an das hier erinnert - das Beste überhaupt vom letzten Jahr bei der Cisco Live war ohne Zweifel das hier:

cake.JPG

 

Grossartig und schlägt die Berliner Currywurst um Längen!

 

Wir sehen uns!

 

 

Sascha

The saga continues…

 

In our previous episode, we saw how young Network Admin space warrior Alan Marsh, triumphantly finished yet another busy day by getting the network back up in Bangalore, while simultaneously helping out his fellow coworkers – and, of course, not forgetting to deliver his status report for the iOS® router config. But what challenges will more mature and seasoned network defenders face when battling even more unsettling issues and taking on greater responsibilities in their network galaxy? That’s why we’re back today for another episode of Just a Day in the Life of a Network AdministratorEpisode II: Guilty until Proven Innocent!

 

Today, we’ll be taking a tour of a network admin’s daily life with Samantha Gordon, an experienced IT Manager in charge of her company’s network. Let’s see how her responsibilities and duties differ from Alan Marsh’s.

 

Ready? Let’s go!

 

“Samantha, we need to meet with the CTO again this week regarding the network budget for Q2. We have to have those reports ready by Friday.”

 

“Sure thing, Dan. Let’s have a look at everything tomorrow. Today we’ve got to deliver our incident response report and show how the outages from last week had nothing to do with the network. We also have to get sign off in order to implement some preventative fixes so that this incident doesn’t recur. This is totally bogus. The outage had nothing to do with the network!”

 

“I hear ya, Sam! Sounds good. Tomorrow we’ll go through the budget. Catch you later!”

 

Ugh, seriously…every time something goes wrong, the first thing everybody says is, “Oh, it must be the network.” REALLY? Why must it be the network? The reason why this drives me mad is because the MTTI (Mean Time to Innocence) of the network is at stake, and I’m in charge of it. This means that I have a limited span of time to prove that the network is not at fault for whatever issues that occurred at a given time. Typically, the developers and SysAdmins will blame the network for a problem that occurs, and everyone else jumps on the same boat. It doesn’t happen often, but it always happens at the wrong time. In this case, right on budget planning week!

 

“Uh, Samantha? I’m so sorry to bother you right now, but the VPN is not working between two sites and I’ve been trying to fix the problem since yesterday. I can’t seem to resolve it. Could you please have a look at it for me?”

 

“Sure, Jacob. Please pull up the screen you’ve been working on and I’ll have a look at it in a bit. Thanks.”

 

Jacob is a good network administrator. He knows his network, but as a young network admin, he sometimes doesn’t make use of the tools we have at hand. If he did, he’d immediately be able to spot this simple Ethernet negotiation mismatch and resolve the issue with ease.

 

Back to budget planning. I can’t help but keep thinking about how much money we’re spending on technologies that are giving us mediocre service. We have this alert-happy system that drives us crazy… a lot of the time, it’s just noise. I need to somehow secure budget so that we can install a more intuitive system. The fact that it’s an upfront investment has little to no importance in terms of how it impacts the budget, because whatever we spend on the alternative system I’ve found, we’ll save in man hours in the future. Nevertheless, I still have to show them the numbers and prove this to them.

 

“Samantha, can I have a word with you.”

 

“Sure, Rick. Is anything the matter?” (Rick, our CTO. He’s one of those guys who wants to do “more with less.”)

 

“Well, Samantha, it seems we’ve found the issue that triggered the outage last week. You’re right — it has nothing to do with the network, but make sure it doesn’t happen again! Are you ready to present your budget planning for Q2 today?”

“Uh, um…yes, no problem! I can get everything ready for our meeting at 5:30 p.m. today. Thanks!”

 

Aaaahhh! That, I was not expecting! There I was, ready to put on my crusade gear and defend our network, and instead I should have come armed with my calculator. It’s just never a normal day.

 

***

 

Do you have a story that is similar to Samantha’s? Or something different, maybe? We’d love to hear about it in the comments section below. Thanks for stopping by!

Frohes Neues!

 

2017 also, irgendwie macht die Zahl mich nicht an. Aber darum geht es ja auch nicht

Was erwarten wir in der IT in diesem Jahr? Welche Trends? Welche Änderungen kommen sicher, was kann man vermuten?

 

Ich dachte mir also, Sascha, konsultiere einmal deine Glaskugel und schaue, was in 2017 alles passiert.
Aber meine Glaskugel bleibt ziemlich blass bzw orange:

 

crystal.jpeg

 

Also fragen wir doch das liebe Internet!

 

Zuerst bin ich auf das hier gestossen:

http://www.cio.de/a/9-vom-aussterben-bedrohte-it-jobs,2888966?utm_source=Facebook&utm_medium=FacebookPost&utm_campaign=SocialMedia

Sicherlich ein interessantes Thema, jedoch mit einigen streitbaren Aussagen.

Ich stimme überein mit Position 6, dem Web Designer, von denen immer weniger benötigt werden, aber bei den meisten anderen Positionen….nee, schaut mal in Pos 2 zum Beispiel.

Es gibt so viele komplexe Themen in der IT (und im RZ), es ist unmöglich dies alles zu meistern. Es wird immer Bedarf für einen Experten bei einigen Themen geben.

 

Ich finde auch dieses hier http://virtual-strategy.com/2016/12/27/executive-viewpoint-2017-prediction-solarwinds-containers-faas-and-more-hybrid-it/?sf48894574=1 welches von einem meiner Kollegen aus den USA verfasst worden ist.

Eine der Kernaussagen ist, dass 2017 das Jahr der Container wird.

Meiner eigenen Erfahrung nach spielen Container, zumindest in Deutschland, im Moment noch überhaupt keine Rolle, wobei das Thema an sich ja wirklich interessant ist. Allein, es fehlt an sinnvollen Einsatzszenarien!

 

Eine interessante Sichtweise eröffnet auch das Ding hier https://www.technologyreview.com/s/603216/5-big-predictions-for-artificial-intelligence-in-2017/

Wie wäre es mit „Alexa/Siri/Cortana mein Outlook ist so langsam, tu was!“ – Ein Traum! Siri erstellt ein Ticket, untersucht sowohl Outlook als auch Exchange und alles dazwischen und der Admin geht auf 'nen Kaffee!

 

Hier noch etwas:

https://www.spiceworks.com/marketing/state-of-it/report/

Punkt 1 besagt, dass mit nicht viel Wachstum zu rechnen ist, was u.A. IT Budgets klein hält und nicht viel Spielraum lässt. Das liest sich natürlich nicht gut für jeden, der irgendwie mit IT zu tun hat.

Helfen kann Punkt 2 hiervon http://searchitoperations.techtarget.com/feature/Ten-IT-trends-through-2017-and-how-to-prepare aber das ist meiner Meinung nach immer mit Risiken verbunden.

 

Wenn ich mir diese ganzen Artikel anschaue plus einige mehr, findet sich ein roter Faden irgendwo, der sowohl Unternehmen als auch Haushalte beschäftigen könnte: Internet of Things / Internet of Everything.

Ist ja schon lange ein Thema, ufert aber immer weiter aus.
Unsere eigene interne IT hat natürlich die klassischen Themen im Griff wie die Infrastruktur und Dienstleistungen etc, dazu aber auch die „smarte“ Klimaanlage, die über ein Webinterface gesteuert wird.

Das Zugangssystem an den Türen, welches sogar auf SNMP reagiert.

Man bastelt gerade an einem System, dass die Beleuchtung smarter steuern kann um Betriebskosten zu sparen ein kleiner Test läuft auf einem Raspberry!

 

Privat kommen wir dem Wahnsinn noch einen Schritt näher:

http://www.withings.com/eu/de/products/hair-coach

Eine Haarbürste mit IP Adresse! Ich brauche das!!! Nur bitte keinen Adresskonflikt mit meiner Kaffeemaschine am Morgen!

 

Für mich ein ebenso interessantes Thema ist jedoch, wer schluckt wen in 2017
Ich denke nicht, dass wir in 2017 so einen Knüller wie Dell/EMC erleben werden, aber mit ziemlicher Sicherheit wird auch hier so einiges passieren. Glücklicherweise haben Übernahmen nur bedingt einen Einfluss auf unseren Arbeitsalltag.

 

Was vermutet ihr? Glaubt ihr, dass irgendeine der Vorhersagen oben einen Einfluss auf euren Job haben?

 

Viele Gruesse,

Sascha

SolarWinds uses cookies on its websites to make your online experience easier and better. By using our website, you consent to our use of cookies. For more information on cookies, see our cookie policy.