Category Archives: Microsoft - Page 2

My Microsoft HoloLens Adventure – Introduction

I’m back!!! It’s been almost a year to the day! I previously had claimed I was going to become much more active in my blogging and that turned out to be a lie. I had just started a new job and was expecting to have more ‘free’ time – that was laughable in retrospect. It’s been one of the busiest years in my life, and not really looking like it’ll slow down at all.

However I am pushing myself to do more! When the HoloLens developer application opened sometime back in 2015 – my gut wants to say early 2015 but I can’t say for certain I applied to be a developer, I thought for kicks it might be fun. I filled out the application 100% honestly and figured I’d never be accepted.

MSHoloLens_Image_1_CMYK

On February 29th of 2016 I received an email that I was accepted into wave 1 – I was shocked, thrilled and thought there is no way I can justify the cost. I spent weeks contemplating if I would drop the money and if I did what would I even program on it?

After about 1-2 weeks of pondering a couple of ideas for applications I decided I could justify the expense, then weeks – heck months passed before I actually got the purchase link from Microsoft. I spent a few more hours considering it and decided to take the plunge. I received the purchase link email from Microsoft on Monday May 9th at 9:33 AM – I read it around 6:00 PM. I made my purchase at 7:32 PM. I received an email that the HoloLens shipped from Shanghai China Tuesday at 11:17 PM. From looking at the tracking history the HoloLens went from Shanghai to my door step within 26 hours.

I still had a full work day to knock out so I didn’t get to actually open the HoloLens for another ~9 hours. While doing the opening I made an unboxing video which can be seen below. I do apologize for the echo but I didn’t have a good quality mic available.

Reflecting on Ignite 2015 – The Good, The Bad and The Ugly

I know I am late to the game, Ignite ended over a week ago! I would just like to share my perspective on how the week went, as it was quite different than I am used to. This year I went to Ignite as Staff, I’ve never worked a conference, let alone one the size of Ignite.

Note: I thought it would be a good idea to shave - not doing this again for a long time!

Note: I thought it would be a good idea to shave – not doing this again for a long time!

My week of Ignite actually started quite early, I arrived Friday May 1st in the evening to Chicago. My first thought it holy cow I’m going to hate Chicago, they had the NFL Draft going, and traffic was crazy. I’ve been to Chicago before but did not remember how much traffic there was! After missing a turn and adding an additional 20 minutes to my 2 1/2 hour drive from Indianapolis I was ready to unwind in the hotel. Check-in was fairly easy, aside from the long wait to check in.

Read more »

Building a Desired State Configuration (DSC) Lab

Recently I presenting at the Indianapolis PowerShell User Group and talked about Desired State Configuration. The presentation was 100% demonstrations, and I decided it would be a good idea to provide all of the PowerShell commands/instructions I used to build my lab environment for the presentation.

Note: Please note that these instructions were written using multiple Experimental DSC Resources, Microsoft and I myself provide no guarantee that these will work in a production environment. I strongly encourage that you use test environments that do not matter until you feel comfortable with DSC.

Pre-requisites

  • Licensed/Trial Media for Windows Server 2012 R2
  • An installed/updated Sys prepped VM Parent Disk
    • Stored at D:\Templates\Server2012R2.vhdx
  • a Virtual Switch within Hyper-V Configured as a Private, named “Private Network”
  • At least 7GB of free memory
    • You can adjust this all the way down to just 4GB
  • Downloaded copy of the latest DSC Resource Kit – Download Here

Now before we dive into the scripting component of this blog post I want you to know that this is not 100% automated. You will have some manual steps here and there, it is possible to 100% automate – but that will require significantly more effort. Please continue reading for instructions on this demonstration.

Read more »

PowerShell: Check for user accounts running Windows Services

Recently I worked with a client to validate that if a user account were to be disabled that it wasn’t going to break any of their currently running applications. You can be bit by an accidental miss-configuration where an end-users account is running a Windows Service or possibly at a lower level in a specific application such as SQL Server jobs. Luckily with the Power of PowerShell we can conquered the Windows Services! It is also possible to create a SQL Query, or even PowerShell scripts to query SQL, but we will not be covering that in this article.

Checking Windows Services:

The biggest concern I had was the Windows Services, it is easy enough for a junior admin to install SQL and specify their own account as the Service Account. THIS IS BAD! However with some simple PowerShell we can perform a visual inspection, or with some minor adjustments we could look for a service running with a specific user.

In the above example we are using a parenthetical command along with the Get-CimInstance Cmdlet. The command that is executed first is the Get-ADComputer, this will required the ActiveDirectory module is available on your computer system. It uses the filter parameter to look for any computer that is running Windows Server (any version). It then passes those values to the Get-CimInstance which performs an initial WQL Query, which doesn’t allow and statements. Therefore we have to pipe it’s returned values to a where statement which will continue filtering for us. At the very end it provides me the service name, the user account running it, and the computer this service is on.

I was able to run this against the clients environment and within a few minutes we new that it was safe to disable the account.

GriffinMonitor Module v1.5 – Additional Functionality

This evening I’ve decided to add additional functionality to the GriffinMonitor Module. I noticed that I am filling up my storage on my lab server fairly quickly. With that in mind I knew I needed to know once I am about to max it out. I’ve decided to write a fairly simple alert for remaining disk space per volume. Before we dive into how to use the cmdlet and the code itself please reference the previous blog post on Monitoring Storage Pool Health – GriffinMonitor Module.

Using Alert-GMLowDiskSpace:

This cmdlet is very similar to the Alert-GMUnhealthyStoragePool as it has 3 mandatory parameters. There is a 4th parameter that is optional so you can specify the threshold at which it alerts. As I mentioned in the previous blog post at some point I intend to add additional functionality for TLS or SSL secured SMTP servers along with the ability to pass authentication. That functionality is still not there, but it is still on my to-do list.

Example:

-OR-

 The Module Code:

 Update Instructions:

  1. Open C:\Users\<username>\Documents\WindowsPowerShell\Modules\GriffinMonitor with the PowerShell ISE or your favorite text editing document
  2. Replace the code with the above script
  3. Create a Scheduled Job for the new PowerShell cmdlet

Installation Instructions:

  1. Navigate to C:\Users\<username>\Documents\WindowsPowerShell\Modules\GriffinMonitor
    1. (Note: If the directory doesn’t exists you must create it.)
  2. Save the above code in a file named GriffinMonitor.psm1 under the above directory
  3. Create a Scheduled Job using PowerShell

Once it is scheduled, keep an active eye on your inbox for when your Storage Pool goes unhealthy!

Miscellaneous Notes:

  • This module was built and tested using PowerShell v4 on Server 2012 R2 running a single Storage Pool.
  • This module “should” work with Server 2012 running PowerShell v3 with one or many Storage Pools
  • This module comes with no guarantee or support, this is a run at your own risk and I take no responsibility for any repercussions that may occur by running this.
    • With that being said I’ll try my best to assist anyone who may have questions if you post in the comments of this thread.