Wednesday, December 5, 2018

NetCat with Powershell

I keep forgetting this and when you look for Powershell-like NetCat command you find tons and tons of really large scripts - evidently implementing the full schema - not what I wanted (but, to be fair, exactly what I asked for).  Anyways - here this:

PS > Test-NetConnection -ComputerName 172.16.1.5 -Port 22 -InformationLevel "Detailed"

or

PS > Test-NetConnection -ComputerName "mypc.example.com" -Port 22 -InformationLevel "Detailed"

Saturday, December 1, 2018

John Dies at the End

In the dark comedy scifi horror film John Dies at the End, the main plot revolves around a drug which gives the user vast knowledge of everything in various time streams.  Essentially, the user can no longer perceive time in the usual linear way and is always confused and asking "Is this now?" "When is this?"  "Has X happened yet?"

I find myself thinking along those lines as I work on Azure.  I keep finding "solutions" to issues only to try them and find they simply do not work at all.  For example, the recent output from a command "error: unknown option `--image'" sent me looking for the date of the documentation I was using.  "Is this now?" "When is this?"  "Has X happened yet?"

Thursday, October 11, 2018

Prediction: Windows 11 = Microsoft Linux

Wow!  I cannot believe where we are now!  They now admit there are MORE Linux VMs in Azure than anything else.  Previous estimates were "nearly half" and some said 80%.  Azure itself runs on Linux (as do most hypervisors, phones, IoT, etc.).

Of course, Microsoft has added the really nice WSL allowing you to run the bash shell and even Linux under Windows (making native calls).   This, while cool, was not really that interesting to me - until I saw the results!  The back and forth cross platform/pollination has resulted in Powershell Core!  It runs on Linux and Windows.  This makes administering Azure from Linux MUCH easier.  And, even better, Microsoft has released Visual Studio Code for Linux.  Both of these run great under Slackware Linux (I used the tarball).  They have binaries for Debian or RedHat distros.

I've never been one for a IDE, after moving from emacs to vi 17 years ago, but I have to admit - this is probably worth learning.  It has a really slick plugin for Git.  It has plugins for most languages (I've added a bunch) - even Perl!  (It took me a lot of scrolling, but I finally found it!)  I'm excited about Microsoft for the first time since 1995 (that was *really* short lived!)

People are always bugging me - switch from Perl to Python.  I've dabbled with Python.  If I were starting today, I'd definitely go that way.  But now, I need to get things done and everything you can do in Python you can do in Perl and vice-versa - so what's the point?  BUT, Powershell is a different story!  With Powershell, I have 10's of thousands of comandlets (reminds me a bit of Perl modules) that give me easy access to Windows .Net objects that allow me to do VERY POWERFUL THINGS.  I've been playing around with it for years and I really appreciate what it can do!  Now, I can do it from my Linux command line whilst operating against VMs in the Azure cloud.  This truly is an amazing time in IT.  I am so glad Microsoft is finally working with us instead of against us!  I can't wait to see where this is heading!

Wednesday, March 14, 2018

Azure Re-Visited

It's been a while since I updated the Azure CLI. I ran into some weirdness getting my template to create a new Oracle Linux VM for me.  I was, of course, still using azure CLI version 0.10.2.  A quick npm re-install got me to 0.10.17 - not good enough.  The latest download  was still CLI 0.10.17.  Strange - was everyone talking about CLI 2.0?  Then I saw the Docker container installation instructions!  Super easy!  Do this and save your self some grief now and in the future.