How to Deploy Dell Command | PowerShell Provider with ConfigMgr

dell-command-powershell-provider

Dell provides multiple tools for getting and setting their BIOS/UEFI settings. In previous posts, I have talked about Dell Command | Monitor, which can be used to inventory Dell specific hardware settings using Configuration Manager (see How to Inventory Dell BIOS and UEFI Settings with ConfigMgr Part 1 and How to Inventory Dell BIOS and UEFI Settings with ConfigMgr Part 2). I have also showed How to create a Dell Command | Configure Package in ConfigMgr  that can be used in a task sequence to make BIOS/UEFI changes. The Dell Command | Configure utility, also know as CCTK, can be used to get values as well as set values. Dell also has the Dell Command | PowerShell Provider that allows you to get and set BIOS/UEFI settings with (you guessed it) PowerShell. Now you are probably wondering why do I need this PowerShell Provider when I have the CCTK? Good question!

It really comes down to the task at hand and how you plan to create a solution for it. If you simply just need to set a setting or two, then the CCTK might be the best bet. But if you are looking to get information and then execute an action, well then PowerShell is going to be a better tool for the job (think about Configuration Manager Settings Management). The downside is that you need PowerShell version 3.0 or later (for DellBIOSProvider 1.1), which mean that you will need to add PowerShell to your Boot Images if you plan on using it in WinPE (which adds around 100MB to the size).

