Disappearing Drives in WMF 5.0 Preview

§ April 21, 2015 17:04 by beefarino |

Just a quick note about something I uncovered in the WMF 5.0 preview.  This one’s been frustrating me for a few weeks as I’ve prepped demos for the PowerShell Summit.

If you create a new PowerShell drive in your session that has a single-letter name, the drive will be forcibly removed  unless it’s backed by the FileSystemProvider.

To see this in action, run the following script in PowerShell 5 preview:

new-psdrive z -psp filesystem -root 'c:\'
new-psdrive y -psp registry -root 'hkcu:\'
sleep -second 5
get-psdrive

 

You’ll notice that the FileSystemProvider z: drive sticks around, where the RegistryProvider y: drive disappears.

Now that I’ve figured out what’s happening, I feel better about pushing the new version of Simplex to the gallery!



Changes. I have them.

§ October 10, 2014 12:02 by beefarino |

As many of you know by now, I’ve accepted a position at Pluralsight as Curriculum Director. I can say honestly that I’ve never been more excited about taking a new position, and I’m really looking forward to being able to make a positive contribution at a fantastic organization. 

This represents yet another career shift for me.  Instead of slinging code day-to-day, I’ll be working to help others teach how to do so effectively.  As different as this will be, I feel like this position is the appropriate destination for my crooked and wandering career path.  My professional background didn’t start in technology; rather, it was cognitive psychology – specifically researching human perception and learning.  During that phase of my life, I came to love both learning and teaching. 

As I entered a technology career, I carried this with me; the opportunities to mentor for someone with no experience were limited of course.  It took years before I was comfortable sharing what I was doing with others, but I got there.  I started speaking at user groups, publishing open-source software, and eventually, I reached out to Pluralsight to see if they would be interested in having be as an author.

I didn’t end up producing a lot of content – all said and done, I will have four courses in the library.  And nothing terribly popular – but that’s not why I did it.  I missed teaching.  I wanted to get back into it somehow, the royalty model Pluralsight offers made that a reasonable avenue to follow, and frankly it was fun.  Thing is, as I worked through my courses, I noticed that I really enjoyed working with everyone on the Pluralsight side.  Every interaction with them was positive – even when they were turning down a course idea or pointing out my use of …. “sailor words.”  They seemed to appreciate the effort I put in too – eventually they folded me in as one of their peer reviewers, and for about two years I’ve been providing feedback on other courses as my schedule will allow.

Making the change from working for myself to working for someone else is something I honestly thought I would never choose to do.  I love the independent lifestyle, but there are some hard choices to make there.  Code Owls exists, in a nutshell, to allow me to manage my own time.  I want to be home for my kids to hear about their days, help with their schoolwork, and be their dad.  This new job doesn’t take me away from that – I still work primarily from home, my schedule is very flexible, and the company has a strong cultural focus on living a balanced life.  Moreover, growing a business by yourself is really hard.  I believe I could keep paying myself through Code Owls indefinitely, but I don’t think I could ever expect a raise unless I hired on, which is a hassle I don’t want and, frankly, can’t find the financial gain in doing so in today’s climate.  This shift represents a huge growth opportunity for me – one that would only be possible as part of an established organization.  That said I’m not closing Code Owls – I still plan to do things through this entity…

So what does this mean for the dozen or so open source projects I’ve pushed out there?  Honestly I think it means I will have more time and mental energy to devote to this area.  With clients consuming my tolerance for code, the production you see on my github page represents what is left over.  I fully expect to keep maintaining and growing StudioShell, and producing random PowerShell modules that only a few of you will actually use (wink-wink).  I also plan to keep speaking, after all, my love of teaching landed me this new amazing new gig, so why mess with that?

My official start date is November 17, 2014.  Until then, I’ll be putting bows on clients and projects in situ.

Oh, and before I forget – let me say THANK YOU to those of you who mentored me through this decision.  You know who you are.  And also a shout out to everyone for the well-wishes and kudos – the response to my initial announcement was overwhelming and I can’t respond to everyone individually.  Y’all have humbled me once again…



Come Speak at PowerShell Summit 2015!

§ September 2, 2014 16:58 by beefarino |

summit2015As you may know, my home town of Charlotte NC will play host to the PowerShell Summit 2015 NA next April.  This event will supplant the Charlotte PowerShell Users Group regularly scheduled PowerShell Saturday event, and it is a rare opportunity that you will not want to miss! 

The summit is currently accepting submissions for talks, and I’d like to suggest that you do so.  You do not need to be an expert, you do not need to be an experienced speaker - you simply need a shell story to tell, and I know you have one you’re dying to share.

The benefits of speaking are many, including free attendance to the event.  You'll get to rub elbows with members of the PowerShell team and interact with industry experts and community leaders from across the globe.

So please, consider sharing your story by submitting a talk.  The deadline for submissions (15 Sept) is approaching rapidly, and I would hate for you to miss out on this singular opportunity.



A Bit of DSC Frustration

§ August 20, 2014 14:42 by beefarino |

DSC is like remoting – when it works it’s amazing.  When it doesn’t work….. who knows why?

While prepping a Desired State Configuration demo for SQL Saturday #328, I hit a small roadblock that proved to waste several hours of my time.  I’m documenting it here in the hopes that it helps someone else.

I’m using DSC to install SQL Server onto an Azure VM.  At some point in the process, running Start-DscConfiguration started to error out, with a cryptic and altogether unhelpful message:

An old configuration is still pending. Please wait for the pending configuration to finish. If the problem persists, 
execute Start-DSCConfiguration command with -Force parameter.
    + CategoryInfo          : ResourceExists: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 11
    + PSComputerName        : nottaken.cloudapp.net
 

This error persisted regardless of what I tried, and it eventually took a new form:

Cannot invoke the SendConfigurationApply method. The PerformRequiredConfigurationChecks method is in progress and must 
return before SendConfigurationApply can be invoked.
    + CategoryInfo          : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 1
    + PSComputerName        : nottaken.cloudapp.net

I finally swallowed my pride and reached out to DSC trailblazer Steve Murawski, who was able to quickly and generously point me to the fix.

The Cause

In my case, it would seem that the DSC local service was hard at work on my target node trying to make things work.  The problem was that DSC neglected a failed installer (or the resource in question failed to report it correctly).  In any case, this left DSC in a state where it thought a configurable something is happening, and thus it should prevent new things from happening. 

Specifically, I was trying to install SQL Server using xSqlPs, but the password I specified for sa did not meet the strong password requirements and the installation exited.  For some reason I’m still investigating, the xSqlServerInstall resource failed to notice the error.

The Fix

To get DSC working again, I did the following steps, on the target machine,in this order:

  1. Delete c:\windows\system32\configuration\pending.mof;
  2. Stop all WMI processes;
  3. Restart the WinRM service;

The first step was the only one I hadn’t tried, because I didn’t know anything about that file.  And it’s the key – that file tells DSC what needs to be done.  If it isn’t there, DSC seems to think that everything is back to being cool.

The Code

Here is some code I’ve started using to automate the fix described above.

remove-item $env:systemRoot/system32/configuration/pending.mof -force;
get-process *wmi* | stop-process -force;
restart-service winrm -force

Good luck!