1

I need to install Bitlocker related module on various machines in my environment. I can't install it one by one manually. I need to automate the installation. Can someone point me in the right direction and provide me pointers.

I can't find any previous questions on this. I saw below question but we don't have NuGet on all the machines. Use nuget to install PowerShell modules at user machine

1 Answer 1

1

You can leverage PowerShell Gallery features for this.

Pre-Requisite: Ensure that you have the PowerShellGet module. This module comes witht he Windows Management Framework (WMF) 5.0 or you can use an MSI based installer and include this in PowerShell 3 and 4. You can push this via SCCM if it is not there already.

Required Cmdlets: Use below cmdlet to perform required operations. You can use these cmdlets in a script and run that against multiple computers in your environment.

#Check if module exists using Find-Module cmdlet
Find-Module xBitlocker

#Install the module using the Install-Module cmdlet
Install-Module -Name xBitlocker -Force

#Check module is on current machine already using below cmdlet
Get-Module -Name xBitlocker

#Save the module on local machine without installing
Save-Module -Name xBitlocker -Path <path here>

#Install the module using the below cmdlet
Uninstall-Module -Name xBitlocker -Force

You can use these cmdlets and create script to run against multiple machines. You can change xBitlocker with another module name as well.

Reference: PowerShell Gallery

Sign up to request clarification or add additional context in comments.

1 Comment

Wow, that was fast. I will try it out. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.