So lets jump in and see what it takes to get the Dell Command | PowerShell Provider deployed using Configuration Manager. The first thing you want to do is install the latest version (DellBIOSProvider 1.1 is the most current version at the time of this blog). On a Dell test system that has access to the Internet, download the latest version from the PowerShell Gallery (BTW – the download links to the Dell Support site on the Dell Command | PowerShell Provider TechCenter site have not been updated and still point to version 1.0).

  1. On your Dell test system, open PowerShell and run the following command to download the PowerShell Provider from the PowerShell Gallery (it may prompt you to install some additional items first):
    Save-Module -Name DellBIOSProvider -Path c:\temp
    NOTE: You could distribute the commands on the PowerShell Gallery page if you allow all of your computers to connect to the Internet and install modules from the PowerShell gallery. Otherwise, continue reading for how to deploy it with Configuration Manager.
    001-dellbiosprovider-1-1
  2. Copy the entire contents to your Application source repository. I have created the following subdirectory structure in my Application source repository: \\ContentSource\Applications\Dell\Command-PowerShell Provider\1.1\x64 and copied the DellBIOSProvider folder into this directory.
    002-dellbiosprovider-1-1
  3. Create a file called Install-x64.ps1 in this directory with the following contents:
    #Copy the DellBIOSProvider files into the Windows PowerShell Modules directory
    Copy-Item -Path "$pwd\DellBIOSProvider\" -Destination "$env:ProgramFiles\WindowsPowerShell\Modules\DellBIOSProvider\1.1" -Recurse -Force
    
    #Import the DellBIOSProvider module into current session only for success/fail testing during deployment
    #Either modify default system profiles or start scripts with the following command
    Import-Module "DellBIOSProvider"
    
    
  4. Your Application source directory should now contain the DellBIOSProvider folder and Install-x64.ps1.
    003-dellbiosprovider-1-1
  5. In the ConfigMgr Console, create a new Application, select Manually specify the application information and click Next.
  6. On the General Information tab, Fill in Dell Command | PowerShell Provider for the Name, Dell for the Publisher, 1.1 for the Software version, check Allow this application to be installed from the Install Application task sequence action without being deployed and click Next.
  7. On the Application Catalog tab, optionally enter additional information and select an icon (I like to use the icon from the CCTK GUI) and click Next.
  8. On the Deployment Types tab, click the Add button.
  9. On the General tab of the Create Deployment Type Wizard, select Script Installer from the Type drop down and click Next.
  10. On the General Information tab, enter Install-x64 and click Next.
  11. On the Content tab, browse to your Application source repository (I use \\ContentSource\Applications\Dell\Command-PowerShell Provider\1.1\x64). For the Installation program use: powershell.exe -ExecutionPolicy Bypass -file “.\Install-x64.ps1” (NOTE: you depending on how your ConfigMgr PowerShell Client setting is configured you might not need the -ExecutionPolicy Bypass in the command line).
  12. On the Detection Method tab, click Add Clause.
  13. On the Detection Rule window, leave the Setting Type to File System and the Type to File. For the Path enter: %PROGRAMFILES%\WindowsPowerShell\Modules\DellBIOSProvider\1.1 and for the File or folder name enter DellBIOSProvider.dll. Uncheck This file or folder is associated with a 32-bit application on 64-bit systems. Leave the setting This file system setting must exist on the target system to indicate presence of this application and click OK. NOTE: Dell has not increased the version of this DLL to 1.1. It is still listed as 1.0.0.0. The other alternative is to use the timestamp on the file if detecting presence is not good enough for your environment.
  14. Back on the Detection Method tab, verify that the newly created detection method rule shows up and click Next.
  15. On the User Experience tab, change the Installation behavior to Install for System, the Logon requirement to Whether or not a user is logged on, the Installation program visibility to Hidden and click Next.
  16. On the Requirements tab, click Add.
  17. On the Create Requirement, select the 64-bit operating systems that you support in your environment and click OK.
  18. Back on the Requirements tab, add any other requirements that are necessary for your environment and click Next.
  19. On the Dependencies tab, add any dependencies that are required in your environment and click Next. NOTE: the Dell PowerShell Provider does have a dependency on the Visual C++ Runtimes so if these are not deployed in your environment you may need to add them as a dependency. For the exact versions, see the Dell Command | PowerShell Provider documentation.
  20. On the Summary tab, verify the information and click Next.
  21. On the Completion tab, verify the success and click Close.
  22. Back on the Deployment Types tab, click Next. NOTE: use the same process on a 32-bit system if you support 32-bit in your environment.
  23. On the Summary tab, verify the information and click Next.
  24. On the Completion tab, verify the success and click Close.
  25. You will now see the Application with one Deployment Type listed in the console. Now we need to distribute the content to the Distribution Point(s). Right-click and select Distribute Content.
  26. On the General screen of the Distribute Content Wizard, click Next.
  27. On the Content screen, click Next.
  28. On the Content Destination screen, select the desired Distribution Point Group (or Distribution Point) and click Next.
  29. On the Summary screen, confirm the settings and click Next.
  30. On the Completion screen, verify the wizard completed successfully and click Close.
  31. Now we need to create a collection that contains only Dell workstation clients that we can use to deploy the newly created Dell Command | PowerShell Provider Application. See step number 35 on How to Inventory Dell BIOS and UEFI Settings with ConfigMgr Part 1 on how to do this.
  32. Create a test deployment of the Dell Command | PowerShell Provider Application and verify that it is installing correctly. Create a collection called Dell Command | PowerShell Provider 1.1 and limit it to the previously created Dell Workstation Clients collection. Add a few Dell test machines. Back in the Software Library in the ConfigMgr Console, right click on Dell Command | PowerShell Provider Application and select Deploy.
  33. On the General screen of the Deploy Software Wizard, select the Dell Command | PowerShell Provider 1.1 collection and click Next. Note: Be sure to thoroughly test this in a lab first!
  34. On the Content screen, verify that the content has already been distributed to the Distribution Point Group(s)/Distribution Point(s) and click Next.
  35. On the Deployment Settings screen, choose Required for the Purpose and click Next.
  36. On the Scheduling screen, select the desired schedule and click Next.
  37. On the User Experience screen, select the desired settings and click Next.
  38. On the Alerts screen, click Next.
  39. On the Summary screen, verify the settings and click Next.
  40. On the Completion screen, verify the wizard completed successfully and click Close.
  41. Next, verify that it installed successfully by looking in Software Center or browse to C:\Program Files\WindowsPowerShell\Modules on a test system and you should see the DellBIOSProvider directory with all of the files. Open up an elevated PowerShell prompt and run: Import-Module DellBIOSProvider. If this is successful you can run Get-DellBiosSettings and it should list out the BIOS settings for the current system.
    004-powershell-prompt
    005-powershell-prompt

Now that Dell Command | PowerShell Provider is deployed, we can run a number of PowerShell commands on Dell systems to both get and set Dell BIOS settings (even some settings that Dell Command | Monitor does not report). In the future I will write more posts on how you can use ConfigMgr to leverage this new PowerShell provider.

Originally posted on https://miketerrill.net/

2 thoughts on “How to Deploy Dell Command | PowerShell Provider with ConfigMgr

  1. Hey, I followed your instructions, and have triple checked all my syntax and I cannot get it to install, I receive The software change returned error code 0xFFFD0000 (-196608). The machine I am deploying it to has windows 10 1607, not sure what is causing it to fail.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s