The many ways to import the ConfigMgr cmdlet Library module | Quisitive

Over the years I’ve seen and used a variety of PowerShell commands to get the ConfigurationManager.psd1  file location to pass to Import-Module

Just for fun, I compiled a list of the different methods.  It’s all about string manipulation.

Import-Module "$env:SMS_ADMIN_UI_PATH..configurationmanager.psd1" # shortest code
Import-Module $env:SMS_ADMIN_UI_PATH.Replace('bini386','binconfigurationmanager.psd1') # most readable code
Import-Module $env:SMS_ADMIN_UI_PATH.Replace('i386','configurationmanager.psd1')
Import-Module $env:SMS_ADMIN_UI_PATH -replace 'i386$','configurationmanager.psd1'
Import-Module "$($env:SMS_ADMIN_UI_PATH.TrimEnd('i386'))configurationmanager.psd1"
Import-Module ((Split-Path $env:SMS_ADMIN_UI_PATH)+'configurationmanager.psd1')
Import-Module ($Env:SMS_ADMIN_UI_PATH.Substring(0,$Env:SMS_ADMIN_UI_PATH.Length-5)+'configurationmanager.psd1')

When using a ConfigMgr cmdlet it is necessary to work from the ConfigMgr site’s drive.  I’ve also seen a variety of ways to accomplish this as detailed below.

$SiteCode = Get-PSDrive -PSProvider CMSITE
Push-Location "$($SiteCode.Name):"

$SiteCode = (Get-PSDrive -PSProvider CMSITE).Name
Push-Location "$($SiteCode):"
Push-Location "$SiteCode`:"

Push-Location "$(Get-PSDrive -PSProvider CMSITE).Name):"

When more than one ConfigMgr site is registered on a computer, it may be necessary to more specifically identify it.  This is one example.

$SiteCode = (Get-PSDrive -PSProvider CMSITE | Where {$_.Root -eq 'ConfigMgr.contoso.com'}).Name

Lastly, note the difference between the *-Location  cmdlets.  Using Push/Pop-Location allows changing to the ConfigMgr site drive before running the cmdlets then returning to the previous location afterward.

Push-Location and the alias pushd.

Pop-Location  and the alias popd.

Set-Location  and the aliases cd , chdir , and  sl.

As I shared in my latest post, Transformation Starts at the Top, I believe you cannot transform an organization until you transform your leadership. As that shift happens it is important to understand that creating transformation within an organization cannot be viewed as a single-point destination. True organizational transformation will drive continual change in an iterative process that evolves over time. If that process stops, you’ve stopped growing.

First, the culture must support the journey, meaning you must help your employees to embrace change and ambiguity. In our industry many people want to know the detailed project plan and what the 22 steps are in each stage along the way. But, that’s not how transformation works. It’s a journey that incorporates a vision and stops along the way that will be celebrated, but it never ends. That constant state of change means you can’t provide the level of detail or clear roadmap that so many want or need, meaning it’s critical to set the tone of how it’s going to feel in this new environment of constant change and adaptation.

Transparency is key here. People need to feel as though they are part of the process, that they’re being communicated with and included on journey. But, if you don’t do a great job of that and don’t allow what’s going on to be visible and consumable by the broader audience, it starts to get very scary for them because they start to think, “Wait a minute, I don’t know where we’re going and I don’t know how I fit in.” We’ve experienced this in our journey – at one point we were doing some great ideation and creating a major marketing/sales motion that we believed was very important to the journey, but we did it in a vacuum and forgot that we needed to make sure our people saw behind the curtain.

Secondly, it is vital to remember that you can’t think about the process as a campaign with a definitive starting and ending point. It’s not a project launch and you can’t just move on to something new – it’s a journey. You have to be ok that everything may not be perfect along the way. Yet embrace imperfection to learn and adjust.

For example, we had the chance to be on stage with one of our clients at the Microsoft Worldwide Partner Conference. This venue offered an opportunity to be in front of key partners and peers in our ecosystem. At the time, however, we didn’t have the identity of the company fully baked – we didn’t even have a website. However, we felt strongly that we needed to be there. We took a leap and used the event to launch the company name, creating a splash page to support our vision while we continued to work on our brand and website. Yes, it was messy, but well worth it. If we’d waited until everything was buttoned up and ready to go, we would have missed a significant opportunity.

Transformation might be a tough journey to embark on if your organization, employees, clients and partners aren’t ready. Read part 3 of this series, “Fostering an Environment for Change,” here.

As I have shared in my latest blog posts, Transformation can be a tough journey to embark on if your organization, employees, clients and partners aren’t ready. As we embarked upon this journey of transformation with the launch of Quisitive, I realized that while we were creating a buzz about the business changing, the day-to-day would still look very much the same for many of our employees, clients and partners, at least for a while. So the big question was, how could we make sure our employees continued to feel valued even though they weren’t quite yet part of the new? How do we foster an environment for change?

The first thing we did was celebrate people’s success and acknowledge that their contribution was still an important component to the business – in fact, in most businesses and in ours it’s the fuel that’s going to fund the transformation. So, it was key to make sure those employees didn’t feel abandoned or think their contribution was no longer an important piece of the business because it didn’t necessarily fit into the vision that everyone was talking about. And we had to bring people along at a pace that kept things moving forward so we didn’t create two cultural experiences – the old way of doing things juxtaposed against the new. All of this was tricky to manage, and it led to some lessons learned.

One lesson we learned, we told employees what the new world was going to look like without getting clear on what we expected of them and how they too needed to transform themselves to be an integral part of our new future. We needed to create a model to set expectations, facilitate people in progressing individually and collectively through the journey, and then hold them accountable. We learned that it’s much harder than you might think to connect people to the journey, especially those who have been with you a long time and may or may not be working on a project that is truly transformational. We didn’t do a great job helping our people connect, sometimes walking away too soon and creating some frustration for others.

Another lesson learned was that we needed to do a better job holding people accountable for their own part of the process. I have a philosophy that I don’t own the employee’s career, they do. I own enabling it and supporting them through the journey. As a leader I’m accountable to make the personal investment to educate and transform myself, and then filter that transformation down to create a culture that promotes individual accountability and responsibility rather than relying on someone else to make it happen for them.

A good example of this is apparent in what we did with our sales organization. We provided them with different materials (white papers, case studies, etc.) that they could read to understand the context of the vision we were creating. From there we facilitated discussions about the material. This was all about creating accountability by providing access to key materials, and following up to engage in discussions about the content. We created forums where we asked people to present, sometimes individually and sometimes in a work group, to facilitate the conversation and provide a learning environment that everyone could benefit from. The thought process here was, we’re going to give you the tools, coaching and provide the time you need. In exchange, we’re going to ask you to come back and share your perspective and insights and how it’s relevant for our company and customers, not just report on what you’ve consumed.

This is a constant battle – some individuals make better progress than others – so you have to show patience while reinforcing the importance. Often, companies will do this as a project one quarter, and then the next quarter they’re off to something new. This is where the concept of a journey comes in; the goal is to build on things not make a radical shift left or right. Obviously, at some point there will be a big change in your direction but you have to make sure you’re constantly piecing this together in a way that is building blocks to what you want to achieve or you’ll lose the value of it along the way.